diff --git a/package-lock.json b/package-lock.json index 60e53e0..9ec0807 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "0.0.1", "dependencies": { "@angular/animations": "^16.0.0", - "@angular/cdk": "^16.2.10", "@angular/common": "^16.0.0", "@angular/compiler": "^16.0.0", "@angular/core": "^16.2.11", @@ -23,6 +22,7 @@ "@capacitor/haptics": "5.0.6", "@capacitor/keyboard": "5.0.6", "@capacitor/status-bar": "5.0.6", + "@ionic-native/app-version": "^5.0.0", "@ionic-native/core": "^5.0.0", "@ionic/angular": "^7.5.2", "@ionic/cordova-builders": "^10.0.0", @@ -50,6 +50,7 @@ "@typescript-eslint/eslint-plugin": "5.3.0", "@typescript-eslint/parser": "5.3.0", "cordova-android": "^12.0.1", + "cordova-plugin-app-version": "^0.1.14", "cordova-plugin-camera": "^7.0.0", "cordova-plugin-device": "2.0.2", "cordova-plugin-ionic-keyboard": "^2.0.5", @@ -486,6 +487,7 @@ "version": "16.2.10", "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-16.2.10.tgz", "integrity": "sha512-kOQrPxSMPi66aM9XfwZIjQXhH+q0PkhK4BNMHB9RkvaaQ34ovOrKaGsT7t0+sjlVhiwTiy2mB1Qgz6NlIB0ZZw==", + "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -503,6 +505,7 @@ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "optional": true, + "peer": true, "dependencies": { "entities": "^4.4.0" }, @@ -3193,6 +3196,18 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@ionic-native/app-version": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@ionic-native/app-version/-/app-version-5.0.0.tgz", + "integrity": "sha512-/ZKMaKaFsoDYTzBX+ZTapIGiG3WUGBHwfnKXpIPYpNvILoEquKXDi2830en+/ZnsBTYJOHhJo4KUCSuzgj/fzA==", + "dependencies": { + "@types/cordova": "latest" + }, + "peerDependencies": { + "@ionic-native/core": "5.0.0", + "rxjs": "*" + } + }, "node_modules/@ionic-native/core": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-5.0.0.tgz", @@ -7710,6 +7725,12 @@ "node": ">=8" } }, + "node_modules/cordova-plugin-app-version": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/cordova-plugin-app-version/-/cordova-plugin-app-version-0.1.14.tgz", + "integrity": "sha512-HN6Yz6IIdRO+iMvCHN/qMe8/O4miOpHH/pDtWNjIYTjV3MzP+XdzFJoFnq2zxlNNXFz0Zn8REGQhFY77vV4AWQ==", + "dev": true + }, "node_modules/cordova-plugin-camera": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cordova-plugin-camera/-/cordova-plugin-camera-7.0.0.tgz", @@ -18318,6 +18339,7 @@ "version": "16.2.10", "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-16.2.10.tgz", "integrity": "sha512-kOQrPxSMPi66aM9XfwZIjQXhH+q0PkhK4BNMHB9RkvaaQ34ovOrKaGsT7t0+sjlVhiwTiy2mB1Qgz6NlIB0ZZw==", + "peer": true, "requires": { "parse5": "^7.1.2", "tslib": "^2.3.0" @@ -18328,6 +18350,7 @@ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "optional": true, + "peer": true, "requires": { "entities": "^4.4.0" } @@ -20096,6 +20119,14 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@ionic-native/app-version": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@ionic-native/app-version/-/app-version-5.0.0.tgz", + "integrity": "sha512-/ZKMaKaFsoDYTzBX+ZTapIGiG3WUGBHwfnKXpIPYpNvILoEquKXDi2830en+/ZnsBTYJOHhJo4KUCSuzgj/fzA==", + "requires": { + "@types/cordova": "latest" + } + }, "@ionic-native/core": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-5.0.0.tgz", @@ -23617,6 +23648,12 @@ } } }, + "cordova-plugin-app-version": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/cordova-plugin-app-version/-/cordova-plugin-app-version-0.1.14.tgz", + "integrity": "sha512-HN6Yz6IIdRO+iMvCHN/qMe8/O4miOpHH/pDtWNjIYTjV3MzP+XdzFJoFnq2zxlNNXFz0Zn8REGQhFY77vV4AWQ==", + "dev": true + }, "cordova-plugin-camera": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cordova-plugin-camera/-/cordova-plugin-camera-7.0.0.tgz", diff --git a/package.json b/package.json index f661f3c..dde4d01 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "private": true, "dependencies": { "@angular/animations": "^16.0.0", - "@angular/cdk": "^16.2.10", "@angular/common": "^16.0.0", "@angular/compiler": "^16.0.0", "@angular/core": "^16.2.11", @@ -28,6 +27,7 @@ "@capacitor/haptics": "5.0.6", "@capacitor/keyboard": "5.0.6", "@capacitor/status-bar": "5.0.6", + "@ionic-native/app-version": "^5.0.0", "@ionic-native/core": "^5.0.0", "@ionic/angular": "^7.5.2", "@ionic/cordova-builders": "^10.0.0", @@ -55,6 +55,7 @@ "@typescript-eslint/eslint-plugin": "5.3.0", "@typescript-eslint/parser": "5.3.0", "cordova-android": "^12.0.1", + "cordova-plugin-app-version": "^0.1.14", "cordova-plugin-camera": "^7.0.0", "cordova-plugin-device": "2.0.2", "cordova-plugin-ionic-keyboard": "^2.0.5", @@ -88,7 +89,8 @@ "cordova-plugin-camera": { "ANDROIDX_CORE_VERSION": "1.6.+" }, - "cordova-plugin-network-information": {} + "cordova-plugin-network-information": {}, + "cordova-plugin-app-version": {} }, "platforms": [ "android" diff --git a/resources/README.md b/resources/README.md old mode 100644 new mode 100755 diff --git a/resources/android/icon/drawable-hdpi-icon.png b/resources/android/icon/drawable-hdpi-icon.png old mode 100644 new mode 100755 index c9566df..f6ab56d Binary files a/resources/android/icon/drawable-hdpi-icon.png and b/resources/android/icon/drawable-hdpi-icon.png differ diff --git a/resources/android/icon/drawable-ldpi-icon.png b/resources/android/icon/drawable-ldpi-icon.png old mode 100644 new mode 100755 index f1b76d0..1dce81d Binary files a/resources/android/icon/drawable-ldpi-icon.png and b/resources/android/icon/drawable-ldpi-icon.png differ diff --git a/resources/android/icon/drawable-mdpi-icon.png b/resources/android/icon/drawable-mdpi-icon.png old mode 100644 new mode 100755 index 20686b2..149d371 Binary files a/resources/android/icon/drawable-mdpi-icon.png and b/resources/android/icon/drawable-mdpi-icon.png differ diff --git a/resources/android/icon/drawable-xhdpi-icon.png b/resources/android/icon/drawable-xhdpi-icon.png old mode 100644 new mode 100755 index a8b940d..31737b6 Binary files a/resources/android/icon/drawable-xhdpi-icon.png and b/resources/android/icon/drawable-xhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxhdpi-icon.png b/resources/android/icon/drawable-xxhdpi-icon.png old mode 100644 new mode 100755 index 0707fa8..d693731 Binary files a/resources/android/icon/drawable-xxhdpi-icon.png and b/resources/android/icon/drawable-xxhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxxhdpi-icon.png b/resources/android/icon/drawable-xxxhdpi-icon.png old mode 100644 new mode 100755 index d7b5a50..a604957 Binary files a/resources/android/icon/drawable-xxxhdpi-icon.png and b/resources/android/icon/drawable-xxxhdpi-icon.png differ diff --git a/resources/android/splash/drawable-land-hdpi-screen.png b/resources/android/splash/drawable-land-hdpi-screen.png old mode 100644 new mode 100755 index 3f2fd84..64144a1 Binary files a/resources/android/splash/drawable-land-hdpi-screen.png and b/resources/android/splash/drawable-land-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-ldpi-screen.png b/resources/android/splash/drawable-land-ldpi-screen.png old mode 100644 new mode 100755 index db2516d..71cac15 Binary files a/resources/android/splash/drawable-land-ldpi-screen.png and b/resources/android/splash/drawable-land-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-land-mdpi-screen.png b/resources/android/splash/drawable-land-mdpi-screen.png old mode 100644 new mode 100755 index 822d8b3..4386eaa Binary files a/resources/android/splash/drawable-land-mdpi-screen.png and b/resources/android/splash/drawable-land-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xhdpi-screen.png b/resources/android/splash/drawable-land-xhdpi-screen.png old mode 100644 new mode 100755 index 731e895..1bd46fb Binary files a/resources/android/splash/drawable-land-xhdpi-screen.png and b/resources/android/splash/drawable-land-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxhdpi-screen.png b/resources/android/splash/drawable-land-xxhdpi-screen.png old mode 100644 new mode 100755 index aeb0c64..3d892c2 Binary files a/resources/android/splash/drawable-land-xxhdpi-screen.png and b/resources/android/splash/drawable-land-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxxhdpi-screen.png b/resources/android/splash/drawable-land-xxxhdpi-screen.png old mode 100644 new mode 100755 index 9c9f2f5..948f2ed Binary files a/resources/android/splash/drawable-land-xxxhdpi-screen.png and b/resources/android/splash/drawable-land-xxxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-hdpi-screen.png b/resources/android/splash/drawable-port-hdpi-screen.png old mode 100644 new mode 100755 index 83d6d25..30f5021 Binary files a/resources/android/splash/drawable-port-hdpi-screen.png and b/resources/android/splash/drawable-port-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-ldpi-screen.png b/resources/android/splash/drawable-port-ldpi-screen.png old mode 100644 new mode 100755 index 2cddf74..973ff67 Binary files a/resources/android/splash/drawable-port-ldpi-screen.png and b/resources/android/splash/drawable-port-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-port-mdpi-screen.png b/resources/android/splash/drawable-port-mdpi-screen.png old mode 100644 new mode 100755 index e34912e..e3ffcf2 Binary files a/resources/android/splash/drawable-port-mdpi-screen.png and b/resources/android/splash/drawable-port-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xhdpi-screen.png b/resources/android/splash/drawable-port-xhdpi-screen.png old mode 100644 new mode 100755 index cb90273..c17a11b Binary files a/resources/android/splash/drawable-port-xhdpi-screen.png and b/resources/android/splash/drawable-port-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxhdpi-screen.png b/resources/android/splash/drawable-port-xxhdpi-screen.png old mode 100644 new mode 100755 index a05426e..9a51484 Binary files a/resources/android/splash/drawable-port-xxhdpi-screen.png and b/resources/android/splash/drawable-port-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxxhdpi-screen.png b/resources/android/splash/drawable-port-xxxhdpi-screen.png old mode 100644 new mode 100755 index adb9ae6..f036933 Binary files a/resources/android/splash/drawable-port-xxxhdpi-screen.png and b/resources/android/splash/drawable-port-xxxhdpi-screen.png differ diff --git a/resources/icon.png b/resources/icon.png old mode 100644 new mode 100755 index bee7766..b7d92cf Binary files a/resources/icon.png and b/resources/icon.png differ diff --git a/resources/icon.png.md5 b/resources/icon.png.md5 new file mode 100755 index 0000000..b6fed49 --- /dev/null +++ b/resources/icon.png.md5 @@ -0,0 +1 @@ +2aeb4d7c6908a4397252ab8661c42e50 \ No newline at end of file diff --git a/resources/ios/icon/icon-1024.png b/resources/ios/icon/icon-1024.png old mode 100644 new mode 100755 index be633f4..bee7766 Binary files a/resources/ios/icon/icon-1024.png and b/resources/ios/icon/icon-1024.png differ diff --git a/resources/ios/icon/icon-40.png b/resources/ios/icon/icon-40.png old mode 100644 new mode 100755 index acbecd2..76cc53c Binary files a/resources/ios/icon/icon-40.png and b/resources/ios/icon/icon-40.png differ diff --git a/resources/ios/icon/icon-40@2x.png b/resources/ios/icon/icon-40@2x.png old mode 100644 new mode 100755 index 61d82a7..64b4906 Binary files a/resources/ios/icon/icon-40@2x.png and b/resources/ios/icon/icon-40@2x.png differ diff --git a/resources/ios/icon/icon-40@3x.png b/resources/ios/icon/icon-40@3x.png old mode 100644 new mode 100755 index cc349de..9f8c8f0 Binary files a/resources/ios/icon/icon-40@3x.png and b/resources/ios/icon/icon-40@3x.png differ diff --git a/resources/ios/icon/icon-50.png b/resources/ios/icon/icon-50.png old mode 100644 new mode 100755 index 9e9a5c1..8bd51df Binary files a/resources/ios/icon/icon-50.png and b/resources/ios/icon/icon-50.png differ diff --git a/resources/ios/icon/icon-50@2x.png b/resources/ios/icon/icon-50@2x.png old mode 100644 new mode 100755 index fe547b1..2676f8f Binary files a/resources/ios/icon/icon-50@2x.png and b/resources/ios/icon/icon-50@2x.png differ diff --git a/resources/ios/icon/icon-60.png b/resources/ios/icon/icon-60.png old mode 100644 new mode 100755 index 00de715..11f3912 Binary files a/resources/ios/icon/icon-60.png and b/resources/ios/icon/icon-60.png differ diff --git a/resources/ios/icon/icon-60@2x.png b/resources/ios/icon/icon-60@2x.png old mode 100644 new mode 100755 index cc349de..b521048 Binary files a/resources/ios/icon/icon-60@2x.png and b/resources/ios/icon/icon-60@2x.png differ diff --git a/resources/ios/icon/icon-60@3x.png b/resources/ios/icon/icon-60@3x.png old mode 100644 new mode 100755 index 3898828..dbc8303 Binary files a/resources/ios/icon/icon-60@3x.png and b/resources/ios/icon/icon-60@3x.png differ diff --git a/resources/ios/icon/icon-72.png b/resources/ios/icon/icon-72.png old mode 100644 new mode 100755 index 3f84fc1..4e5a827 Binary files a/resources/ios/icon/icon-72.png and b/resources/ios/icon/icon-72.png differ diff --git a/resources/ios/icon/icon-72@2x.png b/resources/ios/icon/icon-72@2x.png old mode 100644 new mode 100755 index 391b4af..56fb29e Binary files a/resources/ios/icon/icon-72@2x.png and b/resources/ios/icon/icon-72@2x.png differ diff --git a/resources/ios/icon/icon-76.png b/resources/ios/icon/icon-76.png old mode 100644 new mode 100755 index 971034a..e66a90e Binary files a/resources/ios/icon/icon-76.png and b/resources/ios/icon/icon-76.png differ diff --git a/resources/ios/icon/icon-76@2x.png b/resources/ios/icon/icon-76@2x.png old mode 100644 new mode 100755 index b538930..3f5c942 Binary files a/resources/ios/icon/icon-76@2x.png and b/resources/ios/icon/icon-76@2x.png differ diff --git a/resources/ios/icon/icon-83.5@2x.png b/resources/ios/icon/icon-83.5@2x.png old mode 100644 new mode 100755 index 5f8dbb2..2b367cb Binary files a/resources/ios/icon/icon-83.5@2x.png and b/resources/ios/icon/icon-83.5@2x.png differ diff --git a/resources/ios/icon/icon-small.png b/resources/ios/icon/icon-small.png old mode 100644 new mode 100755 index 8a55da5..de3146d Binary files a/resources/ios/icon/icon-small.png and b/resources/ios/icon/icon-small.png differ diff --git a/resources/ios/icon/icon-small@2x.png b/resources/ios/icon/icon-small@2x.png old mode 100644 new mode 100755 index 185277b..916a02e Binary files a/resources/ios/icon/icon-small@2x.png and b/resources/ios/icon/icon-small@2x.png differ diff --git a/resources/ios/icon/icon-small@3x.png b/resources/ios/icon/icon-small@3x.png old mode 100644 new mode 100755 index 3393f84..0efa99d Binary files a/resources/ios/icon/icon-small@3x.png and b/resources/ios/icon/icon-small@3x.png differ diff --git a/resources/ios/icon/icon.png b/resources/ios/icon/icon.png old mode 100644 new mode 100755 index a90d46c..89f8c00 Binary files a/resources/ios/icon/icon.png and b/resources/ios/icon/icon.png differ diff --git a/resources/ios/icon/icon@2x.png b/resources/ios/icon/icon@2x.png old mode 100644 new mode 100755 index 946c6ce..a6687a1 Binary files a/resources/ios/icon/icon@2x.png and b/resources/ios/icon/icon@2x.png differ diff --git a/resources/ios/splash/Default-568h@2x~iphone.png b/resources/ios/splash/Default-568h@2x~iphone.png old mode 100644 new mode 100755 index 5e9edf6..d2128a6 Binary files a/resources/ios/splash/Default-568h@2x~iphone.png and b/resources/ios/splash/Default-568h@2x~iphone.png differ diff --git a/resources/ios/splash/Default-667h.png b/resources/ios/splash/Default-667h.png old mode 100644 new mode 100755 index 2843fb3..fc23e64 Binary files a/resources/ios/splash/Default-667h.png and b/resources/ios/splash/Default-667h.png differ diff --git a/resources/ios/splash/Default-736h.png b/resources/ios/splash/Default-736h.png old mode 100644 new mode 100755 index 21f2d42..71b16ca Binary files a/resources/ios/splash/Default-736h.png and b/resources/ios/splash/Default-736h.png differ diff --git a/resources/ios/splash/Default-Landscape-736h.png b/resources/ios/splash/Default-Landscape-736h.png old mode 100644 new mode 100755 index 9c069f7..aaff74a Binary files a/resources/ios/splash/Default-Landscape-736h.png and b/resources/ios/splash/Default-Landscape-736h.png differ diff --git a/resources/ios/splash/Default-Landscape@2x~ipad.png b/resources/ios/splash/Default-Landscape@2x~ipad.png old mode 100644 new mode 100755 index 35407a9..19770a2 Binary files a/resources/ios/splash/Default-Landscape@2x~ipad.png and b/resources/ios/splash/Default-Landscape@2x~ipad.png differ diff --git a/resources/ios/splash/Default-Landscape@~ipadpro.png b/resources/ios/splash/Default-Landscape@~ipadpro.png old mode 100644 new mode 100755 index 75de9e0..6438232 Binary files a/resources/ios/splash/Default-Landscape@~ipadpro.png and b/resources/ios/splash/Default-Landscape@~ipadpro.png differ diff --git a/resources/ios/splash/Default-Landscape~ipad.png b/resources/ios/splash/Default-Landscape~ipad.png old mode 100644 new mode 100755 index b74bbf6..6fe8925 Binary files a/resources/ios/splash/Default-Landscape~ipad.png and b/resources/ios/splash/Default-Landscape~ipad.png differ diff --git a/resources/ios/splash/Default-Portrait@2x~ipad.png b/resources/ios/splash/Default-Portrait@2x~ipad.png old mode 100644 new mode 100755 index d0c33f7..3d06d86 Binary files a/resources/ios/splash/Default-Portrait@2x~ipad.png and b/resources/ios/splash/Default-Portrait@2x~ipad.png differ diff --git a/resources/ios/splash/Default-Portrait@~ipadpro.png b/resources/ios/splash/Default-Portrait@~ipadpro.png old mode 100644 new mode 100755 index 363dd1c..a370419 Binary files a/resources/ios/splash/Default-Portrait@~ipadpro.png and b/resources/ios/splash/Default-Portrait@~ipadpro.png differ diff --git a/resources/ios/splash/Default-Portrait~ipad.png b/resources/ios/splash/Default-Portrait~ipad.png old mode 100644 new mode 100755 index aad1deb..53ad4c4 Binary files a/resources/ios/splash/Default-Portrait~ipad.png and b/resources/ios/splash/Default-Portrait~ipad.png differ diff --git a/resources/ios/splash/Default@2x~iphone.png b/resources/ios/splash/Default@2x~iphone.png old mode 100644 new mode 100755 index f0f16ef..6a13316 Binary files a/resources/ios/splash/Default@2x~iphone.png and b/resources/ios/splash/Default@2x~iphone.png differ diff --git a/resources/ios/splash/Default@2x~universal~anyany.png b/resources/ios/splash/Default@2x~universal~anyany.png old mode 100644 new mode 100755 index c8fcc8f..960cb82 Binary files a/resources/ios/splash/Default@2x~universal~anyany.png and b/resources/ios/splash/Default@2x~universal~anyany.png differ diff --git a/resources/ios/splash/Default~iphone.png b/resources/ios/splash/Default~iphone.png old mode 100644 new mode 100755 index e5129fd..0aaad62 Binary files a/resources/ios/splash/Default~iphone.png and b/resources/ios/splash/Default~iphone.png differ diff --git a/resources/splash.png b/resources/splash.png old mode 100644 new mode 100755 index 960cb82..cac99c2 Binary files a/resources/splash.png and b/resources/splash.png differ diff --git a/resources/splash.png.md5 b/resources/splash.png.md5 new file mode 100755 index 0000000..c7eacfa --- /dev/null +++ b/resources/splash.png.md5 @@ -0,0 +1 @@ +50007304f4721190957196d17b2ae952 \ No newline at end of file diff --git a/src/app/app.component.html b/src/app/app.component.html index 3fd9ace..484f95e 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -13,7 +13,7 @@ - + diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 0aeb6fe..41a7d9e 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -116,4 +116,8 @@ ion-note { ion-item.selected { --color: var(--ion-color-primary); -} \ No newline at end of file +} + +// @import "theme/filter-modal"; + +@import '../theme/filter-modal.scss' \ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 724e1d7..43a4138 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -6,13 +6,201 @@ import { Component } from '@angular/core'; }) export class AppComponent { public appPages = [ - { title: 'Inbox', url: '/folder/inbox', icon: 'mail' }, - { title: 'Outbox', url: '/folder/outbox', icon: 'paper-plane' }, - { title: 'Favorites', url: '/folder/favorites', icon: 'heart' }, - { title: 'Archived', url: '/folder/archived', icon: 'archive' }, - { title: 'Trash', url: '/folder/trash', icon: 'trash' }, - { title: 'Spam', url: '/folder/spam', icon: 'warning' }, + { title: ' ', url: '/folder/inbox', icon: '' }, + { title: ' ', url: '/folder/outbox', icon: '' }, + { title: ' ', url: '/folder/favorites', icon: '' }, + { title: ' ', url: '/folder/archived', icon: '' }, + { title: ' ', url: '/folder/trash', icon: '' }, + { title: ' ', url: '/folder/spam', icon: '' }, ]; - public labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders']; + public labels = [' ', ' ', ' ', ' ', ' ', ' ']; constructor() {} } + + + +// import { Component } from '@angular/core'; +// import { AlertController, NavController, Platform } from '@ionic/angular'; +// import { environment } from 'src/environments/environment'; +// import { PdtriggerService } from 'src/providers/pdtrigger/pdtrigger.service'; +// import { LoginComponent } from './authencation/login/login.component'; +// import { PinLockComponent } from './authencation/pin-lock/pin-lock.component'; +// import { AuthService } from './authencation/auth-service/auth.service'; +// import { CognitoService } from './authencation/auth-service/cognito.service'; +// import { AppVersion } from '@ionic-native/app-version/ngx' + +// @Component({ +// selector: 'app-root', +// templateUrl: 'app.component.html', +// styleUrls: ['app.component.scss'], +// }) + +// export class AppComponent { + +// pages: { title: string; icon: string; method: () => any; }[]; +// private env = environment +// protected app_version: any; +// rootPage: any = LoginComponent; +// userDetails: any = []; +// userAccess:boolean = false; + +// constructor(public platform: Platform,private nav: NavController, public statusBar: StatusBar,public aws:AuthService,public shared:CognitoService,public alertCtrl:AlertController,private appVersionProvide:AppVersion,private events:Events,private pdtrigger:PdtriggerService) { +// this.initializeApp(); +// // this.changeDecision(); + +// // used for an example of ngFor and navigation +// this.pages = [ +// // { title: 'Home', component: HomePage, icon: 'home' }, +// { title: 'Home', icon: 'home',method:()=>this.menulist(1) }, +// { title: 'Logout', icon: 'md-exit',method:()=>this.menulist(2)} +// ]; + +// } +// initializeApp() { +// this.platform.ready().then(() => { +// this.statusBar.styleDefault(); +// this.appVersionProvide.getVersionNumber().then((version_number: any) => { +// console.log("version number", version_number); +// this.app_version = version_number; +// }).catch((err:any) => { +// console.log("Version Error", err); +// }); + +// if (this.platform.is('android')) { +// this.statusBar.overlaysWebView(false); +// this.statusBar.backgroundColorByHexString('#E00201'); +// } + +// this.shared.getAccessToken().then(() => { +// this.getuserDetails(); +// // this.getCommonSettings(); +// this.rootPage = PinLockComponent; +// }).catch(() => { +// setTimeout(() => { +// this.rootPage = LoginComponent; +// }, 1000); +// }); + +// // this.networkDetection(); +// }); + +// this.platform.registerBackButtonAction(() => { +// if (this.nav.length() === 1) { +// if (!this.alertShown) { +// let alert = this.alertCtrl.create({ +// title: 'Confirm Exit', +// message: 'Do You Want to Exit?', +// buttons: [ +// { +// text: 'Cancel', +// role: 'cancel', +// handler: () => { +// console.log("Cancel clicked"); +// this.alertShown = false; +// } +// }, +// { +// text: 'Yes', +// handler: () => { +// console.log("Exit"); +// this.platform.exitApp(); +// } +// } +// ] +// }); +// alert.present(); +// this.alertShown = true; +// } +// } else { +// this.nav.pop(); +// } +// }); +// } + +// getuserDetails() +// { +// let userid = this.aws.getlocale(); +// console.log(userid); +// this.aws.getUserProfile(userid).subscribe(res=>{ +// this.userDetails = res; +// if(this.userDetails.dataStatus == true) +// { +// this.userAccess = true; +// this.userDetails = this.userDetails.records[0]; +// this.events.publish('len_user_name',this.userDetails) +// localStorage.setItem("user_details",JSON.stringify( this.userDetails)); +// } + +// }); +// } + +// // getCommonSettings(){ +// // // getCommonConfig +// // this.pdtrigger.getCommonSettingsConfig().subscribe(res=>{ +// // this.commonDetails = res; +// // if(this.commonDetails.dataStatus == true){ +// // localStorage.setItem("commonSettings",JSON.stringify(this.commonDetails.records)); +// // } +// // }) +// // } + +// changeDecision(){ +// this.events.subscribe('len_user_name',(data:any)=>{ +// console.log("event data",data) +// this.userDetails=data +// this.userAccess=true; +// // if(data == 'MWISE'){ +// // this.pages.splice(-1,1) +// // this.pages=this.pages.filter(ele=>ele.title != 'Sales PD') +// // this.pages.push( { title :'Sales PD',icon:'list',method:()=>this.menulist(3)}, +// // { title: 'Logout', icon: 'md-exit',method:()=>this.menulist(2)}) +// // } +// // else{ +// // this.pages=this.pages.filter(ele=>ele.title != 'Sales PD') +// // } +// let role= this.aws.takeDecisionRouting(this.userDetails) +// if(role == 'sales'){ +// this.pages[0].method=()=>this.menulist(3) +// this.pages=this.pages.filter(ele=>ele.title != 'Sales PD' && ele.title != 'Credit PD') +// } +// else{ +// this.pages[0].method=()=>this.menulist(1) +// this.pages.splice(-1,1) +// this.pages=this.pages.filter(ele=>ele.title != 'Sales PD' && ele.title != 'Credit PD') +// this.pages.push( { title :'Sales PD',icon:'briefcase',method:()=>this.menulist(3)}, +// // { title :'Credit PD',icon:'list',method:()=>this.menulist(4)}, +// { title: 'Logout', icon: 'md-exit',method:()=>this.menulist(2)}) +// } +// }) +// } + + +// menulist(id: number): void { +// switch (id) { +// case 1: +// this.nav.navigateRoot('/pd-list'); // Use routing to navigate +// break; +// case 2: +// this.aws.logout().subscribe(() => { +// // this.salesPDService.clearLocalData(); +// localStorage.removeItem('product_id_salesPD'); +// localStorage.removeItem('sales_pd_type'); +// this.nav.navigateRoot('/login'); // Use routing to navigate +// }); +// break; +// case 3: +// this.nav.navigateRoot('/sales-pd-list'); // Use routing to navigate +// break; +// case 4: +// this.nav.navigateRoot('/credit-pd-list'); // Use routing to navigate +// break; +// } +// } + +// logout(){ +// // this.aws.logout(); +// this.nav.navigateRoot('/auth'); +// } + +// } + diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8be4076..e0c04f4 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -6,7 +6,7 @@ import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; -import { HttpClientModule } from '@angular/common/http'; +import { HttpClientModule, HTTP_INTERCEPTORS} from '@angular/common/http'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { AuthService } from './authencation/auth-service/auth.service'; @@ -14,7 +14,13 @@ import { CognitoService } from './authencation/auth-service/cognito.service'; import { PageModule } from './pages/page.module'; import { PageRoutingModule } from './pages/page-routing.module'; import { IonicStorageModule } from '@ionic/storage-angular'; - +import { ToastService } from 'src/providers/common-provider/toast.service'; +import { IonicStorageService } from 'src/providers/ionic-storage/ionic-storage.service'; +import { PdtriggerService } from 'src/providers/pdtrigger/pdtrigger.service'; +import { ReqTokenInterceptor } from 'src/providers/_guard/req-token.interceptor'; +import { SalesPdService } from './pages/providers/sales-pd/sales-pd.service'; +// import { AppVersion } from '@ionic-native/app-version/ngx' + @NgModule({ declarations: [AppComponent], imports: [ @@ -29,7 +35,13 @@ import { IonicStorageModule } from '@ionic/storage-angular'; PageRoutingModule, IonicStorageModule.forRoot(), ], - providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }], + providers: [SalesPdService,ReqTokenInterceptor,PdtriggerService,ToastService,IonicStorageService,AuthService,CognitoService,{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, + { + provide:HTTP_INTERCEPTORS, + useClass:ReqTokenInterceptor, + multi: true + }, + ], bootstrap: [AppComponent], }) export class AppModule {} diff --git a/src/app/authencation/auth-service/auth.service.ts b/src/app/authencation/auth-service/auth.service.ts index 87d4500..eeccb79 100644 --- a/src/app/authencation/auth-service/auth.service.ts +++ b/src/app/authencation/auth-service/auth.service.ts @@ -24,6 +24,7 @@ export class AuthService { takeDecisionRouting(userDetails:any){ + console.log(userDetails) let role_name=userDetails.role_name.toLowerCase() console.log("e",role_name) if(role_name.includes('sales')){ @@ -102,17 +103,30 @@ export class AuthService { } + + getlocale() { console.log('222'); - let session: any = this.shared.getToken() || null; - console.log(session, '222'); - let userid = ''; - if (session && session.idToken && session.idToken.payload && session.idToken.payload.locale) { - userid = session.idToken.payload.locale; - console.log(userid) + + // Your JWT token as a string + const token = this.shared.getToken(); + console.log(token) + + if (token) { + // Parse the JWT token string into a JSON object + const tokenPayload = JSON.parse(atob(token.split('.')[1])); + console.log(tokenPayload) + // Access the 'locale' property + const locale = tokenPayload.locale; + + console.log(locale); + + return locale; + } else { + console.log('JWT token is not available.'); + return ''; } - return userid; - } + } getUserProfile(userid: any): Observable { alert(); @@ -123,7 +137,7 @@ export class AuthService { return this.http.post(this.apiurl.url + 'getUsersDetails', roles) .pipe( map((result: any) => { - this.ionicStorageProvider.checkAndInsertApiDataLocally(result, { 'userid': userid }, 'getUsersDetails',''); + this.ionicStorageProvider.checkAndInsertApiDataLocally(result, { 'userid': userid }, 'getUsersDetails'); return result; }), catchError((error: any) => { diff --git a/src/app/authencation/auth-service/cognito.service.ts b/src/app/authencation/auth-service/cognito.service.ts index 887316e..c7093ef 100644 --- a/src/app/authencation/auth-service/cognito.service.ts +++ b/src/app/authencation/auth-service/cognito.service.ts @@ -131,7 +131,7 @@ export class CognitoService { console.log('User not logged in'); isLogging = false; } - + console.log(jwtToken) return jwtToken; } diff --git a/src/app/authencation/authencation.module.ts b/src/app/authencation/authencation.module.ts index 1dbad0b..7302e32 100644 --- a/src/app/authencation/authencation.module.ts +++ b/src/app/authencation/authencation.module.ts @@ -22,7 +22,7 @@ import { OtpComponent } from './otp/otp/otp.component'; IonicModule, AuthencationRoutingModule, ReactiveFormsModule, - IonicStorageModule + IonicStorageModule, ], declarations: [LoginComponent,PinLockComponent,PasswordComponent,OtpComponent], providers:[AuthService,CognitoService] diff --git a/src/app/authencation/login/login.component.html b/src/app/authencation/login/login.component.html index 3b1cb22..0fc599a 100644 --- a/src/app/authencation/login/login.component.html +++ b/src/app/authencation/login/login.component.html @@ -41,7 +41,7 @@ --> - +

