diff --git a/.gitignore b/.gitignore
index c7e60c1..3ad1c05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@
/tables/*
/Properties/
/.idea/
-/wwwroot/scripts/js/
-/wwwroot/styles/css/*
+/wwwroot/scripts/*.js
+/wwwroot/scripts/*.js.map
+/wwwroot/styles/*
/Folder.DotSettings.user
diff --git a/Core/Theme.module.fs b/Core/Theme.module.fs
index a0d2fe2..7d5c65a 100644
--- a/Core/Theme.module.fs
+++ b/Core/Theme.module.fs
@@ -10,8 +10,8 @@ open DredgeFramework
let currentTheme = "restaurant"
let getHTMLForFile file =
- let stylePath = $"/styles/css/{file}"
- let scriptPath = $"/scripts/js/{file}"
+ let stylePath = $"/styles/{file}"
+ let scriptPath = $"/scripts/{file}"
let fileExtension = file |> getFileExtension
let scriptFileExists = File.Exists ("wwwroot"+stylePath) || File.Exists("wwwroot"+scriptPath)
match scriptFileExists with
@@ -26,7 +26,7 @@ let getHTMLForFile file =
let ParseScriptsAndStylesheets files html =
- let defaultScriptsAndStyles = ["dark.theme.css"; "../external/jquery.js" ; "dredgepos.core.js"; "keyboards.js";]
+ let defaultScriptsAndStyles = ["dark.theme.css"; "./external/jquery.js" ; "dredgepos.core.js"; "keyboards.js";]
let scriptsAndStylesheets = defaultScriptsAndStyles @ files
let scriptAndStylesheetHTML =
@@ -89,7 +89,7 @@ let ParseLanguageVariablesWithReplacements (string: string) =
))
let getTemplateFilePath templateName =
- "wwwroot/themes/"+ currentTheme + "/" + templateName + ".tpl.htm"
+ "views/"+ currentTheme + "/" + templateName + ".tpl.htm"
let templateExists templateName =
templateName
diff --git a/DredgePos.fsproj b/DredgePos.fsproj
index bb0d3b8..50d3bcb 100644
--- a/DredgePos.fsproj
+++ b/DredgePos.fsproj
@@ -46,6 +46,207 @@
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
+ true
+ PreserveNewest
+
+
@@ -78,12 +279,10 @@
-
-
- <_ContentIncludedByDefault Remove="wwwroot\themes\default\index.tpl.html" />
+ <_ContentIncludedByDefault Remove="wwwroot\themes\default\index.tpl.html" />
<_ContentIncludedByDefault Remove="wwwroot\themes\default\scripts\global.js" />
<_ContentIncludedByDefault Remove="wwwroot\themes\default\scripts\index.js" />
<_ContentIncludedByDefault Remove="wwwroot\themes\default\styles\global.css" />
diff --git a/DredgePos.sln b/DredgePos.sln
new file mode 100644
index 0000000..b13b5f1
--- /dev/null
+++ b/DredgePos.sln
@@ -0,0 +1,16 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "DredgePos", "DredgePos.fsproj", "{3C52169C-8E40-472B-B87B-82F43F96BFB0}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3C52169C-8E40-472B-B87B-82F43F96BFB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3C52169C-8E40-472B-B87B-82F43F96BFB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3C52169C-8E40-472B-B87B-82F43F96BFB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3C52169C-8E40-472B-B87B-82F43F96BFB0}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/Floorplan/Controller.fs b/Floorplan/Controller.fs
index 9c79ee1..d57cd98 100644
--- a/Floorplan/Controller.fs
+++ b/Floorplan/Controller.fs
@@ -119,7 +119,7 @@ let loadFloorplan (ctx: HttpContext) : HttpHandler =
"decorator", Entities.Floorplan_Decorations.Controller.generateDecorator()
]
let styles = ["dredgepos.floorplan.css"]
- let scripts = ["../external/konva.min.js" ; "dredgepos.floorplan.js"]
+ let scripts = ["./external/konva.min.js" ; "dredgepos.floorplan.js"]
let currentClerk = recordToMap <| Authenticate.Model.getCurrentClerk ctx
let arrays = map ["clerk", currentClerk]
diff --git a/OrderScreen/Controller.fs b/OrderScreen/Controller.fs
index 17ac2d8..803f170 100644
--- a/OrderScreen/Controller.fs
+++ b/OrderScreen/Controller.fs
@@ -81,7 +81,7 @@ let loadOrderScreen (ctx: HttpContext) (tableNumber: int) : HttpHandler =
]
let styles = ["dredgepos.orderScreen.css"]
- let scripts = ["dredgepos.tables.js";"../external/currency.min.js";"dredgepos.orderScreen.js"; ]
+ let scripts = ["dredgepos.tables.js";"./external/currency.min.js";"dredgepos.orderScreen.js"; ]
let currentClerk = recordToMap <| Authenticate.Model.getCurrentClerk ctx
let arrays = map ["clerk", currentClerk]
diff --git a/package-lock.json b/package-lock.json
index b28e8a6..1b422c3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -578,6 +578,11 @@
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
+ "tsc": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/tsc/-/tsc-2.0.4.tgz",
+ "integrity": "sha512-fzoSieZI5KKJVBYGvwbVZs/J5za84f2lSTLPYf6AGiIf43tZ3GNrI1QzTLcjtyDDP4aLxd46RTZq1nQxe7+k5Q=="
+ },
"typescript": {
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
diff --git a/package.json b/package.json
index 2e97436..f0f9f1c 100644
--- a/package.json
+++ b/package.json
@@ -7,9 +7,15 @@
"currency.js": "^2.0.4",
"konva": "^8.2.2",
"sass": "^1.43.4",
+ "tsc": "^2.0.4",
"typescript": "^4.4.4"
},
"description": "",
"license": "",
- "repository": ""
+ "repository": "",
+ "scripts": {
+ "sass": "sass sass:wwwroot/styles",
+ "typescript": "tsc",
+ "build" : "npm run sass && npm run typescript"
+ }
}
diff --git a/wwwroot/styles/sass/dark.theme.sass b/sass/dark.theme.sass
similarity index 100%
rename from wwwroot/styles/sass/dark.theme.sass
rename to sass/dark.theme.sass
diff --git a/wwwroot/styles/sass/dredgepos.authenticate.sass b/sass/dredgepos.authenticate.sass
similarity index 100%
rename from wwwroot/styles/sass/dredgepos.authenticate.sass
rename to sass/dredgepos.authenticate.sass
diff --git a/wwwroot/styles/sass/dredgepos.core.sass b/sass/dredgepos.core.sass
similarity index 100%
rename from wwwroot/styles/sass/dredgepos.core.sass
rename to sass/dredgepos.core.sass
diff --git a/wwwroot/styles/sass/dredgepos.floorplan.sass b/sass/dredgepos.floorplan.sass
similarity index 100%
rename from wwwroot/styles/sass/dredgepos.floorplan.sass
rename to sass/dredgepos.floorplan.sass
diff --git a/wwwroot/styles/sass/dredgepos.keyboards.sass b/sass/dredgepos.keyboards.sass
similarity index 100%
rename from wwwroot/styles/sass/dredgepos.keyboards.sass
rename to sass/dredgepos.keyboards.sass
diff --git a/wwwroot/styles/sass/dredgepos.orderScreen.sass b/sass/dredgepos.orderScreen.sass
similarity index 100%
rename from wwwroot/styles/sass/dredgepos.orderScreen.sass
rename to sass/dredgepos.orderScreen.sass
diff --git a/wwwroot/scripts/ts/tsconfig.json b/tsconfig.json
similarity index 84%
rename from wwwroot/scripts/ts/tsconfig.json
rename to tsconfig.json
index 8f1e976..ba2a254 100644
--- a/wwwroot/scripts/ts/tsconfig.json
+++ b/tsconfig.json
@@ -7,12 +7,12 @@
"noImplicitAny":true,
"removeComments":false,
"preserveConstEnums":true,
- "outDir":"../js",
+ "outDir":"wwwroot/scripts",
"target":"ES2016",
"sourceMap":true,
"moduleResolution": "node"
},
"include":[
- "*"
+ "typescript"
]
}
\ No newline at end of file
diff --git a/wwwroot/scripts/ts/dredgepos.authenticate.ts b/typescript/dredgepos.authenticate.ts
similarity index 100%
rename from wwwroot/scripts/ts/dredgepos.authenticate.ts
rename to typescript/dredgepos.authenticate.ts
diff --git a/wwwroot/scripts/ts/dredgepos.core.ts b/typescript/dredgepos.core.ts
similarity index 100%
rename from wwwroot/scripts/ts/dredgepos.core.ts
rename to typescript/dredgepos.core.ts
diff --git a/wwwroot/scripts/ts/dredgepos.floorplan.ts b/typescript/dredgepos.floorplan.ts
similarity index 100%
rename from wwwroot/scripts/ts/dredgepos.floorplan.ts
rename to typescript/dredgepos.floorplan.ts
diff --git a/wwwroot/scripts/ts/dredgepos.orderScreen.ts b/typescript/dredgepos.orderScreen.ts
similarity index 100%
rename from wwwroot/scripts/ts/dredgepos.orderScreen.ts
rename to typescript/dredgepos.orderScreen.ts
diff --git a/wwwroot/scripts/ts/dredgepos.tables.ts b/typescript/dredgepos.tables.ts
similarity index 100%
rename from wwwroot/scripts/ts/dredgepos.tables.ts
rename to typescript/dredgepos.tables.ts
diff --git a/wwwroot/scripts/ts/keyboards.ts b/typescript/keyboards.ts
similarity index 100%
rename from wwwroot/scripts/ts/keyboards.ts
rename to typescript/keyboards.ts
diff --git a/wwwroot/scripts/ts/types.ts b/typescript/types.ts
similarity index 100%
rename from wwwroot/scripts/ts/types.ts
rename to typescript/types.ts
diff --git a/wwwroot/scripts/ts/typings/currency.d.ts b/typescript/typings/currency.d.ts
similarity index 100%
rename from wwwroot/scripts/ts/typings/currency.d.ts
rename to typescript/typings/currency.d.ts
diff --git a/wwwroot/scripts/ts/typings/konva.d.ts b/typescript/typings/konva.d.ts
similarity index 100%
rename from wwwroot/scripts/ts/typings/konva.d.ts
rename to typescript/typings/konva.d.ts
diff --git a/wwwroot/themes/restaurant/alert.tpl.htm b/views/restaurant/alert.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/alert.tpl.htm
rename to views/restaurant/alert.tpl.htm
diff --git a/wwwroot/themes/restaurant/authenticate.tpl.htm b/views/restaurant/authenticate.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/authenticate.tpl.htm
rename to views/restaurant/authenticate.tpl.htm
diff --git a/wwwroot/themes/restaurant/backupPayentsplitter.htm b/views/restaurant/backupPayentsplitter.htm
similarity index 100%
rename from wwwroot/themes/restaurant/backupPayentsplitter.htm
rename to views/restaurant/backupPayentsplitter.htm
diff --git a/wwwroot/themes/restaurant/button.tpl.htm b/views/restaurant/button.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/button.tpl.htm
rename to views/restaurant/button.tpl.htm
diff --git a/wwwroot/themes/restaurant/buttonWithImage.tpl.htm b/views/restaurant/buttonWithImage.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/buttonWithImage.tpl.htm
rename to views/restaurant/buttonWithImage.tpl.htm
diff --git a/wwwroot/themes/restaurant/categories/BeerPage1.tpl.htm b/views/restaurant/categories/BeerPage1.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/categories/BeerPage1.tpl.htm
rename to views/restaurant/categories/BeerPage1.tpl.htm
diff --git a/wwwroot/themes/restaurant/categories/BeerPage2.tpl.htm b/views/restaurant/categories/BeerPage2.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/categories/BeerPage2.tpl.htm
rename to views/restaurant/categories/BeerPage2.tpl.htm
diff --git a/wwwroot/themes/restaurant/categories/DessertsPage1.tpl.htm b/views/restaurant/categories/DessertsPage1.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/categories/DessertsPage1.tpl.htm
rename to views/restaurant/categories/DessertsPage1.tpl.htm
diff --git a/wwwroot/themes/restaurant/categories/MainsPage1.tpl.htm b/views/restaurant/categories/MainsPage1.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/categories/MainsPage1.tpl.htm
rename to views/restaurant/categories/MainsPage1.tpl.htm
diff --git a/wwwroot/themes/restaurant/categories/StartersPage1.tpl.htm b/views/restaurant/categories/StartersPage1.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/categories/StartersPage1.tpl.htm
rename to views/restaurant/categories/StartersPage1.tpl.htm
diff --git a/wwwroot/themes/restaurant/categories/WinePage1.tpl.htm b/views/restaurant/categories/WinePage1.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/categories/WinePage1.tpl.htm
rename to views/restaurant/categories/WinePage1.tpl.htm
diff --git a/wwwroot/themes/restaurant/categoryButton.tpl.htm b/views/restaurant/categoryButton.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/categoryButton.tpl.htm
rename to views/restaurant/categoryButton.tpl.htm
diff --git a/wwwroot/themes/restaurant/categoryMenu.tpl.htm b/views/restaurant/categoryMenu.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/categoryMenu.tpl.htm
rename to views/restaurant/categoryMenu.tpl.htm
diff --git a/wwwroot/themes/restaurant/components/posButton.tpl.htm b/views/restaurant/components/posButton.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/components/posButton.tpl.htm
rename to views/restaurant/components/posButton.tpl.htm
diff --git a/wwwroot/themes/restaurant/decoratorItem.tpl.htm b/views/restaurant/decoratorItem.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/decoratorItem.tpl.htm
rename to views/restaurant/decoratorItem.tpl.htm
diff --git a/wwwroot/themes/restaurant/decoratorRow.tpl.htm b/views/restaurant/decoratorRow.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/decoratorRow.tpl.htm
rename to views/restaurant/decoratorRow.tpl.htm
diff --git a/wwwroot/themes/restaurant/floorplan.tpl.htm b/views/restaurant/floorplan.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/floorplan.tpl.htm
rename to views/restaurant/floorplan.tpl.htm
diff --git a/wwwroot/themes/restaurant/keyboards.tpl.htm b/views/restaurant/keyboards.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/keyboards.tpl.htm
rename to views/restaurant/keyboards.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderBox.tpl.htm b/views/restaurant/orderBox.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderBox.tpl.htm
rename to views/restaurant/orderBox.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderBoxTable.tpl.htm b/views/restaurant/orderBoxTable.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderBoxTable.tpl.htm
rename to views/restaurant/orderBoxTable.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderScreen.tpl - Copy.htm b/views/restaurant/orderScreen.tpl - Copy.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen.tpl - Copy.htm
rename to views/restaurant/orderScreen.tpl - Copy.htm
diff --git a/wwwroot/themes/restaurant/orderScreen.tpl.htm b/views/restaurant/orderScreen.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen.tpl.htm
rename to views/restaurant/orderScreen.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderScreen/button_image.tpl.htm b/views/restaurant/orderScreen/button_image.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen/button_image.tpl.htm
rename to views/restaurant/orderScreen/button_image.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderScreen/change_cover_number_button.tpl.htm b/views/restaurant/orderScreen/change_cover_number_button.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen/change_cover_number_button.tpl.htm
rename to views/restaurant/orderScreen/change_cover_number_button.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderScreen/cover_selector.tpl.htm b/views/restaurant/orderScreen/cover_selector.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen/cover_selector.tpl.htm
rename to views/restaurant/orderScreen/cover_selector.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderScreen/grid_button.tpl.htm b/views/restaurant/orderScreen/grid_button.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen/grid_button.tpl.htm
rename to views/restaurant/orderScreen/grid_button.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderScreen/grid_container.tpl.htm b/views/restaurant/orderScreen/grid_container.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen/grid_container.tpl.htm
rename to views/restaurant/orderScreen/grid_container.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderScreen/page.tpl.htm b/views/restaurant/orderScreen/page.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen/page.tpl.htm
rename to views/restaurant/orderScreen/page.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderScreen/page_group.tpl.htm b/views/restaurant/orderScreen/page_group.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen/page_group.tpl.htm
rename to views/restaurant/orderScreen/page_group.tpl.htm
diff --git a/wwwroot/themes/restaurant/orderScreen/page_group_button.tpl.htm b/views/restaurant/orderScreen/page_group_button.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/orderScreen/page_group_button.tpl.htm
rename to views/restaurant/orderScreen/page_group_button.tpl.htm
diff --git a/wwwroot/themes/restaurant/paymentSplitter.tpl.htm b/views/restaurant/paymentSplitter.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/paymentSplitter.tpl.htm
rename to views/restaurant/paymentSplitter.tpl.htm
diff --git a/wwwroot/themes/restaurant/popupBoxItems.tpl.htm b/views/restaurant/popupBoxItems.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/popupBoxItems.tpl.htm
rename to views/restaurant/popupBoxItems.tpl.htm
diff --git a/wwwroot/themes/restaurant/roomButton.tpl.htm b/views/restaurant/roomButton.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/roomButton.tpl.htm
rename to views/restaurant/roomButton.tpl.htm
diff --git a/wwwroot/themes/restaurant/virtualKeyboard.tpl.htm b/views/restaurant/virtualKeyboard.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/virtualKeyboard.tpl.htm
rename to views/restaurant/virtualKeyboard.tpl.htm
diff --git a/wwwroot/themes/restaurant/virtualNumpad.tpl.htm b/views/restaurant/virtualNumpad.tpl.htm
similarity index 100%
rename from wwwroot/themes/restaurant/virtualNumpad.tpl.htm
rename to views/restaurant/virtualNumpad.tpl.htm
diff --git a/wwwroot/scripts/ts/package.json b/wwwroot/scripts/ts/package.json
deleted file mode 100644
index 67d06c5..0000000
--- a/wwwroot/scripts/ts/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "ts",
- "version": "1.0.0",
- "dependencies": {
- }
-}