diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000..1a0b52b
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+registry=https://npm.pkg.github.com/smartstocktz
diff --git a/package-lock.json b/package-lock.json
index b627a93..43c6163 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -348,6 +348,23 @@
"tslib": "^2.0.0"
}
},
+ "@angular/cdk": {
+ "version": "10.2.5",
+ "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-10.2.5.tgz",
+ "integrity": "sha512-SI/YdaxfkttG92A0uGRixyJkfTKHn0GIU+7BCSRq0d31ru3Ugfln+jr+5/xttxWr88CNPTfpGaUt0ZuSqYCzqw==",
+ "requires": {
+ "parse5": "^5.0.0",
+ "tslib": "^2.0.0"
+ },
+ "dependencies": {
+ "parse5": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
+ "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
+ "optional": true
+ }
+ }
+ },
"@angular/cli": {
"version": "10.1.7",
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-10.1.7.tgz",
@@ -443,6 +460,14 @@
"tslib": "^2.0.0"
}
},
+ "@angular/material": {
+ "version": "10.2.5",
+ "resolved": "https://registry.npmjs.org/@angular/material/-/material-10.2.5.tgz",
+ "integrity": "sha512-gYFqpXdLLuRYb9N1jVj9Gig/AlqsEfT/m+RtzHm4mawmHqeQbEV+0C0Qvc6fKRb1060Nkzfz8TDNGu5B+Xzq5A==",
+ "requires": {
+ "tslib": "^2.0.0"
+ }
+ },
"@angular/platform-browser": {
"version": "10.1.6",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-10.1.6.tgz",
@@ -1768,6 +1793,14 @@
"semver-intersect": "1.4.0"
}
},
+ "@smartstocktz/core-libs": {
+ "version": "0.0.2",
+ "resolved": "https://npm.pkg.github.com/download/@smartstocktz/core-libs/0.0.2/a36bb336eb6ab8a5dda02fdf10ec0319d2c89ed818a6c80c989d15cdec1b912d",
+ "integrity": "sha512-UniJjOGTUbQHqNmtu+KarhDjp+yTLzV0BMa99W3VbPKFvTc2Pv3Ge3QsMRYSAeDPXrvbCmJnCIOYO/MpNfqULg==",
+ "requires": {
+ "tslib": "^2.0.0"
+ }
+ },
"@types/estree": {
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
@@ -2150,8 +2183,7 @@
"after": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
- "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=",
- "dev": true
+ "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8="
},
"agent-base": {
"version": "4.3.0",
@@ -2356,8 +2388,7 @@
"arraybuffer.slice": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
- "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==",
- "dev": true
+ "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog=="
},
"arrify": {
"version": "1.0.1",
@@ -2445,14 +2476,12 @@
"async-limiter": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
- "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
- "dev": true
+ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
- "dev": true
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"at-least-node": {
"version": "1.0.0",
@@ -2493,6 +2522,14 @@
"integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==",
"dev": true
},
+ "axios": {
+ "version": "0.20.0",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz",
+ "integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==",
+ "requires": {
+ "follow-redirects": "^1.10.0"
+ }
+ },
"axobject-query": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.0.2.tgz",
@@ -2576,8 +2613,7 @@
"backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
- "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=",
- "dev": true
+ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc="
},
"balanced-match": {
"version": "1.0.0",
@@ -2643,8 +2679,7 @@
"base64-arraybuffer": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz",
- "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=",
- "dev": true
+ "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI="
},
"base64-js": {
"version": "1.3.1",
@@ -2682,6 +2717,92 @@
"callsite": "1.0.0"
}
},
+ "bfastjs": {
+ "version": "4.0.0-beta.25",
+ "resolved": "https://registry.npmjs.org/bfastjs/-/bfastjs-4.0.0-beta.25.tgz",
+ "integrity": "sha512-hb7bBCH4xZE+O7QrqcY+EX7LA8dti2qT1u7A731F25yYqTVUB4mbkNwrM5Ti+lJByITTayZiq5vlSOtpNB4AMA==",
+ "requires": {
+ "axios": "^0.20.0",
+ "browser-or-node": "^1.3.0",
+ "crypto-js": "^4.0.0",
+ "form-data": "^3.0.0",
+ "localforage": "^1.9.0",
+ "socket.io-client": "^2.3.1"
+ },
+ "dependencies": {
+ "component-emitter": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
+ },
+ "debug": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "form-data": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz",
+ "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==",
+ "requires": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ }
+ },
+ "isarray": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "parseqs": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz",
+ "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w=="
+ },
+ "parseuri": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz",
+ "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow=="
+ },
+ "socket.io-client": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.3.1.tgz",
+ "integrity": "sha512-YXmXn3pA8abPOY//JtYxou95Ihvzmg8U6kQyolArkIyLd0pgVhrfor/iMsox8cn07WCOOvvuJ6XKegzIucPutQ==",
+ "requires": {
+ "backo2": "1.0.2",
+ "component-bind": "1.0.0",
+ "component-emitter": "~1.3.0",
+ "debug": "~3.1.0",
+ "engine.io-client": "~3.4.0",
+ "has-binary2": "~1.0.2",
+ "indexof": "0.0.1",
+ "parseqs": "0.0.6",
+ "parseuri": "0.0.6",
+ "socket.io-parser": "~3.3.0",
+ "to-array": "0.1.4"
+ }
+ },
+ "socket.io-parser": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.1.tgz",
+ "integrity": "sha512-1QLvVAe8dTz+mKmZ07Swxt+LAo4Y1ff50rlyoEx00TQmDFVQYPfcqGvIDJLGaBdhdNCecXtyKpD+EgKGcmmbuQ==",
+ "requires": {
+ "component-emitter": "~1.3.0",
+ "debug": "~3.1.0",
+ "isarray": "2.0.1"
+ }
+ }
+ }
+ },
"big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
@@ -2707,8 +2828,7 @@
"blob": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
- "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==",
- "dev": true
+ "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
},
"blocking-proxy": {
"version": "1.0.1",
@@ -2826,6 +2946,11 @@
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
"dev": true
},
+ "browser-or-node": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-1.3.0.tgz",
+ "integrity": "sha512-0F2z/VSnLbmEeBcUrSuDH5l0HxTXdQQzLjkmBR4cYfvg1zJrKSlmIZFqyFR8oX0NrwPhy3c3HQ6i3OxMbew4Tg=="
+ },
"browserify-aes": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
@@ -3459,7 +3584,6 @@
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
- "dev": true,
"requires": {
"delayed-stream": "~1.0.0"
}
@@ -3479,8 +3603,7 @@
"component-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
- "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=",
- "dev": true
+ "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E="
},
"component-emitter": {
"version": "1.2.1",
@@ -3491,8 +3614,7 @@
"component-inherit": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
- "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=",
- "dev": true
+ "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM="
},
"compose-function": {
"version": "3.0.3",
@@ -3969,6 +4091,11 @@
"randomfill": "^1.0.3"
}
},
+ "crypto-js": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz",
+ "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg=="
+ },
"css": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz",
@@ -4430,8 +4557,7 @@
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
- "dev": true
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"depd": {
"version": "1.1.2",
@@ -4714,7 +4840,6 @@
"version": "3.4.4",
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.4.tgz",
"integrity": "sha512-iU4CRr38Fecj8HoZEnFtm2EiKGbYZcPn3cHxqNGl/tmdWRf60KhK+9vE0JeSjgnlS/0oynEfLgKbT9ALpim0sQ==",
- "dev": true,
"requires": {
"component-emitter": "~1.3.0",
"component-inherit": "0.0.3",
@@ -4732,14 +4857,12 @@
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
- "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
- "dev": true
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -4747,26 +4870,22 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"parseqs": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz",
- "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==",
- "dev": true
+ "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w=="
},
"parseuri": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz",
- "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==",
- "dev": true
+ "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow=="
},
"ws": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz",
"integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==",
- "dev": true,
"requires": {
"async-limiter": "~1.0.0"
}
@@ -4777,7 +4896,6 @@
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz",
"integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==",
- "dev": true,
"requires": {
"after": "0.8.2",
"arraybuffer.slice": "~0.0.7",
@@ -5483,8 +5601,7 @@
"follow-redirects": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz",
- "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==",
- "dev": true
+ "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA=="
},
"for-in": {
"version": "1.0.2",
@@ -5742,7 +5859,6 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
"integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
- "dev": true,
"requires": {
"isarray": "2.0.1"
},
@@ -5750,16 +5866,14 @@
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
- "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=",
- "dev": true
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
}
}
},
"has-cors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
- "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=",
- "dev": true
+ "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
},
"has-flag": {
"version": "4.0.0",
@@ -6217,8 +6331,7 @@
"immediate": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
- "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=",
- "dev": true
+ "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
},
"import-cwd": {
"version": "2.1.0",
@@ -6279,8 +6392,7 @@
"indexof": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
- "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
- "dev": true
+ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10="
},
"infer-owner": {
"version": "1.0.4",
@@ -7270,6 +7382,24 @@
"json5": "^2.1.2"
}
},
+ "localforage": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.9.0.tgz",
+ "integrity": "sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g==",
+ "requires": {
+ "lie": "3.1.1"
+ },
+ "dependencies": {
+ "lie": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
+ "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=",
+ "requires": {
+ "immediate": "~3.0.5"
+ }
+ }
+ }
+ },
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
@@ -7549,14 +7679,12 @@
"mime-db": {
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
- "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
- "dev": true
+ "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
},
"mime-types": {
"version": "2.1.27",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
- "dev": true,
"requires": {
"mime-db": "1.44.0"
}
@@ -12243,8 +12371,7 @@
"to-array": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
- "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=",
- "dev": true
+ "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA="
},
"to-arraybuffer": {
"version": "1.0.1",
@@ -14161,8 +14288,7 @@
"xmlhttprequest-ssl": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
- "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=",
- "dev": true
+ "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
},
"xtend": {
"version": "4.0.2",
@@ -14223,8 +14349,7 @@
"yeast": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
- "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
- "dev": true
+ "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk="
},
"yn": {
"version": "3.1.1",
diff --git a/package.json b/package.json
index e504682..fb4ca95 100644
--- a/package.json
+++ b/package.json
@@ -12,13 +12,17 @@
"private": true,
"dependencies": {
"@angular/animations": "~10.1.5",
+ "@angular/cdk": "^10.2.5",
"@angular/common": "~10.1.5",
"@angular/compiler": "~10.1.5",
"@angular/core": "~10.1.5",
"@angular/forms": "~10.1.5",
+ "@angular/material": "^10.2.5",
"@angular/platform-browser": "~10.1.5",
"@angular/platform-browser-dynamic": "~10.1.5",
"@angular/router": "~10.1.5",
+ "@smartstocktz/core-libs": "^0.0.2",
+ "bfastjs": "^4.0.0-beta.25",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
diff --git a/projects/web-mock/src/app/app.component.html b/projects/web-mock/src/app/app.component.html
deleted file mode 100644
index fdb26fb..0000000
--- a/projects/web-mock/src/app/app.component.html
+++ /dev/null
@@ -1,532 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ title }} app is running!
-
-
-
-
-
-
-
-
-
Resources
-
Here are some links to help you get started:
-
-
-
-
-
Next Steps
-
What do you want to do next with your app?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Run and Watch Tests
-
-
-
-
-
-
Build for Production
-
-
-
-
-
-
ng generate component xyz
-
ng add @angular/material
-
ng add @angular/pwa
-
ng add _____
-
ng test
-
ng build --prod
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/projects/web-mock/src/app/app.component.spec.ts b/projects/web-mock/src/app/app.component.spec.ts
deleted file mode 100644
index 75ec498..0000000
--- a/projects/web-mock/src/app/app.component.spec.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-import { AppComponent } from './app.component';
-
-describe('AppComponent', () => {
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [
- AppComponent
- ],
- }).compileComponents();
- });
-
- it('should create the app', () => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.componentInstance;
- expect(app).toBeTruthy();
- });
-
- it(`should have as title 'web-mock'`, () => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.componentInstance;
- expect(app.title).toEqual('web-mock');
- });
-
- it('should render title', () => {
- const fixture = TestBed.createComponent(AppComponent);
- fixture.detectChanges();
- const compiled = fixture.nativeElement;
- expect(compiled.querySelector('.content span').textContent).toContain('web-mock app is running!');
- });
-});
diff --git a/projects/web-mock/src/app/app.component.ts b/projects/web-mock/src/app/app.component.ts
index 76cd305..c6826c2 100644
--- a/projects/web-mock/src/app/app.component.ts
+++ b/projects/web-mock/src/app/app.component.ts
@@ -1,9 +1,10 @@
-import { Component } from '@angular/core';
+import {Component} from '@angular/core';
@Component({
selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.scss']
+ template: `
+
+ `
})
export class AppComponent {
title = 'web-mock';
diff --git a/projects/web-mock/src/app/app.module.ts b/projects/web-mock/src/app/app.module.ts
index f657163..93acd52 100644
--- a/projects/web-mock/src/app/app.module.ts
+++ b/projects/web-mock/src/app/app.module.ts
@@ -1,16 +1,44 @@
-import { BrowserModule } from '@angular/platform-browser';
-import { NgModule } from '@angular/core';
+import {BrowserModule} from '@angular/platform-browser';
+import {NgModule} from '@angular/core';
-import { AppComponent } from './app.component';
+import {AppComponent} from './app.component';
+import {RouterModule, Routes} from '@angular/router';
+import {WelcomePage} from './pages/welcome.page';
+import {LoginPageComponent} from './pages/login.page';
+import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
+import {MatCardModule} from '@angular/material/card';
+import {ReactiveFormsModule} from '@angular/forms';
+import {MatFormFieldModule} from '@angular/material/form-field';
+import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
+import {MatButtonModule} from '@angular/material/button';
+import {MatInputModule} from '@angular/material/input';
+
+const routes: Routes = [
+ {
+ path: '', loadChildren: () => import('../../../web/src/public-api').then(mod => mod.WebModule)
+ }
+];
@NgModule({
declarations: [
- AppComponent
+ AppComponent,
+ WelcomePage,
+ LoginPageComponent
],
imports: [
- BrowserModule
+ BrowserModule,
+ RouterModule.forRoot(routes),
+ RouterModule,
+ BrowserAnimationsModule,
+ MatCardModule,
+ ReactiveFormsModule,
+ MatFormFieldModule,
+ MatProgressSpinnerModule,
+ MatButtonModule,
+ MatInputModule
],
providers: [],
bootstrap: [AppComponent]
})
-export class AppModule { }
+export class AppModule {
+}
diff --git a/projects/web-mock/src/app/guards/auth.guard.ts b/projects/web-mock/src/app/guards/auth.guard.ts
new file mode 100644
index 0000000..bf8be96
--- /dev/null
+++ b/projects/web-mock/src/app/guards/auth.guard.ts
@@ -0,0 +1,30 @@
+import {Injectable} from '@angular/core';
+import {ActivatedRouteSnapshot, CanActivate, Route, Router, RouterStateSnapshot, UrlTree} from '@angular/router';
+import {Observable} from 'rxjs';
+import {BFast} from 'bfastjs';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class AuthGuard implements CanActivate {
+ constructor(private readonly router: Router) {
+ }
+
+ canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot)
+ : Observable | Promise | boolean | UrlTree {
+ return new Promise(async (resolve, reject) => {
+ const user = await BFast.auth().currentUser();
+ if (user && user.role) {
+ BFast.init({
+ applicationId: user.applicationId,
+ projectId: user.projectId
+ }, user.projectId);
+ resolve(true);
+ } else {
+ this.router.navigateByUrl('/').catch();
+ resolve(false);
+ }
+ });
+ }
+
+}
diff --git a/projects/web-mock/src/app/pages/login.page.ts b/projects/web-mock/src/app/pages/login.page.ts
new file mode 100644
index 0000000..fa30171
--- /dev/null
+++ b/projects/web-mock/src/app/pages/login.page.ts
@@ -0,0 +1,73 @@
+import {Component, OnInit} from '@angular/core';
+import {FormBuilder, FormGroup, Validators} from '@angular/forms';
+import {MatSnackBar} from '@angular/material/snack-bar';
+import {BFast} from 'bfastjs';
+import {Router} from '@angular/router';
+import {StorageService} from '@smartstocktz/core-libs';
+
+@Component({
+ selector: 'app-login',
+ template: `
+
+
+
+
+
+
+
+ `
+})
+export class LoginPageComponent implements OnInit {
+
+ loginForm: FormGroup;
+ isLogin = false;
+
+ constructor(private readonly formBuilder: FormBuilder,
+ private readonly router: Router,
+ private readonly storageService: StorageService,
+ private readonly snack: MatSnackBar) {
+ }
+
+ login(): void {
+ if (!this.loginForm.valid) {
+ this.snack.open('Please fill all required fields', 'Ok', {duration: 3000});
+ } else {
+ this.isLogin = true;
+ BFast.auth().logIn(this.loginForm.value.username, this.loginForm.value.password)
+ .then(async user => {
+ this.router.navigateByUrl('/stock').catch(console.log);
+ BFast.init({
+ applicationId: user.applicationId,
+ projectId: user.projectId
+ }, user.projectId);
+ await this.storageService.saveCurrentProjectId('0UTYLQKeifrk');
+ await this.storageService.saveActiveShop(user as any);
+ })
+ .catch(reason => {
+ this.snack.open(reason && reason.message ? reason.message : reason, 'Ok');
+ }).finally(() => {
+ this.isLogin = false;
+ });
+ }
+ }
+
+ ngOnInit(): void {
+ this.loginForm = this.formBuilder.group({
+ username: ['', [Validators.nullValidator, Validators.required]],
+ password: ['', [Validators.nullValidator, Validators.required]],
+ });
+ }
+}
diff --git a/projects/web-mock/src/app/pages/welcome.page.ts b/projects/web-mock/src/app/pages/welcome.page.ts
new file mode 100644
index 0000000..75dad79
--- /dev/null
+++ b/projects/web-mock/src/app/pages/welcome.page.ts
@@ -0,0 +1,13 @@
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'app-welcome',
+ template: `
+ Welcome to Stock Mock
+ Start Now
+ `
+})
+
+export class WelcomePage{
+
+}
diff --git a/projects/web-mock/src/assets/img/customisable_icon.png b/projects/web-mock/src/assets/img/customisable_icon.png
new file mode 100644
index 0000000..33633be
Binary files /dev/null and b/projects/web-mock/src/assets/img/customisable_icon.png differ
diff --git a/projects/web-mock/src/assets/img/everyWhere_icon.png b/projects/web-mock/src/assets/img/everyWhere_icon.png
new file mode 100644
index 0000000..b8575be
Binary files /dev/null and b/projects/web-mock/src/assets/img/everyWhere_icon.png differ
diff --git a/projects/web-mock/src/assets/img/header.png b/projects/web-mock/src/assets/img/header.png
new file mode 100644
index 0000000..f874d04
Binary files /dev/null and b/projects/web-mock/src/assets/img/header.png differ
diff --git a/projects/web-mock/src/assets/img/plus_sign.svg b/projects/web-mock/src/assets/img/plus_sign.svg
new file mode 100644
index 0000000..0b218a1
--- /dev/null
+++ b/projects/web-mock/src/assets/img/plus_sign.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/projects/web-mock/src/assets/img/receipt.png b/projects/web-mock/src/assets/img/receipt.png
new file mode 100644
index 0000000..f823108
Binary files /dev/null and b/projects/web-mock/src/assets/img/receipt.png differ
diff --git a/projects/web-mock/src/assets/img/receipt.svg b/projects/web-mock/src/assets/img/receipt.svg
new file mode 100644
index 0000000..3a2a1a2
--- /dev/null
+++ b/projects/web-mock/src/assets/img/receipt.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/projects/web-mock/src/assets/img/ss_logo_black.svg b/projects/web-mock/src/assets/img/ss_logo_black.svg
new file mode 100644
index 0000000..ac4d627
--- /dev/null
+++ b/projects/web-mock/src/assets/img/ss_logo_black.svg
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/projects/web-mock/src/assets/img/ss_logo_white 3.svg b/projects/web-mock/src/assets/img/ss_logo_white 3.svg
new file mode 100644
index 0000000..aee6d51
--- /dev/null
+++ b/projects/web-mock/src/assets/img/ss_logo_white 3.svg
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/projects/web-mock/src/assets/img/window_badge.png b/projects/web-mock/src/assets/img/window_badge.png
new file mode 100644
index 0000000..de4f427
Binary files /dev/null and b/projects/web-mock/src/assets/img/window_badge.png differ
diff --git "a/projects/web-mock/src/assets/img/\342\200\234$\342\200\235.svg" "b/projects/web-mock/src/assets/img/\342\200\234$\342\200\235.svg"
new file mode 100644
index 0000000..490549e
--- /dev/null
+++ "b/projects/web-mock/src/assets/img/\342\200\234$\342\200\235.svg"
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git "a/projects/web-mock/src/assets/img/\342\200\23499.9%\342\200\235.png" "b/projects/web-mock/src/assets/img/\342\200\23499.9%\342\200\235.png"
new file mode 100644
index 0000000..f99084e
Binary files /dev/null and "b/projects/web-mock/src/assets/img/\342\200\23499.9%\342\200\235.png" differ
diff --git a/projects/web-mock/src/index.html b/projects/web-mock/src/index.html
index 2ffe71c..2424112 100644
--- a/projects/web-mock/src/index.html
+++ b/projects/web-mock/src/index.html
@@ -6,8 +6,12 @@
+
+
+
-
-
+
+
diff --git a/projects/web-mock/src/styles.scss b/projects/web-mock/src/styles.scss
index 90d4ee0..4e3109c 100644
--- a/projects/web-mock/src/styles.scss
+++ b/projects/web-mock/src/styles.scss
@@ -1 +1,204 @@
+// Custom Theming for Angular Material
+// For more information: https://material.angular.io/guide/theming
+@import '~@angular/material/theming';
+// Plus imports for other components in your app.
+
+// Include the common styles for Angular Material. We include this here so that you only
+// have to load a single css file for Angular Material in your app.
+// Be sure that you only ever include this mixin once!
+@include mat-core();
+
+// Define the palettes for your theme using the Material Design palettes available in palette.scss
+// (imported above). For each palette, you can optionally specify a default, lighter, and darker
+// hue. Available color palettes: https://material.io/design/color/
+$web-mock-primary: mat-palette($mat-green, 900);
+$web-mock-accent: mat-palette($mat-green, 500);
+
+// The warn palette is optional (defaults to red).
+$web-mock-warn: mat-palette($mat-red);
+
+// Create the theme object. A theme consists of configurations for individual
+// theming systems such as "color" or "typography".
+$web-mock-theme: mat-light-theme((
+ color: (
+ primary: $web-mock-primary,
+ accent: $web-mock-accent,
+ warn: $web-mock-warn,
+ )
+));
+
+// Include theme styles for core and each component used in your app.
+// Alternatively, you can import and @include the theme mixins for each component
+// that you are using.
+@include angular-material-theme($web-mock-theme);
+
/* You can add global styles to this file, and also import other style files */
+
+html, body {
+ height: 100%;
+}
+
+body {
+ margin: 0;
+ font-family: Roboto, "Helvetica Neue", sans-serif;
+}
+
+div.mat-list-text {
+ align-items: start;
+}
+
+table {
+ width: 100%;
+}
+
+button {
+ outline: none !important;
+}
+
+
+mat-sidenav {
+ border: none !important;
+}
+
+
+.highcharts-credits {
+ display: none !important;
+}
+
+.toolbar-spacer {
+ flex: 1 1 auto;
+}
+
+.my-input {
+ width: 100%;
+}
+
+.match-parent {
+ height: 100vh;
+}
+
+.match-parent-side {
+ height: 100vh;
+ width: 250px;
+}
+
+/*.mytoolbar {*/
+/*position: fixed;*/
+/*top: 0;*/
+/*height: 60px;*/
+/*z-index: 1000;*/
+/*}*/
+
+button {
+ outline: none !important;
+}
+
+.ft-button {
+ height: 48px;
+ color: white;
+ font-size: 20px;
+}
+
+.table-data-row:hover {
+ background: rgba(0, 128, 0, 0.09);
+ cursor: pointer;
+}
+
+.editable:hover {
+ outline: #0b2e13 solid 1px;
+ cursor: pointer;
+}
+
+
+.pricing-input {
+ width: 80px;
+ border-radius: 4px;
+ border: none;
+ box-shadow: none;
+ background: rgba(191, 191, 191, 0.61);
+ color: #000000;
+ padding: 8px;
+ outline: none;
+}
+
+.pricing-input::placeholder {
+ color: #535353;
+}
+
+.pricing-input:focus {
+ outline: none;
+}
+
+.dashboard-refresh-button {
+ margin-top: 6px !important;
+ margin-left: 4px !important;
+}
+
+.bill-card-top {
+ height: 125px;
+ /*// background: #FFFFFF;*/
+ border-radius: 4px;
+ padding: 5px;
+ margin-bottom: 10px;
+}
+
+/* width */
+/*::-webkit-scrollbar {*/
+/* width: 5px;*/
+/*}*/
+
+/*!* Track *!*/
+/*::-webkit-scrollbar-track {*/
+/* background: rgba(0, 170, 7, 0.33);*/
+/* border-radius: 5px;*/
+/* margin: 5px;*/
+/*}*/
+
+/*!* Handle *!*/
+/*::-webkit-scrollbar-thumb {*/
+/* background: #0d3b18;*/
+/* border-radius: 5px;*/
+/*}*/
+
+/*!* Handle on hover *!*/
+/*::-webkit-scrollbar-thumb:hover {*/
+/* background: #0b2e13;*/
+/*}*/
+
+
+.noSelect {
+ -webkit-touch-callout: none; /* iOS Safari */
+ -webkit-user-select: none; /* Safari */
+ -khtml-user-select: none; /* Konqueror HTML */
+ -moz-user-select: none; /* Old versions of Firefox */
+ -ms-user-select: none; /* Internet Explorer/Edge */
+ user-select: none;
+}
+
+.cdk-virtual-scroll-content-wrapper {
+ text-align: center;
+ padding: 2px;
+ margin-top: 8px;
+}
+
+.my-drawer-container {
+ height: 100vh;
+}
+
+div.mat-tab-body-wrapper {
+ box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)
+}
+
+mat-sidenav-content {
+ touch-action: pan-y !important;
+ background: white;
+}
+
+
+button {
+ outline: none !important;
+}
+
+div {
+ outline: none !important;
+}
diff --git a/projects/web/package.json b/projects/web/package.json
index 3f65288..5cba6dc 100644
--- a/projects/web/package.json
+++ b/projects/web/package.json
@@ -1,11 +1,18 @@
{
- "name": "web",
+ "name": "@smartstocktz/web",
"version": "0.0.1",
+ "publishConfig": {
+ "registry": "https://npm.pkg.github.com/smartstocktz"
+ },
+ "repository": {
+ "url": "git://github.com/smartstocktz/smartstock-web.git"
+ },
"peerDependencies": {
"@angular/common": "^10.1.6",
- "@angular/core": "^10.1.6"
+ "@angular/core": "^10.1.6",
+ "bfastjs": "^4.0.0-beta.25"
},
"dependencies": {
"tslib": "^2.0.0"
}
-}
\ No newline at end of file
+}
diff --git a/projects/web/src/componets/footer.component.ts b/projects/web/src/componets/footer.component.ts
new file mode 100644
index 0000000..8ce29d2
--- /dev/null
+++ b/projects/web/src/componets/footer.component.ts
@@ -0,0 +1,89 @@
+import {Component, OnInit} from '@angular/core';
+
+@Component({
+ selector: 'smartstock-footer',
+ template: `
+
+
+
+
+
© 2017-2020
+
+
+
+
+
+
Resources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+255 764 943 055
+
smartstocktz@gmail.com
+
+
+
+
+
+
+ `,
+ styleUrls: ['../styles/footer.style.scss']
+})
+export class FooterComponent implements OnInit {
+
+ constructor() {
+ }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/projects/web/src/guards/browser-platform.guard.ts b/projects/web/src/guards/browser-platform.guard.ts
new file mode 100644
index 0000000..b209674
--- /dev/null
+++ b/projects/web/src/guards/browser-platform.guard.ts
@@ -0,0 +1,15 @@
+import {Injectable} from '@angular/core';
+import {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree} from '@angular/router';
+import {Observable} from 'rxjs';
+
+@Injectable({
+ providedIn: 'root'
+})
+
+export class BrowserPlatformGuard implements CanActivate {
+ canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot)
+ : Observable | Promise | boolean | UrlTree {
+ return true;
+ }
+
+}
diff --git a/projects/web/src/lib/web.component.spec.ts b/projects/web/src/lib/web.component.spec.ts
deleted file mode 100644
index 9bef4fc..0000000
--- a/projects/web/src/lib/web.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { WebComponent } from './web.component';
-
-describe('WebComponent', () => {
- let component: WebComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ WebComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(WebComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/projects/web/src/lib/web.component.ts b/projects/web/src/lib/web.component.ts
deleted file mode 100644
index 6e72802..0000000
--- a/projects/web/src/lib/web.component.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'lib-web',
- template: `
-
- web works!
-
- `,
- styles: [
- ]
-})
-export class WebComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit(): void {
- }
-
-}
diff --git a/projects/web/src/lib/web.module.ts b/projects/web/src/lib/web.module.ts
deleted file mode 100644
index 38ef01d..0000000
--- a/projects/web/src/lib/web.module.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { NgModule } from '@angular/core';
-import { WebComponent } from './web.component';
-
-
-
-@NgModule({
- declarations: [WebComponent],
- imports: [
- ],
- exports: [WebComponent]
-})
-export class WebModule { }
diff --git a/projects/web/src/lib/web.service.spec.ts b/projects/web/src/lib/web.service.spec.ts
deleted file mode 100644
index bef30ef..0000000
--- a/projects/web/src/lib/web.service.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-
-import { WebService } from './web.service';
-
-describe('WebService', () => {
- let service: WebService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(WebService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/projects/web/src/lib/web.service.ts b/projects/web/src/lib/web.service.ts
deleted file mode 100644
index 051ee95..0000000
--- a/projects/web/src/lib/web.service.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { Injectable } from '@angular/core';
-
-@Injectable({
- providedIn: 'root'
-})
-export class WebService {
-
- constructor() { }
-}
diff --git a/projects/web/src/pages/landing.page.ts b/projects/web/src/pages/landing.page.ts
new file mode 100644
index 0000000..bc78171
--- /dev/null
+++ b/projects/web/src/pages/landing.page.ts
@@ -0,0 +1,269 @@
+import {Component, OnInit} from '@angular/core';
+import {Router} from '@angular/router';
+import {FormControl} from '@angular/forms';
+
+@Component({
+ selector: 'smartstock-landing',
+ template: `
+
+
+ SmartStock
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Login
+
+ Register
+
+
+
+
+
+ You can’t continue using papers to keep records of your business.
+
+
Start your sales with us, today
+
+
+
+
+
+
+
+
+
Why Smartstock?
+
+
+
+
+
Work everywhere
+
+ You can access our system either by desktop / laptop , mobile or web browser
+
+
+
+
+
Always available
+
+ Due to internet connectivity challenge
+ our service available offline and online
+
+
+
+
+
Customizable
+
Say how you want it to work for you
+ and it will work the way you want
+
+
+
+
+
+
+
Customer Engagement
+
+ Create your online shop for customer to make order and see your products.
+
+
+
+
+
Pay As You Use
+
+ Pay for what you use in a month, and not for packages.
+
+
+
+
+
Printer
+
+ Printer is integrated by default. Your customer deserve a receipt.
+
+
+
+
+
+
+
+
+
+
Price Calculator
+
+
+
+ We understand price is a sensitive issue for business.
+
+ You will pay for what you use only no hidden payment or adds on cost.
+ The maximum payment you will pay is TZS 150,000 ( $65 ) and the minimum payment you will pay is TZS 17,000 ( $7 )
+
+
+
+
+
Total Products
+
+
+
+
+
+
+
Total Items You Sale Per month
+
+
+
+
+
+
+
Total Items You Purchase Per month
+
+
+
+
+
+
+
+
+
+
+
+
+ Choose Currency
+
+ TZS
+ USD
+
+
+
+
+
+
+ Your Approximately Monthly Payment
+
{{monthlyCost() | currency: currencyFormControl.value + ' '}}
+
+
+
+
+
+
+
+
+
+
+
+
+ `,
+ styleUrls: ['../styles/landing.style.scss']
+})
+export class LandingPage implements OnInit {
+
+ constructor(private router: Router) {
+ }
+ currencyFormControl = new FormControl('TZS');
+ totalProducts = 1;
+ totalSales = 1;
+ totalPurchases = 1;
+
+
+
+ ngOnInit(): void {
+ }
+
+ login(): void {
+ this.router.navigateByUrl('login')
+ .catch(reason => {
+ console.log(reason.toString());
+ });
+ }
+
+
+ formatLabel(value: number): string {
+ if (value >= 1000) {
+ return Math.round(value / 1000) + 'k';
+ }
+
+ if (value === 99990) {
+ return '10k + ';
+ }
+ return value.toString();
+ }
+
+ monthlyCost(): number {
+ const actual = this.calculateBill(30, this.totalSales, this.totalPurchases, this.totalProducts, this.currencyFormControl.value);
+ const maxmunMonthlyCost = this.currencyFormControl.value === 'TZS' ? 150000 : 65;
+ const minimumMonthlyCost = this.currencyFormControl.value === 'TZS' ? 17000 : 7;
+ if (actual > maxmunMonthlyCost) {
+ return maxmunMonthlyCost;
+ } else if (actual < minimumMonthlyCost) {
+ return minimumMonthlyCost;
+ } else {
+ return actual;
+ }
+ }
+
+ actualMonthlyCost() {
+ return this.calculateBill(30, this.totalSales, this.totalPurchases, this.totalProducts, this.currencyFormControl.value);
+ }
+
+ discount(): number {
+ const actual = this.calculateBill(30, this.totalSales, this.totalPurchases, this.totalProducts, this.currencyFormControl.value);
+ const maxmun = this.currencyFormControl.value === 'TZS' ? 23000 : 10;
+ if (actual > maxmun) {
+ return actual - maxmun;
+ } else {
+ return 0;
+ }
+ }
+
+ calculateBill(days: number, soldItems: number, purchaseItems: number, products: number, currency: 'USD' | 'TZS'): number {
+ const exRate = currency === 'TZS' ? 2300 : 1;
+ const salesCost = 0.000133333 * days * exRate * soldItems;
+ const purchaseCost = 0.0004 * days * exRate * purchaseItems;
+ const stockCost = 0.0003 * days * exRate * products;
+ const analyticsCost = 0.01 * days * exRate;
+ return (salesCost + purchaseCost + stockCost + analyticsCost);
+ }
+}
diff --git a/projects/web/src/pages/privacy.page.ts b/projects/web/src/pages/privacy.page.ts
new file mode 100644
index 0000000..7d76d69
--- /dev/null
+++ b/projects/web/src/pages/privacy.page.ts
@@ -0,0 +1,58 @@
+import {Component, OnInit} from '@angular/core';
+
+@Component({
+ selector: 'smartstock-privacy',
+ template: `
+
+
+ SmartStock
+
+
+
+ Login
+
+ Register
+
+
+
+
Privacy Policy
+
Your privacy is important to us. It is Fahamu Tech's policy to respect your privacy regarding any information we
+ may collect from you across our website, http://smartstock.co.tz , and other
+ sites and desktop application we own and operate.
+
We only ask for personal information when we truly need it to provide a service to you. We collect it by fair and
+ lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be
+ used.
+
We only retain collected information for as long as necessary to provide you with your requested service. What
+ data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as
+ unauthorized access, disclosure, copying, use or modification.
+
We don’t share any personally identifying information publicly or with third-parties, except when required to by
+ law.
+
Our website may link to external sites that are not operated by us. Please be aware that we have no control over
+ the content and practices of these sites, and cannot accept responsibility or liability for their respective
+ privacy policies.
+
You are free to refuse our request for your personal information, with the understanding that we may be unable to
+ provide you with some of your desired services.
+
Your continued use of our website will be regarded as acceptance of our practices around privacy and personal
+ information. If you have any questions about how we handle user data and personal information, feel free to
+ contact us.
+
This policy is effective as of 19 February 2020.
+
+
+
+
+ `,
+ styleUrls: ['../styles/privacy.style.scss']
+})
+export class PrivacyPageComponent implements OnInit {
+
+ constructor() {
+ }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/projects/web/src/public-api.ts b/projects/web/src/public-api.ts
index 67ae636..a466190 100644
--- a/projects/web/src/public-api.ts
+++ b/projects/web/src/public-api.ts
@@ -2,6 +2,4 @@
* Public API Surface of web
*/
-export * from './lib/web.service';
-export * from './lib/web.component';
-export * from './lib/web.module';
+export * from './web.module';
diff --git a/projects/web/src/specs/footer.component.spec.ts b/projects/web/src/specs/footer.component.spec.ts
new file mode 100644
index 0000000..71293cb
--- /dev/null
+++ b/projects/web/src/specs/footer.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { FooterComponent } from '../componets/footer.component';
+
+describe('FooterComponent', () => {
+ let component: FooterComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ FooterComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(FooterComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/projects/web/src/specs/landing.page.spec.ts b/projects/web/src/specs/landing.page.spec.ts
new file mode 100644
index 0000000..ff86832
--- /dev/null
+++ b/projects/web/src/specs/landing.page.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LandingPage } from '../pages/landing.page';
+
+describe('LandingComponent', () => {
+ let component: LandingPage;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ LandingPage ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(LandingPage);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/projects/web/src/specs/privacy.page.spec.ts b/projects/web/src/specs/privacy.page.spec.ts
new file mode 100644
index 0000000..3cc7e93
--- /dev/null
+++ b/projects/web/src/specs/privacy.page.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PrivacyPageComponent } from '../pages/privacy.page';
+
+describe('PrivancyComponent', () => {
+ let component: PrivacyPageComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PrivacyPageComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PrivacyPageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/projects/web/src/styles/footer.style.scss b/projects/web/src/styles/footer.style.scss
new file mode 100644
index 0000000..b720136
--- /dev/null
+++ b/projects/web/src/styles/footer.style.scss
@@ -0,0 +1,26 @@
+.foo {
+ background-color: #fff;
+ margin-bottom: 48px;
+ /*margin: 100 px 0 0 0;*/
+}
+
+.top-box {
+ height: 200px;
+ padding: 0 50px;
+ margin: 0;
+}
+
+.top-box div {
+ margin: auto 0;
+}
+
+.bottom-box {
+ margin: 0;
+ padding: 20px 50px;
+ background-color: #ffffff;
+}
+
+a {
+ text-decoration: none;
+ color: #000000;
+}
diff --git a/projects/web/src/styles/landing.style.scss b/projects/web/src/styles/landing.style.scss
new file mode 100644
index 0000000..f5ba3c9
--- /dev/null
+++ b/projects/web/src/styles/landing.style.scss
@@ -0,0 +1,129 @@
+/*#header {*/
+/* height: 100vh;*/
+/* margin-top: 0;*/
+/* background-image: url("../../assets/img/ssmbg.jpeg");*/
+/* background-size: cover;*/
+/* background-repeat: no-repeat;*/
+/*}*/
+
+.header {
+ width: 100%;
+ height: 70vh;
+ padding: 0 50px;
+ background: url("../../../web-mock/src/assets/img/header.png") no-repeat center;
+ background-size: cover;
+ color: white;
+ background-color: #0b2e13;
+}
+
+mat-toolbar {
+ background: none;
+}
+
+a {
+ text-decoration: none;
+ padding: 0 10px;
+ color: white;
+}
+
+.link {
+ font-size: 16px;
+ font-weight: 500;
+}
+
+.header-jumbo {
+ /*margin-top: 20%;*/
+}
+
+.header-btn {
+ /*margin-left: 10px;*/
+ margin-bottom: 5px;
+ padding: 15px;
+ font-weight: 500;
+ font-size: 24px;
+ background: #00AA07;
+ border-color: #00AA07;
+ border-radius: 6px;
+}
+
+.header-btn-secondary {
+ /*margin-left: 10px;*/
+ margin-bottom: 5px;
+ padding: 15px;
+ font-weight: 500;
+ font-size: 24px;
+ /*background: #00AA07;*/
+ border: solid #00AA07;
+ border-radius: 6px;
+}
+
+
+.why-smartstock {
+ margin: 30px 50px 20px 50px;
+}
+
+.why-smartstock div {
+ margin: 10px auto 20px auto;
+}
+
+.why-smartstock img {
+ padding: 20px;
+ margin-bottom: 10px;
+ border-color: #00AA07;
+ border-style: solid;
+ border-radius: 7px;
+}
+
+.sale-on-go img {
+ margin: 0;
+ border-radius: 0 50px 0 0;
+ padding: 0;
+}
+
+
+.sale-on-go .right-box {
+ margin: 50px auto;
+}
+
+
+.testmon-container {
+ align-content: center;
+ margin: 50px 10% 50px 5%;
+}
+
+.testmon-info {
+ margin: 20px auto;
+}
+
+.details {
+ margin: 40px;
+ color: #939393;
+ font-size: 20px;
+}
+
+.testmon-info button {
+ background-color: #00AA07;
+ color: #ffffff;
+ padding: 10px 60px 0 60px;
+}
+
+mat-carousel ::ng-deep mat-icon {
+ font-size: 50px !important;
+ color: #1b1e21;
+}
+
+mat-card-subtitle{
+ margin-bottom: 8px !important;
+}
+
+
+/*.pricingInput{*/
+/* width: 80px;*/
+/* outline: solid #0b2e13;*/
+/* background-color: #0b2e1325;*/
+/* box-shadow: none;*/
+/*}*/
+
+/*.pricingInput:focus{*/
+/* outline: none;*/
+/*}*/
diff --git a/projects/web-mock/src/app/app.component.scss b/projects/web/src/styles/privacy.style.scss
similarity index 100%
rename from projects/web-mock/src/app/app.component.scss
rename to projects/web/src/styles/privacy.style.scss
diff --git a/projects/web/src/web.module.ts b/projects/web/src/web.module.ts
new file mode 100644
index 0000000..d04589f
--- /dev/null
+++ b/projects/web/src/web.module.ts
@@ -0,0 +1,54 @@
+import {NgModule} from '@angular/core';
+import {CommonModule} from '@angular/common';
+import {LandingPage} from './pages/landing.page';
+import {FooterComponent} from './componets/footer.component';
+import {PrivacyPageComponent} from './pages/privacy.page';
+import {RouterModule, ROUTES, Routes} from '@angular/router';
+import {MatDividerModule} from '@angular/material/divider';
+import {FormsModule, ReactiveFormsModule} from '@angular/forms';
+import {MatCardModule} from '@angular/material/card';
+import {MatSliderModule} from '@angular/material/slider';
+import {MatOptionModule} from '@angular/material/core';
+import {MatSelectModule} from '@angular/material/select';
+import {BrowserPlatformGuard} from './guards/browser-platform.guard';
+import {MatButtonModule} from '@angular/material/button';
+
+const routes: Routes = [
+ {
+ path: '', canActivate: [BrowserPlatformGuard], component: LandingPage
+ },
+ {
+ path: 'privacy', canActivate: [BrowserPlatformGuard], component: PrivacyPageComponent
+ },
+];
+
+@NgModule({
+ declarations: [
+ LandingPage,
+ FooterComponent,
+ PrivacyPageComponent
+ ],
+ imports: [
+ CommonModule,
+ {
+ providers: [
+ {
+ multi: true,
+ provide: ROUTES,
+ useValue: routes
+ }
+ ],
+ ngModule: RouterModule
+ },
+ MatDividerModule,
+ FormsModule,
+ MatCardModule,
+ MatSliderModule,
+ MatOptionModule,
+ MatSelectModule,
+ ReactiveFormsModule,
+ MatButtonModule
+ ],
+})
+export class WebModule {
+}
diff --git a/projects/web/tslint.json b/projects/web/tslint.json
index 124133f..37bb676 100644
--- a/projects/web/tslint.json
+++ b/projects/web/tslint.json
@@ -11,6 +11,7 @@
true,
"element",
"lib",
+ "smartstock",
"kebab-case"
]
}
diff --git a/tslint.json b/tslint.json
index 733008b..1bb7166 100644
--- a/tslint.json
+++ b/tslint.json
@@ -121,7 +121,7 @@
"check-typecast"
]
},
- "component-class-suffix": true,
+ "component-class-suffix": false,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"no-conflicting-lifecycle": true,