Forgot Password?

Sign In diff --git a/src/app/authencation/login/login.component.scss b/src/app/authencation/login/login.component.scss index 00e05f7..7bd7bd1 100644 --- a/src/app/authencation/login/login.component.scss +++ b/src/app/authencation/login/login.component.scss @@ -1,3 +1,5 @@ +@import '../../../theme/filter-modal.scss'; + ::ng-deep .login-bg { --background: none; /* Set it to none to clear the background */ background: url('../../../assets/img/misc/login3.jpg') no-repeat center center fixed !important; @@ -97,4 +99,6 @@ ion-footer { } ::ng-deep .mdc-text-field--filled:not(.mdc-text-field--disabled) { background-color: unset !important; -} \ No newline at end of file +} + + \ No newline at end of file diff --git a/src/app/authencation/login/login.component.ts b/src/app/authencation/login/login.component.ts index 13537c4..d187a55 100644 --- a/src/app/authencation/login/login.component.ts +++ b/src/app/authencation/login/login.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; -import { LoadingController, MenuController, ModalController, NavController, NavParams } from '@ionic/angular'; +import { LoadingController, MenuController, ModalController, NavController } from '@ionic/angular'; import { AuthService } from '../auth-service/auth.service'; import { ActivatedRoute, Router } from '@angular/router'; import { PdtriggerService } from 'src/providers/pdtrigger/pdtrigger.service'; @@ -122,6 +122,7 @@ export class LoginComponent implements OnInit { if (this.forgetpin === 'true') { this.navCtrl.navigateRoot('/pin-lock', { queryParams: { resetpin: this.forgetpin } }); } else if (role === 'sales') { + console.log(console.log('sales')) this.pdtrigger.initiateMasterApis('sales'); this.navCtrl.navigateRoot('/sales-pd-list'); } else { @@ -132,8 +133,7 @@ export class LoginComponent implements OnInit { }); } -getCommonSettings(){ - +getCommonSettings(){ // getCommonConfig this.pdtrigger.getCommonSettingsConfig().subscribe(res=>{ this.commonDetails = res; @@ -161,7 +161,7 @@ getCommonSettings(){ const modal = await this.modalController.create({ component: OtpComponent, componentProps: { drop_down_datas: email }, - cssClass: 'optModal' + cssClass: 'small-popup-modal' }); await modal.present(); diff --git a/src/app/authencation/otp/otp/otp.component.html b/src/app/authencation/otp/otp/otp.component.html index 9b399b4..c74ea98 100644 --- a/src/app/authencation/otp/otp/otp.component.html +++ b/src/app/authencation/otp/otp/otp.component.html @@ -1,3 +1,30 @@ -

- otp works! -

+ + + OTP + + + + + + + + + + + + + + + + +

{{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }}

+
+ {{timeLeft == 0 ? 'Resend OTP' : timeLeft+' Seconds Left....' }} + +
+
+ +
+ +
+
\ No newline at end of file diff --git a/src/app/authencation/otp/otp/otp.component.scss b/src/app/authencation/otp/otp/otp.component.scss index e69de29..4d287a1 100644 --- a/src/app/authencation/otp/otp/otp.component.scss +++ b/src/app/authencation/otp/otp/otp.component.scss @@ -0,0 +1,24 @@ + @import '../../../../theme/filter-modal.scss'; + + + ::ng-deep .toolbar-background{ + --background: none; /* Set it to none to clear the background */ + border-color: #b2b2b2 ; + background: #fff !important; + + } + .toolbar-title-md{ + color: #fff !important; + } + + ::ng-deep .small-popup-modal { + --width: 82% !important; + --height: 38% !important; + --max-width: 52vh !important; + --max-height: 40vh !important; + --border-radius: 10px; + } + .mt{ + margin-top: 2rem; + } + \ No newline at end of file diff --git a/src/app/authencation/otp/otp/otp.component.ts b/src/app/authencation/otp/otp/otp.component.ts index 698743e..7107224 100644 --- a/src/app/authencation/otp/otp/otp.component.ts +++ b/src/app/authencation/otp/otp/otp.component.ts @@ -1,4 +1,8 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; +import { ModalController, NavController, NavParams } from '@ionic/angular'; +import { ToastService } from 'src/providers/common-provider/toast.service'; +import { AuthService } from '../../auth-service/auth.service'; +import { ViewController } from '@ionic/core'; @Component({ selector: 'app-otp', @@ -6,9 +10,68 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./otp.component.scss'], }) export class OtpComponent implements OnInit { + timeLeft: number = 0; + loggedEmailID:any=""; + interval; + drop_down_datas: any; + constructor(private modalController: ModalController,public toast:ToastService,public navCtrl: NavController, public navParams: NavParams,public aws: AuthService) { + this.timeLeft = 60; + this.interval = setInterval(() => { + if(this.timeLeft > 0) { + this.timeLeft--; + } else { + clearInterval(this.interval); + } + },1000) + } + ngOnInit() { + this.drop_down_datas = this.navParams.get('drop_down_datas'); + console.log(this.drop_down_datas); + } + updatepassword(otp:any){ + console.log('data'); + console.log(this.drop_down_datas,otp); + const mail = this.drop_down_datas.split(/\s/).join(''); + this.aws.resetpassword(mail,otp).subscribe(data => { + console.log('data'); + console.log(data) + if (data.status == 200) { + this.toast.lenderappmessage('Password Reset Successfully'); + // alert('Password Reset Successfully'); + // this.dialogRef.close(); + this.modalController.dismiss({ success: true }); + } else + { + alert('OTP is invalid. Plesae enter correct OTP.!'); + + } + + }) +} + ionViewDidLoad() { + console.log('ionViewDidLoad OtpPage'); + } - constructor() { } - - ngOnInit() {} + closeModal() { + this.modalController.dismiss(); +} +resendOTP() { + console.log(this.drop_down_datas); + console.log(this.loggedEmailID) + this.timeLeft = 60; + this.aws.generateotp(this.drop_down_datas.split(/\s/).join('')).subscribe( + response => { + // if(response.status == 200) + console.log(response) + this.interval = setInterval(() => { + if(this.timeLeft > 0) { + this.timeLeft--; + } else { + clearInterval(this.interval); + // alert(response.msg);//comment this. + } + },1000) + }); +} } diff --git a/src/app/folder/folder.page.html b/src/app/folder/folder.page.html index 39aaa6a..845d23b 100644 --- a/src/app/folder/folder.page.html +++ b/src/app/folder/folder.page.html @@ -8,14 +8,14 @@ - + -
+ diff --git a/src/app/pages/page.module.ts b/src/app/pages/page.module.ts index 674742f..60f623f 100644 --- a/src/app/pages/page.module.ts +++ b/src/app/pages/page.module.ts @@ -3,13 +3,17 @@ import { CommonModule } from '@angular/common'; import { PageRoutingModule } from './page-routing.module'; import { PdListComponent } from './pd-list/pd-list.component'; - +import { IonicModule } from '@ionic/angular'; +import { SharedModule } from 'src/shared/shared.module'; + @NgModule({ declarations: [PdListComponent], imports: [ CommonModule, - PageRoutingModule + PageRoutingModule, + SharedModule, + IonicModule.forRoot(), ] }) export class PageModule { } diff --git a/src/app/pages/pd-list/pd-list.component.html b/src/app/pages/pd-list/pd-list.component.html index 9d93f21..687cdaa 100644 --- a/src/app/pages/pd-list/pd-list.component.html +++ b/src/app/pages/pd-list/pd-list.component.html @@ -1,3 +1,71 @@ -

- pd-list works! -

+ + + + + + Sales PD List + + + + + + + + + + + + + + + +

{{val.applicant_name}}

+
+ +

Name Not Given

+
+ +
+

{{val.createdon | date:'dd-MM-yy h:mm:ss a'}}

+
+
+
+ + +
{{val.sales_pd_type == '1' ? 'Physical PD' : 'Telephonic PD'}}
+
+ +
+
+ {{val.abbr}} | {{val.status}} +
+
+
+
+
+ +
+ + + + + + +
+
+ + + + + +
diff --git a/src/app/pages/pd-list/pd-list.component.scss b/src/app/pages/pd-list/pd-list.component.scss index e69de29..6ed1882 100644 --- a/src/app/pages/pd-list/pd-list.component.scss +++ b/src/app/pages/pd-list/pd-list.component.scss @@ -0,0 +1,87 @@ +.header-md{ + background-color: #ff0303 !important; +} +ion-item-sliding{ + border-bottom: 1px solid #b4b5b9; +} +ion-col{ + padding: 0px !important; +} +h1{ + margin: 2px 0; + font-size: 20px !important; + overflow: hidden; + text-overflow: ellipsis; + color: black; +} +p{ + margin: 0px !important; +} +h6{ + margin: 0px !important; +} +::ng-deep .item-native{ + padding-inline-start: unset !important; +} +ion-grid{ + padding:0px; + } + .fadeIn { + animation-name: fadeIn; + animation-duration: 15s; + transition: all 0.5s cubic-bezier(.36,-0.64,.34,1.76); + } + @font-face{ + font-family: Roboto; + src: url('../../../assets/fonts/Roboto-Bold.ttf')!important; + } + .app_id{ + overflow: hidden; + text-overflow: ellipsis; + font-size: 12px; + color: #473938; + } + .label-md{ + margin: 0px; + } + .item-md h4 { + font-size: 10px; + } + .item-md p{ + font-size: 12px; + } + .item-md ion-icon[item-start] + .item-inner{ + margin-left: 0px; + } + .applicant_name{ + overflow: hidden; + text-overflow: ellipsis; + } + + +.action-sheet-md .action-sheet-group:first-child { +padding-top: 0.8rem; +border-radius: 15px 15px 0 0; +} +.action-sheet-container { +padding: 0 3% 0 3%; +font-weight:bold +} + +.action-sheet-md .action-sheet-button { +// font-weight: 500; +border-top:1px solid lightgray; +} +.action-sheet-md .action-sheet-icon { +margin: 0 10px 0 0; +} +p.note{ +color: gray; +font-size: 13px; +font-weight: bold; +text-align: center; +border-radius: 10px; +padding: 10px; +float: center; + +} diff --git a/src/app/pages/pd-list/pd-list.component.ts b/src/app/pages/pd-list/pd-list.component.ts index ede1a3f..f245a6a 100644 --- a/src/app/pages/pd-list/pd-list.component.ts +++ b/src/app/pages/pd-list/pd-list.component.ts @@ -1,5 +1,13 @@ import { Component, OnInit } from '@angular/core'; +import { ActionSheetController, MenuController, ModalController, NavController } from '@ionic/angular'; +import { AuthService } from 'src/app/authencation/auth-service/auth.service'; +import { LoadingService } from 'src/providers/common-provider/loading.service'; +import { ToastService } from 'src/providers/common-provider/toast.service'; +import { IonicStorageService } from 'src/providers/ionic-storage/ionic-storage.service'; +import { SalesPdService } from '../providers/sales-pd/sales-pd.service'; +import { environment } from 'src/environments/environment'; +const pd_key ='local_sales_PDs' @Component({ selector: 'app-pd-list', templateUrl: './pd-list.component.html', @@ -7,8 +15,287 @@ import { Component, OnInit } from '@angular/core'; }) export class PdListComponent implements OnInit { - constructor() { } + is_sales_login:boolean = false + common: any; + sales_displayValue: any=[]; + localPDs: any = []; + loader_access:any=true + findListIndex: any; + filterMsg: boolean = false; + apiurl: any + filter_drop_down_data: any; + visibleItems: any[] = []; // Items to display in the current view + itemsPerView = 10; // Number of items to display at a time + startIndex = 0; // Start index of the visible range + + constructor(public Menu:MenuController,public aws:AuthService,public actionSheetCtrl: ActionSheetController,public navCtrl: NavController,private toastProvider:ToastService,private loaderProvider:LoadingService,private modalCtrl:ModalController, + private ionicStorageService:IonicStorageService,public salesPDService:SalesPdService) { + + let userDetails:any = localStorage.getItem('user_details'); + console.log('userdetails'); + console.log(userDetails); + let role= this.aws.takeDecisionRouting(JSON.parse(userDetails)) + if(role == 'sales'){ + this.is_sales_login = true + } + else { + this.is_sales_login = false + } + + } ngOnInit() {} + + + + ionViewWillEnter() { + console.log('ionViewWillEnter SalesPDlistPage'); + setTimeout(() => { + let commonData:any = localStorage.getItem('commonSettings') + this.common = JSON.parse(commonData); + if (this.common) { + this.common = this.common.default_pd_list_count; + this.common = this.common.count + ' ' + this.common.factor; + } + }, 300); + // this.cameraProvider.checkGPSPermission(); + // this.salesPDService.clearLocalData(); + } + + ionViewDidEnter() { + this.Menu.enable(false); + this.getListofPD(); + } + + ionViewWillLeave(){ + this.Menu.enable(true); + } + + + doRefresh(event: CustomEvent) { + console.log('refresh', event); + this.getListofPD(); + setTimeout(() => { + // console.log('Async operation has ended'); + event.detail.complete(); + }, 1000); + } + + getListofLocalPD() { + return this.ionicStorageService.getLocalDataWithFilter(pd_key, { name: 'local_pd_id', type: 'filter', value: null }) + .then(result => { + console.log(result, this.sales_displayValue); + if (result && result.length > 0) { + const result_val = result; + result_val.sort((a:any, b:any) => 0 - (a > b ? -1 : 1)); + this.localPDs = result_val; + this.sales_displayValue.unshift(...this.localPDs); + } + this.loader_access = false; + }) + .catch(err => { + this.loader_access = false; + }); + } + + + getListofPD() { + return this.ionicStorageService.getLocalDataWithFilter(pd_key, { name: 'sales_pd_id', type: 'filter', value: null }) + .then(local_res => { + console.log('local_res'); + this.salesPDService.getSalesPDList(this.is_sales_login) + .subscribe(res => { + if (res.dataStatus) { + this.sales_displayValue = res.records; + + console.log(this.sales_displayValue); + + let user1:any = localStorage.getItem('user_details'); + let user = JSON.parse(user1); + + if (local_res && local_res.length > 0) { + + local_res.forEach((local_obj:any) => { + if (local_obj && local_obj.sales_pd_id && local_obj.sales_pd_id !== null) { + console.log(local_obj); + this.findListIndex = this.sales_displayValue.findIndex((val:any) => val.sales_pd_id === local_obj.sales_pd_id); + if (this.sales_displayValue[this.findListIndex]) { + this.sales_displayValue[this.findListIndex].is_pd_synced = local_obj.is_pd_synced; + this.sales_displayValue[this.findListIndex].is_all_section_synced = local_obj.is_all_section_synced; + this.sales_displayValue[this.findListIndex].is_pd_completed = local_obj.is_pd_completed; + this.sales_displayValue[this.findListIndex].is_pd_completed_sync = local_obj.is_pd_completed_sync; + if (local_obj.hasOwnProperty('status') && local_obj.status) { + this.sales_displayValue[this.findListIndex].status = local_obj.status; + } + } + } + }); + } + + if (this.sales_displayValue.length > 0) { + console.log(this.sales_displayValue); + if (!this.is_sales_login) { + this.sales_displayValue = this.sales_displayValue.filter((vll:any) => vll.status === 'COMPLETED'); + } + this.filterMsg = true; + let products:any = []; + let lenders:any = []; + let pd_status:any = []; + this.sales_displayValue.map((val:any) => { + console.log('vvvaaall'); + console.log(val); + this.apiurl = environment + console.log(this.apiurl.authorization); + let link; + if (this.apiurl.authorization === 'sparqvenba2018') { + console.log(this.apiurl.authorization); + link = 'http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U'; + } else { + console.log(this.apiurl.authorization); + link = 'https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U'; + } + console.log(link); + let PDID = val.sales_pd_sno; + let finallink = link + '&PDID=' + PDID + '&Email=' + user.email; + console.log('finallink'); + console.log(finallink); + val.link = finallink; + if (products.length > 0) { + if (products.filter((pro:any) => pro === val.product_id).length === 0) { + products.push(val.product_id); + } + } else { + products.push(val.product_id); + } + if (lenders.length > 0) { + if (lenders.filter((pro:any) => pro === val.lender_id).length === 0) { + lenders.push(val.lender_id); + } + } else { + lenders.push(val.lender_id); + } + if (pd_status.length > 0) { + if (pd_status.filter((pro:any) => pro === val.status).length === 0) { + pd_status.push(val.status); + } + } else { + pd_status.push(val.status); + } + }); + this.filter_drop_down_data = { product_ids: products, lender_ids: lenders, pd_status: pd_status }; + console.log(this.sales_displayValue); + } + this.getListofLocalPD(); + } else { + this.loader_access = false; + this.sales_displayValue = []; + this.getListofLocalPD(); + } + }, err => { + console.log('Error', err); + this.loader_access = false; + }); + }); + } + + newForm(){ + this.salesPDService.clear_local_key('sales_pd_id_PRIMARYKEY'); + localStorage.removeItem('product_id_salesPD') + localStorage.removeItem('sales_pd_type') + // this.navCtrl.push(HomePage) + } + + editForm(valueObj: any) { + let primaryKey = 'sales_pd_id'; + + if (valueObj.local_pd_id !== null && valueObj.sales_pd_id === null && valueObj.is_pd_synced === false) { + primaryKey = 'local_pd_id'; + } + + this.salesPDService.insertData_Replace('sales_pd_id_PRIMARYKEY', valueObj[primaryKey]).then(() => { + this.salesPDService.insertData_Replace('sales_rand_string', valueObj['rand_string']).then(() => { + localStorage.setItem('product_id_salesPD', valueObj.product_id); + + if (!valueObj.hasOwnProperty('sales_pd_type') && !valueObj.sales_pd_type) { + valueObj.sales_pd_type = '1'; + } + + localStorage.setItem('sales_pd_type', valueObj.sales_pd_type); + + this.navCtrl.navigateForward('/section-list', { + queryParams: { + product_id: valueObj.product_id, + sales_pd_type: valueObj.sales_pd_type, + link: valueObj.link, + }, + }); + }); + }); + } + + presentActionSheet(value_obj:any) { + let buttons = [ + { + text: 'View Report', + icon: 'eye', + role: 'destructive', + handler: () => { + // this.salesPDpdf(value_obj.sales_pd_id); + } + }, + { + text: 'Cancel', + role: 'cancel', + icon: 'arrow-round-back', + handler: () => { + console.log('Cancel clicked'); + } + } + ]; + + let actionSheet:any = this.actionSheetCtrl.create({ + buttons: buttons + }); + + actionSheet.present(); + } + + // salesPDpdf(pdfdetail:any){ + // this.loaderProvider.pdloader("Processing..") + // this.salesPDService.getSalesPdpdf(pdfdetail) + // .subscribe(data => { + // if (data.status == 200) { + // let profileModal:any = this.modalCtrl.create(ReportViewer,{'report_link':data.records}); + // profileModal.present(); + + // } + // this.loaderProvider.dismissLoader(); + // },err=>{ + // this.loaderProvider.dismissLoader() + // console.log(err); + // let profileModal = this.modalCtrl.create(ReportViewer,{'error_msg':'Please check your internet connection to view PD reports. They are available only if you are connected.'}); + // profileModal.present(); + // } + // ); + // } + + + updateVisibleItems() { + this.visibleItems = this.sales_displayValue.slice(this.startIndex, this.startIndex + this.itemsPerView); + console.log(this.visibleItems) + } + + // Calculate the visible range based on user interaction or screen size + onScroll(event: any) { + const scrollTop = event.target.scrollTop; + this.startIndex = Math.floor(scrollTop / 50); // Adjust this value based on your item height + this.updateVisibleItems(); + console.log('scroll') + } + + goToUrl(url:any){ + window.open(url, '_blank'); + } + } diff --git a/src/app/pages/providers/sales-pd/sales-pd.service.spec.ts b/src/app/pages/providers/sales-pd/sales-pd.service.spec.ts new file mode 100644 index 0000000..91906bf --- /dev/null +++ b/src/app/pages/providers/sales-pd/sales-pd.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { SalesPdService } from './sales-pd.service'; + +describe('SalesPdService', () => { + let service: SalesPdService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(SalesPdService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/pages/providers/sales-pd/sales-pd.service.ts b/src/app/pages/providers/sales-pd/sales-pd.service.ts new file mode 100644 index 0000000..510dd70 --- /dev/null +++ b/src/app/pages/providers/sales-pd/sales-pd.service.ts @@ -0,0 +1,119 @@ +import { HttpClient, HttpParams } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable, forkJoin, tap } from 'rxjs'; +import { environment } from 'src/environments/environment'; +import { IonicStorageService } from 'src/providers/ionic-storage/ionic-storage.service'; +import { Storage } from '@ionic/storage-angular' + + +@Injectable({ + providedIn: 'root' +}) +export class SalesPdService { + private apiUrl = environment.url + constructor(public http: HttpClient, private ionicStorageProvider:IonicStorageService,private storage: Storage) { } + + getSalesPDList(isSalesLogin: boolean): Observable { + let userDetails:any = localStorage.getItem('user_details') + const det = JSON.parse(userDetails); + const params = { fk_entity_id: det.fk_entity_id, userid: det.userid }; + + // if (this.networkProvider.getCurrentNetworkStatus() === ConnectionStatus.online) { + let complete_url = this.apiUrl + 'listSalesPD/' + det.fk_entity_id; + if (isSalesLogin) { + complete_url = complete_url+'/'+det.userid+'/'+det.user_role; + } + const options = { params: new HttpParams({ fromObject: params }) }; + + return this.http.get(complete_url, options).pipe( + tap((res: any) => { + this.ionicStorageProvider.checkAndInsertApiDataLocally(res, params, 'listSalesPD'); + }) + ); + // } else { + return this.ionicStorageProvider.getApiDataFromLocally(params, 'listSalesPD'); + // } + } + + insertData_Replace(key:any,data:any){ + // console.log(key) + return this.storage.set(key,data); + } + + getSalesPdpdf(pdfdetail:any): Observable { + return this.http.get(this.apiUrl + "downloadSalesPDReport/" + pdfdetail) + } + + getAllMasterDatas(TableName: string): Observable { + let params = { "master_name": TableName } + return new Observable((observer:any)=>{ + // if(this.networkProvider.getCurrentNetworkStatus() == ConnectionStatus.online) { + return this.http.post(this.apiUrl + 'getListOfMaster', { "master_name": TableName }).subscribe(result=>{ + return this.ionicStorageProvider.checkAndInsertApiDataLocally(result,params,'getListOfMaster',true).then(rr=>{ + observer.next(result); + observer.complete(); + }) + }) + // } + // else { + // return this.ionicStorageProvider.getApiDataFromLocally(params,'getListOfMaster').subscribe(result=>{ + // observer.next(result); + // observer.complete(); + // }) + // } + }) +} + +getCityPincode(value:any){ + let params={records:{state_id:value}} + return new Observable((observer:any)=>{ + // if(this.networkProvider.getCurrentNetworkStatus() == ConnectionStatus.online) { + return this.http.post(this.apiUrl+"getListOfStatesAndCities",params).subscribe(result=>{ + return this.ionicStorageProvider.checkAndInsertApiDataLocally(result,params,'getListOfStatesAndCities',true).then(res=>{ + observer.next(result); + observer.complete(); + }) + }) + // } + // else { + // return this.ionicStorageProvider.getApiDataFromLocally(params,'getListOfStatesAndCities').subscribe(result=>{ + // observer.next(result); + // observer.complete(); + // }) + // } +}) +} + +callMultipleApisForTemplate(product_arr:any) { + let users:any=localStorage.getItem('user_details') + users=JSON.parse(users) + let arr_call = [] + for(let val of product_arr) { + let params1 = {records:{lender_id:users.fk_entity_id,product_id:val.product_id,sales_pd_type:'1'}} + let params2 = {records:{lender_id:users.fk_entity_id,product_id:val.product_id,sales_pd_type:'2'}} + let api1= this.http.post(this.apiUrl+'loadSalesPDTemplate',params1) + let api2= this.http.post(this.apiUrl+'loadSalesPDTemplate',params2) + arr_call.push(api1) + arr_call.push(api2) + } + forkJoin(arr_call).subscribe((res:any)=>{ + console.log("rrsadfsadf",res) + res.forEach((val:any)=>{ + if(val['dataStatus']) { + let params = {records:{lender_id:val.records.lender_id,product_id:val.records.product_id,sales_pd_type:val.records.sales_pd_type}} + // this.ionicStorageProvider.checkAndInsertApiDataLocally(val,params,'loadSalesPDTemplate',true).then(rr=>) + val.params = params + } + }) + console.log("final lksdjfl asdf", res); + this.ionicStorageProvider.insertDataWithReplace('loadSalesPDTemplate',res).then(rr=>{}) + }) + +} + +clear_local_key(key:any){ + return this.storage.remove(key) +} + + +} diff --git a/src/assets/fonts/Roboto-Black.ttf b/src/assets/fonts/Roboto-Black.ttf new file mode 100755 index 0000000..689fe5c Binary files /dev/null and b/src/assets/fonts/Roboto-Black.ttf differ diff --git a/src/assets/fonts/Roboto-BlackItalic.ttf b/src/assets/fonts/Roboto-BlackItalic.ttf new file mode 100755 index 0000000..0b4e0ee Binary files /dev/null and b/src/assets/fonts/Roboto-BlackItalic.ttf differ diff --git a/src/assets/fonts/Roboto-Bold.ttf b/src/assets/fonts/Roboto-Bold.ttf new file mode 100755 index 0000000..d3f01ad Binary files /dev/null and b/src/assets/fonts/Roboto-Bold.ttf differ diff --git a/src/assets/fonts/Roboto-BoldItalic.ttf b/src/assets/fonts/Roboto-BoldItalic.ttf new file mode 100755 index 0000000..41cc1e7 Binary files /dev/null and b/src/assets/fonts/Roboto-BoldItalic.ttf differ diff --git a/src/assets/fonts/Roboto-Italic.ttf b/src/assets/fonts/Roboto-Italic.ttf new file mode 100755 index 0000000..6a1cee5 Binary files /dev/null and b/src/assets/fonts/Roboto-Italic.ttf differ diff --git a/src/assets/fonts/Roboto-Light.ttf b/src/assets/fonts/Roboto-Light.ttf new file mode 100755 index 0000000..219063a Binary files /dev/null and b/src/assets/fonts/Roboto-Light.ttf differ diff --git a/src/assets/fonts/Roboto-LightItalic.ttf b/src/assets/fonts/Roboto-LightItalic.ttf new file mode 100755 index 0000000..0e81e87 Binary files /dev/null and b/src/assets/fonts/Roboto-LightItalic.ttf differ diff --git a/src/assets/fonts/Roboto-Medium.ttf b/src/assets/fonts/Roboto-Medium.ttf new file mode 100755 index 0000000..1a7f3b0 Binary files /dev/null and b/src/assets/fonts/Roboto-Medium.ttf differ diff --git a/src/assets/fonts/Roboto-MediumItalic.ttf b/src/assets/fonts/Roboto-MediumItalic.ttf new file mode 100755 index 0000000..0030295 Binary files /dev/null and b/src/assets/fonts/Roboto-MediumItalic.ttf differ diff --git a/src/assets/fonts/Roboto-Regular.ttf b/src/assets/fonts/Roboto-Regular.ttf new file mode 100755 index 0000000..2c97eea Binary files /dev/null and b/src/assets/fonts/Roboto-Regular.ttf differ diff --git a/src/assets/fonts/Roboto-Thin.ttf b/src/assets/fonts/Roboto-Thin.ttf new file mode 100755 index 0000000..b74a4fd Binary files /dev/null and b/src/assets/fonts/Roboto-Thin.ttf differ diff --git a/src/assets/fonts/Roboto-ThinItalic.ttf b/src/assets/fonts/Roboto-ThinItalic.ttf new file mode 100755 index 0000000..dd0ddb8 Binary files /dev/null and b/src/assets/fonts/Roboto-ThinItalic.ttf differ diff --git a/src/global.scss b/src/global.scss index dc7dfe1..7a49bef 100644 --- a/src/global.scss +++ b/src/global.scss @@ -25,3 +25,12 @@ @import "@ionic/angular/css/text-alignment.css"; @import "@ionic/angular/css/text-transformation.css"; @import "@ionic/angular/css/flex-utils.css"; + + + +// ion-content { +// --padding-start: 16px; // Adjust as needed +// --padding-end: 16px; // Adjust as needed +// --padding-top: 16px; // Adjust as needed +// --padding-bottom: 16px; // Adjust as needed +// } \ No newline at end of file diff --git a/src/providers/_guard/req-token.interceptor.spec.ts b/src/providers/_guard/req-token.interceptor.spec.ts new file mode 100644 index 0000000..0447d93 --- /dev/null +++ b/src/providers/_guard/req-token.interceptor.spec.ts @@ -0,0 +1,17 @@ +import { TestBed } from '@angular/core/testing'; + +import { ReqTokenInterceptor } from './req-token.interceptor'; + +describe('ReqTokenInterceptor', () => { + beforeEach(() => TestBed.configureTestingModule({ + providers: [ + ReqTokenInterceptor + ] + })); + + it('should be created', () => { + console.log("fuck u"); + const interceptor: ReqTokenInterceptor = TestBed.inject(ReqTokenInterceptor); + expect(interceptor).toBeTruthy(); + }); +}); diff --git a/src/providers/_guard/req-token.interceptor.ts b/src/providers/_guard/req-token.interceptor.ts new file mode 100644 index 0000000..2c82f54 --- /dev/null +++ b/src/providers/_guard/req-token.interceptor.ts @@ -0,0 +1,105 @@ +import { Injectable, Injector } from '@angular/core'; +import { + HttpRequest, + HttpHandler, + HttpEvent, + HttpInterceptor, + HttpErrorResponse, +} from '@angular/common/http'; +import { Observable, BehaviorSubject, throwError } from 'rxjs'; +import { catchError, switchMap } from 'rxjs/operators'; +import { NavController } from '@ionic/angular'; // Import NavController from Ionic +import { environment } from 'src/environments/environment'; +import { CognitoService } from 'src/app/authencation/auth-service/cognito.service'; +import { AuthService } from 'src/app/authencation/auth-service/auth.service'; +import { ToastService } from '../common-provider/toast.service'; + +@Injectable() +export class ReqTokenInterceptor implements HttpInterceptor { + + private env = environment + + constructor(public injector: Injector) {} + + isRefreshingToken: boolean = false; + tokenSubject: BehaviorSubject = new BehaviorSubject(''); + + addToken(req: HttpRequest, token: string): HttpRequest { + return req.clone({ + setHeaders: { + 'Authorization': this.env.authorization, // Replace with your authorization header + 'Token': token, + 'From': '2', + }, + }); + } + + intercept(req: HttpRequest,next: HttpHandler): Observable> { + const cognitoService = this.injector.get(CognitoService); + console.log(cognitoService) + let token = cognitoService.getToken() || ''; + console.log(token) + console.log('Token From Interceptor >>', cognitoService.getToken()); + // if (token !== '') { + // token = token.getIdToken().getJwtToken(); + // } + // console.log(token) + return next.handle(this.addToken(req, token)).pipe( + catchError((error) => { + if (error instanceof HttpErrorResponse) { + if (error.status === 401 && error.error.error.toLowerCase() === 'invalid token!') { + return this.handle401Error(req, next, error); + } else { + return throwError(error); + } + } else { + console.log('Observable error'); + return throwError(error); + } + }) + ); + } + + handle401Error(req: HttpRequest, next: HttpHandler, err: HttpErrorResponse): Observable { + console.log('err', err); + const cognitoService = this.injector.get(CognitoService); + console.log('entered', this.isRefreshingToken, this.tokenSubject); + + if (err.status === 401 && err.error.error.toLowerCase() === 'invalid token!') { + if (!this.isRefreshingToken) { + this.isRefreshingToken = true; + this.tokenSubject.next(''); + return cognitoService.refresh().pipe( + switchMap((newToken: string) => { + if (newToken) { + this.isRefreshingToken = false; + this.tokenSubject.next(newToken); + return next.handle(this.addToken(req, cognitoService.getToken().getIdToken().getJwtToken())); + } + const awsService = this.injector.get(AuthService); + return awsService.logout(); + }) + ); + } else { + console.log('Else Part 1201'); + return next.handle(this.addToken(req, cognitoService.getToken().getIdToken().getJwtToken())); + } + } else { + return this.handleError('', err); + } + } + + private handleError(operation = 'operation', error?: HttpErrorResponse): Observable> { + console.log('Error: ', error); + if (error && error.status === 401) { + localStorage.clear(); + const navCtrl = this.injector.get(NavController); + navCtrl.navigateRoot('LoginPage'); // Use the correct route to navigate to the login page + } else { + const toastProvider = this.injector.get(ToastService); + toastProvider.lenderappmessage('Network Error'); + } + + return throwError(error); + } +} diff --git a/src/providers/ionic-storage/ionic-storage.service.ts b/src/providers/ionic-storage/ionic-storage.service.ts index c029249..f4a7cdf 100644 --- a/src/providers/ionic-storage/ionic-storage.service.ts +++ b/src/providers/ionic-storage/ionic-storage.service.ts @@ -7,7 +7,9 @@ import { Observable, Observer } from 'rxjs'; }) export class IonicStorageService { - constructor(private ionicStorage: Storage) { } + constructor(private ionicStorage: Storage) { + this.ionicStorage.create(); + } insertDataWithReplace(key: any, value: any): Promise { return this.ionicStorage.set(key, value); @@ -137,5 +139,6 @@ export class IonicStorageService { // return '' }) } + } diff --git a/src/providers/pdtrigger/pdtrigger.service.ts b/src/providers/pdtrigger/pdtrigger.service.ts index 5166acf..b00a2b3 100644 --- a/src/providers/pdtrigger/pdtrigger.service.ts +++ b/src/providers/pdtrigger/pdtrigger.service.ts @@ -2,32 +2,33 @@ import { Injectable } from '@angular/core'; import { environment } from 'src/environments/environment'; import { LoadingService } from '../common-provider/loading.service'; import { HttpClient } from '@angular/common/http'; -import { of, switchMap } from 'rxjs'; +import { Observable, map, of, switchMap } from 'rxjs'; import { IonicStorageService } from '../ionic-storage/ionic-storage.service'; +import { SalesPdService } from 'src/app/pages/providers/sales-pd/sales-pd.service'; @Injectable({ providedIn: 'root' }) export class PdtriggerService { private apiUrl = environment.url; - constructor(public http: HttpClient,private loadingProvider:LoadingService,private storage:IonicStorageService) { } + constructor(public http: HttpClient,private loadingProvider:LoadingService,private ionicStorageProvider:IonicStorageService,private salesPDProvider:SalesPdService) { } initiateMasterApis(type:any) { if(type == 'sales') { - this.loadingProvider.pdloader('') + // this.loadingProvider.pdloader('') let lender_id:any=localStorage.getItem("user_details") lender_id=JSON.parse(lender_id).fk_entity_id; // HARD CODED API PARAMS - // this.salesPDProvider.getAllMasterDatas('STATE').subscribe(res=>{ - // // FOR MEQ PRODUCTS MASTER API - // // this.salesPDProvider.getAllMasterDatas('BUSINESSENTITYTYPE').subscribe(res=>{ - // this.salesPDProvider.getAllMasterDatas('COMPANYRELATIONSHIPS').subscribe(res=>{ - // this.salesPDProvider.getAllMasterDatas('SALESEQUIPMENTLIST').subscribe(res=>{ - // this.salesPDProvider.getAllMasterDatas('SALESVENDORLIST').subscribe(res=>{}) - // }) - // }) - // // }) + this.salesPDProvider.getAllMasterDatas('STATE').subscribe(res=>{ + // FOR MEQ /PRODUCTS MASTER API + // this.salesPDProvider.getAllMasterDatas('BUSINESSENTITYTYPE').subscribe(res=>{ + this.salesPDProvider.getAllMasterDatas('COMPANYRELATIONSHIPS').subscribe(res=>{ + this.salesPDProvider.getAllMasterDatas('SALESEQUIPMENTLIST').subscribe(res=>{ + this.salesPDProvider.getAllMasterDatas('SALESVENDORLIST').subscribe(res=>{}) + }) + }) // }) + }) // SALES PD TEMPLATE FOR WCTL AND LFMP // this.salesPDProvider.getData('8','1').subscribe(res=>{ // this.salesPDProvider.getData('9','1').subscribe(res=>{ @@ -41,33 +42,45 @@ export class PdtriggerService { // }) // }) //SALES PD PRODUCTS LIST FOR LENDER MWISE - // this.getEntityPreferences(lender_id).subscribe(res=>{ - // if(res.dataStatus && res.records && res.records.salespd_products && res.records.salespd_products.length > 0) { - // // SALES PD TEMPLATE FOR WCTL AND LFMP - // // this.salesPDProvider.callMultipleApisForTemplate(res.records.salespd_products) - // } - // }) - // GETTING CITY AND PINCODE FOR SOME STATES - // this.salesPDProvider.getCityPincode('5').subscribe(res=>{ - // this.salesPDProvider.getCityPincode('6').subscribe(res=>{ - // this.salesPDProvider.getCityPincode('15').subscribe(res=>{ - // this.salesPDProvider.getCityPincode('27').subscribe(res=>{ - // this.salesPDProvider.getCityPincode('26').subscribe(res=>{ - // this.loadingProvider.dismissLoader(); - // }) - // }) - // }) - // }) - // }) + this.getEntityPreferences(lender_id).subscribe(res=>{ + if(res.dataStatus && res.records && res.records.salespd_products && res.records.salespd_products.length > 0) { + // SALES PD TEMPLATE FOR WCTL AND LFMP + this.salesPDProvider.callMultipleApisForTemplate(res.records.salespd_products) + } + }) + //GETTING CITY AND PINCODE FOR SOME STATES + this.salesPDProvider.getCityPincode('5').subscribe(res=>{ + this.salesPDProvider.getCityPincode('6').subscribe(res=>{ + this.salesPDProvider.getCityPincode('15').subscribe(res=>{ + this.salesPDProvider.getCityPincode('27').subscribe(res=>{ + this.salesPDProvider.getCityPincode('26').subscribe(res=>{ + // this.loadingProvider.dismissLoader(); + }) + }) + }) + }) + }) } } + getEntityPreferences(entity_id: any): Observable { + const params = { entity_id: entity_id }; + return this.http.get(`${this.apiUrl}getEntityPreferences/${entity_id}`) + .pipe( + map((result: any) => { + this.ionicStorageProvider.checkAndInsertApiDataLocally(result, params, 'getEntityPreferences'); + return result; + }) + ); + } + + getCommonSettingsConfig() { // if(this.networkProvider.getCurrentNetworkStatus() == ConnectionStatus.online) { return this.http.post(this.apiUrl + 'getCommonConfig', '').pipe( switchMap((result) => { - this.storage.checkAndInsertApiDataLocally(result, null, 'getCommonConfig'); + this.ionicStorageProvider.checkAndInsertApiDataLocally(result, null, 'getCommonConfig'); return of(result); }) ); diff --git a/src/theme/filter-modal.scss b/src/theme/filter-modal.scss new file mode 100644 index 0000000..2466134 --- /dev/null +++ b/src/theme/filter-modal.scss @@ -0,0 +1,76 @@ +.filterModal{ + padding: 6.4%; + // padding: 30px; + background-color: rgba(0, 0, 0, 0.56); + // padding: 30px; + color:red; + // filter:blur(5px); + //color:lightcyan; + // background-color:gray; + .modal-wrapper { + // border-radius: 7px; + // background: rgba(0, 0, 0, 0.5); + // color: gray; + + height: 80% !important; + width:100% !important; + // margin-top: 13.5%; + border-radius: 10px; + margin-top:10%; + + mat-card{ + // background-color:rgb(252, 252, 161); + background-color:white; + box-shadow: 2px 2px lavender; + border-radius: 5px; + min-height: 13em; + // height: 16.5em; + max-height: 16.5em; + border:1px solid lavender; + } + .mat-card-title{ + + font-weight: bold; + font-size: 16px; + color:#e2412f; + } + mat-card-content{ + margin-left: 4%; + } + ion-item{ + // background-color:rgb(252, 252, 161); + background-color: lightcyan; + } + // margin-right: 15%; + + button{ + font-size: 12px; + // height: 40px; + color:#e2412f; + // margin-bottom: 10px; + position: relative; + bottom:0.5em; + } + // input{ + // // border:1px solid blueviolet; + // } + mat-form-field{ + width: 100%; + margin-top: 3%; + } + mat-radio-button{ + margin-top: 2%; + } + + + } + + } + + + .small-popup-modal { + --width: 80% !important; /* Adjust as needed */ + --height: 50% !important; /* Adjust as needed */ + --max-width: 300px !important; /* Maximum width */ + --max-height: 400px !important; /* Maximum height */ +} \ No newline at end of file diff --git a/src/theme/variables.scss b/src/theme/variables.scss index 9e7b06c..84bbe62 100644 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -197,13 +197,13 @@ */ .md body { - --ion-background-color: #ffffff; + --ion-background-color: #ccc; --ion-background-color-rgb: 18,18,18; --ion-text-color: #ffffff; --ion-text-color-rgb: 255,255,255; - --ion-border-color: #222222; + --ion-border-color: #ffffff; --ion-color-step-50: #1e1e1e; --ion-color-step-100: #2a2a2a; @@ -225,11 +225,11 @@ --ion-color-step-900: #e7e7e7; --ion-color-step-950: #f3f3f3; - --ion-item-background: #1e1e1e; + --ion-item-background: #ffffff; - --ion-toolbar-background: #1f1f1f; + --ion-toolbar-background: #ff0000; - --ion-tab-bar-background: #1f1f1f; + --ion-tab-bar-background: #ff0000; --ion-card-background: #1e1e1e; }