Fairoj: feedback changes and improvements
This commit is contained in:
parent
3ad95c3f92
commit
f000c6308a
1
ng6-seed/.gitignore
vendored
1
ng6-seed/.gitignore
vendored
@ -2,6 +2,7 @@
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/dist1
|
||||
/tmp
|
||||
|
||||
# dependencies
|
||||
|
||||
@ -21,9 +21,36 @@
|
||||
"updateMode": "prefetch",
|
||||
"resources": {
|
||||
"files": [
|
||||
"/assets/**"
|
||||
"/assets/**",
|
||||
"/*.woff",
|
||||
"/*.svg",
|
||||
"/*.ttf",
|
||||
"/*.eot",
|
||||
"/*.woff2"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"dataGroups": [
|
||||
{
|
||||
"name": "my-api-30days",
|
||||
"urls": [
|
||||
"/api/*"
|
||||
],
|
||||
"cacheConfig": {
|
||||
"strategy": "performance",
|
||||
"maxSize": 300,
|
||||
"maxAge": "30d"
|
||||
}
|
||||
}
|
||||
],
|
||||
"navigationUrls": [
|
||||
"/**",
|
||||
"!/**/*.*",
|
||||
"!/**/*__*",
|
||||
"!/**/*__*/**",
|
||||
"!/bypass/service/worker",
|
||||
"!/account/bypass-service-worker**",
|
||||
"!/bypass-service-worker**"
|
||||
]
|
||||
}
|
||||
|
||||
134
ng6-seed/package-lock.json
generated
134
ng6-seed/package-lock.json
generated
@ -2603,6 +2603,16 @@
|
||||
"integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
|
||||
"dev": true
|
||||
},
|
||||
"camel-case": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz",
|
||||
"integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"no-case": "^2.2.0",
|
||||
"upper-case": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"camelcase": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
|
||||
@ -6095,6 +6105,12 @@
|
||||
"minimalistic-assert": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"he": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||
"dev": true
|
||||
},
|
||||
"hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
@ -6129,6 +6145,35 @@
|
||||
"integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==",
|
||||
"dev": true
|
||||
},
|
||||
"html-minifier": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz",
|
||||
"integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"camel-case": "^3.0.0",
|
||||
"clean-css": "^4.2.1",
|
||||
"commander": "^2.19.0",
|
||||
"he": "^1.2.0",
|
||||
"param-case": "^2.1.1",
|
||||
"relateurl": "^0.2.7",
|
||||
"uglify-js": "^3.5.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "3.12.1",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.1.tgz",
|
||||
"integrity": "sha512-o8lHP20KjIiQe5b/67Rh68xEGRrc2SRsCuuoYclXXoC74AfSRGblU1HKzJWH3HxPZ+Ort85fWHpSX7KwBUC9CQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"http-cache-semantics": {
|
||||
"version": "3.8.1",
|
||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz",
|
||||
@ -7639,6 +7684,12 @@
|
||||
"signal-exit": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"lower-case": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz",
|
||||
"integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=",
|
||||
"dev": true
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
|
||||
@ -8353,6 +8404,15 @@
|
||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
||||
"dev": true
|
||||
},
|
||||
"no-case": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
|
||||
"integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lower-case": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"node-ensure": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "https://registry.npmjs.org/node-ensure/-/node-ensure-0.0.0.tgz",
|
||||
@ -9288,6 +9348,15 @@
|
||||
"readable-stream": "^2.1.5"
|
||||
}
|
||||
},
|
||||
"param-case": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz",
|
||||
"integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"no-case": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"parchment": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz",
|
||||
@ -10333,6 +10402,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"relateurl": {
|
||||
"version": "0.2.7",
|
||||
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
|
||||
"integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
|
||||
"dev": true
|
||||
},
|
||||
"remove-trailing-separator": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
|
||||
@ -11702,14 +11777,14 @@
|
||||
"dev": true
|
||||
},
|
||||
"terser": {
|
||||
"version": "3.17.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz",
|
||||
"integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==",
|
||||
"version": "5.5.1",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz",
|
||||
"integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commander": "^2.19.0",
|
||||
"source-map": "~0.6.1",
|
||||
"source-map-support": "~0.5.10"
|
||||
"commander": "^2.20.0",
|
||||
"source-map": "~0.7.2",
|
||||
"source-map-support": "~0.5.19"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
@ -11719,9 +11794,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"version": "0.7.3",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
|
||||
"integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
@ -11732,6 +11807,14 @@
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11780,6 +11863,12 @@
|
||||
"y18n": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"find-cache-dir": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
|
||||
@ -11877,6 +11966,16 @@
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.19",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
|
||||
"integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"ssri": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
|
||||
@ -11886,6 +11985,17 @@
|
||||
"figgy-pudding": "^3.5.1"
|
||||
}
|
||||
},
|
||||
"terser": {
|
||||
"version": "3.17.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz",
|
||||
"integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commander": "^2.19.0",
|
||||
"source-map": "~0.6.1",
|
||||
"source-map-support": "~0.5.10"
|
||||
}
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||
@ -12314,6 +12424,12 @@
|
||||
"integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"upper-case": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
|
||||
"integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=",
|
||||
"dev": true
|
||||
},
|
||||
"uri-js": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz",
|
||||
|
||||
@ -4,13 +4,15 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"production": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --build-optimizer=true",
|
||||
"staging": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --configuration=staging",
|
||||
"staging": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --configuration=staging --base-href /dist/",
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
"e2e": "ng e2e",
|
||||
"static-serve": "http-server -p 3000 -c-1",
|
||||
"postbuild": "node_modules/.bin/html-minifier dist/index.html --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true -o dist/index.html && node_modules/.bin/terser dist/ngsw-worker.js -o dist/ngsw-worker.js -c --comments /^##/"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
@ -92,6 +94,7 @@
|
||||
"@types/node": "^8.10.46",
|
||||
"aws-sdk": "^2.443.0",
|
||||
"codelyzer": "~4.1.0",
|
||||
"html-minifier": "^4.0.0",
|
||||
"jasmine-core": "2.6.3",
|
||||
"jasmine-spec-reporter": "4.1.0",
|
||||
"karma": "1.7.0",
|
||||
@ -100,6 +103,7 @@
|
||||
"karma-coverage-istanbul-reporter": "1.3.0",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "5.1.2",
|
||||
"terser": "^5.5.1",
|
||||
"ts-node": "~5.0.0",
|
||||
"tslint": "~5.9.1",
|
||||
"typescript": "^2.7.2"
|
||||
|
||||
@ -218,7 +218,7 @@ private handleError<T> (operation = 'operation', error?: T) {
|
||||
}
|
||||
else if(error.status == 0){
|
||||
console.log("NO Internet")
|
||||
this.router.navigate(['/error/404']);
|
||||
// this.router.navigate(['/error/404']);
|
||||
}
|
||||
else{
|
||||
// alert("Please Check your Internet connection");
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { SwUpdate } from '@angular/service-worker';
|
||||
import { TranslateService} from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
template: '<router-outlet></router-outlet>'
|
||||
})
|
||||
export class AppComponent {
|
||||
export class AppComponent implements OnInit {
|
||||
promptEvent: Event;
|
||||
constructor(translate: TranslateService) {
|
||||
constructor(translate: TranslateService,private swUpdate:SwUpdate) {
|
||||
translate.addLangs(['en', 'fr']);
|
||||
translate.setDefaultLang('en');
|
||||
|
||||
@ -19,5 +20,17 @@ export class AppComponent {
|
||||
console.log("beforeinstall Prompt Listener",event);
|
||||
// alert("Install as App");
|
||||
});
|
||||
}
|
||||
ngOnInit() {
|
||||
if (this.swUpdate.isEnabled) {
|
||||
|
||||
this.swUpdate.available.subscribe(() => {
|
||||
|
||||
if(confirm("New version available. Load New Version?")) {
|
||||
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ export class DynamicFormComponent implements OnInit {
|
||||
// }
|
||||
// this.form_group_name=new FormGroup({questions:this._fb.array([])})
|
||||
|
||||
console.log(this.form_group_name);
|
||||
console.log(this.form_group_name.getRawValue());
|
||||
// this.form_group_name.valueChanges.subscribe(()=>{
|
||||
// this.form_group_name.updateValueAndValidity();
|
||||
// })
|
||||
|
||||
@ -405,11 +405,28 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
||||
}
|
||||
// FOR SETTING THE Question Label TO OTHER OR SAME Question
|
||||
if(curr_obj.purpose == 'question_label') {
|
||||
let curr_question_obj = this.whole_json.filter(val=>val.question_key == curr_obj.insert_control)
|
||||
let curr_question_obj
|
||||
let curr_json = this.whole_json
|
||||
if(curr_obj.hasOwnProperty('insert_group_key') && curr_obj.insert_group_key != null) {
|
||||
curr_json = curr_json.filter(val=>val.group_key == curr_obj.insert_group_key)
|
||||
curr_json = curr_json[0]
|
||||
if(curr_json && curr_json.group_questions && curr_json.group_questions.length > 0) {
|
||||
curr_json.group_questions.forEach(rr=>{
|
||||
let temp_curr = rr.filter(val=>val.question_key == curr_obj.insert_control)
|
||||
if(temp_curr && temp_curr.length > 0) {
|
||||
temp_curr[0].question = calc_exp
|
||||
}
|
||||
})
|
||||
curr_json = curr_json.question
|
||||
}
|
||||
}
|
||||
console.log(curr_json);
|
||||
if(curr_json) {
|
||||
curr_question_obj = curr_json.filter(val=>val.question_key == curr_obj.insert_control)
|
||||
if(curr_question_obj && curr_question_obj.length > 0) {
|
||||
curr_question_obj[0].question = calc_exp
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ import { QuesFormService } from '../dynamic-form/ques-form/ques-form.service';
|
||||
@Component({
|
||||
selector: 'app-form',
|
||||
templateUrl: './form.component.html',
|
||||
styleUrls: ['./form.component.scss']
|
||||
styleUrls: ['./form.component.scss'],
|
||||
})
|
||||
export class FormComponent implements OnInit {
|
||||
form_id: number;
|
||||
|
||||
@ -14,6 +14,7 @@ import { CustomValidators } from 'ng2-validation';
|
||||
import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material';
|
||||
import { CognitoService } from '../../AwsService/cognito.service';
|
||||
import { DashboardService } from 'app/dashboard/dashboard.service';
|
||||
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ms-login-session',
|
||||
@ -43,7 +44,7 @@ export class LoginComponent implements OnInit{
|
||||
commonDetails: any;
|
||||
constructor(
|
||||
private router: Router, public aws: AwsService, public dialog: MatDialog,
|
||||
public shared:CognitoService,private dashBoardService:DashboardService) {
|
||||
public shared:CognitoService,private dashBoardService:DashboardService , private loaderService:LoaderService) {
|
||||
|
||||
}
|
||||
ngOnInit(){
|
||||
@ -66,6 +67,7 @@ export class LoginComponent implements OnInit{
|
||||
*/
|
||||
login() {
|
||||
let auth = { 'Username': this.email, 'Password': this.password };
|
||||
this.loaderService.showMatSpinnerDialog('');
|
||||
this.aws.dologin(auth).subscribe(res => {
|
||||
// console.log("do login",res);
|
||||
if (res !== undefined) {
|
||||
@ -74,12 +76,14 @@ export class LoginComponent implements OnInit{
|
||||
localStorage.setItem('user_role',res.idToken.payload["custom:role_id"]);
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
this.loaderService.closeMatSpinnerDialog();
|
||||
}, err => {
|
||||
if (err.message == "New password is required.") {
|
||||
this.newpassopen();
|
||||
} else {
|
||||
|
||||
}
|
||||
this.loaderService.closeMatSpinnerDialog();
|
||||
//alert(err.message);
|
||||
})
|
||||
}
|
||||
|
||||
@ -381,13 +381,23 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"question":"Broken Period starting from (Month)",
|
||||
"question":"Broken Period starting from (Date)",
|
||||
"question_key":"broken_period_from_month",
|
||||
"type":"1",
|
||||
"field_width":"45",
|
||||
"place_holder":"DD-MM-YYYY (Eg 05-02-2020)",
|
||||
"answers":null,
|
||||
"api_properties":null,
|
||||
"onchange_properties":null,
|
||||
"onchange_properties":[
|
||||
{
|
||||
"purpose":"answer_value",
|
||||
"expression":"(function (){let final_value = ''; if(String('broken_period_to_month') && String('broken_period_from_month')) {let from_date = new Date((String('broken_period_from_month')).split('-').reverse().join('-'));let to_date = new Date((String('broken_period_to_month')).split('-').reverse().join('-'));console.log(to_date);if(!from_date || !to_date || !from_date instanceof Date || !to_date instanceof Date || isNaN(from_date) || isNaN(to_date)) {final_value = '';return;}final_value = to_date.getMonth() - from_date.getMonth() + (12 * (to_date.getFullYear() - from_date.getFullYear()))};return final_value}())",
|
||||
"value_keys":[
|
||||
"broken_period_to_month", "broken_period_from_month"
|
||||
],
|
||||
"insert_control":"broken_period_no_of_months"
|
||||
}
|
||||
],
|
||||
"is_repeatable":null,
|
||||
"field_type":"string",
|
||||
"validations":[
|
||||
@ -402,13 +412,23 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"question":"Broken Period starting to (Month)",
|
||||
"question":"Broken Period starting to (Date)",
|
||||
"question_key":"broken_period_to_month",
|
||||
"type":"1",
|
||||
"place_holder":"DD-MM-YYYY (Eg 03-12-2020)",
|
||||
"field_width":"45",
|
||||
"answers":null,
|
||||
"api_properties":null,
|
||||
"onchange_properties":null,
|
||||
"onchange_properties":[
|
||||
{
|
||||
"purpose":"answer_value",
|
||||
"expression":"(function (){let final_value = ''; if(String('broken_period_to_month') && String('broken_period_from_month')) {let from_date = new Date((String('broken_period_from_month')).split('-').reverse().join('-'));let to_date = new Date((String('broken_period_to_month')).split('-').reverse().join('-'));console.log(to_date);if(!from_date || !to_date || !from_date instanceof Date || !to_date instanceof Date || isNaN(from_date) || isNaN(to_date)) {final_value = '';return;}final_value = to_date.getMonth() - from_date.getMonth() + (12 * (to_date.getFullYear() - from_date.getFullYear()))};return final_value}())",
|
||||
"value_keys":[
|
||||
"broken_period_to_month", "broken_period_from_month"
|
||||
],
|
||||
"insert_control":"broken_period_no_of_months"
|
||||
}
|
||||
],
|
||||
"is_repeatable":null,
|
||||
"field_type":"string",
|
||||
"validations":[
|
||||
@ -449,7 +469,16 @@
|
||||
"field_width":"45",
|
||||
"answers":null,
|
||||
"api_properties":null,
|
||||
"onchange_properties":null,
|
||||
"onchange_properties":[
|
||||
{
|
||||
"purpose":"answer_value",
|
||||
"expression":"(((Number(broken_period_turnover_cy)-Number(broken_period_turnover_py))/Number(broken_period_turnover_cy))*100).toFixed(2)",
|
||||
"value_keys":[
|
||||
"broken_period_turnover_py","broken_period_turnover_cy"
|
||||
],
|
||||
"insert_control":"broken_period_turnover_percent"
|
||||
}
|
||||
],
|
||||
"is_repeatable":null,
|
||||
"field_type":"numtoword",
|
||||
"validations":[
|
||||
@ -469,7 +498,16 @@
|
||||
"field_width":"45",
|
||||
"answers":null,
|
||||
"api_properties":null,
|
||||
"onchange_properties":null,
|
||||
"onchange_properties":[
|
||||
{
|
||||
"purpose":"answer_value",
|
||||
"expression":"(((Number(broken_period_turnover_cy)-Number(broken_period_turnover_py))/Number(broken_period_turnover_cy))*100).toFixed(2)",
|
||||
"value_keys":[
|
||||
"broken_period_turnover_py","broken_period_turnover_cy"
|
||||
],
|
||||
"insert_control":"broken_period_turnover_percent"
|
||||
}
|
||||
],
|
||||
"is_repeatable":null,
|
||||
"field_type":"numtoword",
|
||||
"validations":[
|
||||
|
||||
@ -177,9 +177,18 @@
|
||||
"group_title":"Remarks",
|
||||
"group_title_shown":"0",
|
||||
"group_key":"pd_officer_recommendation_remarks"
|
||||
} ] }
|
||||
|
||||
] }],
|
||||
} ] }
|
||||
] },
|
||||
{
|
||||
"purpose":"question_label",
|
||||
"expression":"(function () {let label= 'Reasons for marking PD status as ';('pd_officer_recommendation' == '2') ? label+= 'Positive' : ('pd_officer_recommendation' == '3') ? label+= 'Negative' : ('pd_officer_recommendation' == '4') ? label+= 'Refer to Credit' : label+= 'Positive/negative/ refer to credit';return label}())",
|
||||
"value_keys":[
|
||||
"pd_officer_recommendation"
|
||||
],
|
||||
"insert_control":"reason",
|
||||
"insert_group_key":"pd_officer_recommendation_remarks"
|
||||
}
|
||||
],
|
||||
"is_repeatable":null,
|
||||
"validations":[
|
||||
{
|
||||
|
||||
@ -239,7 +239,7 @@
|
||||
"question":"Comment on locality",
|
||||
"question_key":"comment_locality",
|
||||
"type":"3",
|
||||
"field_width":"45",
|
||||
"field_width":"25",
|
||||
"api_properties":{
|
||||
"api":"getListOfMaster",
|
||||
"api_method":"POST",
|
||||
@ -268,7 +268,7 @@
|
||||
"question":"Estimated Area of the business",
|
||||
"question_key":"business_estimated_area",
|
||||
"type":"1",
|
||||
"field_width":"45",
|
||||
"field_width":"30",
|
||||
"field_type":"num",
|
||||
"api_properties":null,
|
||||
"answers":null,
|
||||
@ -288,7 +288,7 @@
|
||||
"question":"UOM",
|
||||
"question_key":"uom",
|
||||
"type":"8",
|
||||
"field_width":"45",
|
||||
"field_width":"30",
|
||||
"api_properties":null,
|
||||
"answers":[
|
||||
{
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"question":"Loan Tenure",
|
||||
"question":"Loan Tenure (in months)",
|
||||
"question_key":"loan_tenure",
|
||||
"type":"1",
|
||||
"field_type":"num",
|
||||
|
||||
@ -53,16 +53,33 @@
|
||||
{
|
||||
"question": "Account type",
|
||||
"question_key": "account_type",
|
||||
"type": "1",
|
||||
"type": "3",
|
||||
"field_width": "45",
|
||||
"api_properties":null,
|
||||
"answers": null,
|
||||
"answers": [
|
||||
{
|
||||
"answer":"Savings",
|
||||
"answer_id":"Savings"
|
||||
},
|
||||
{
|
||||
"answer":"OD",
|
||||
"answer_id":"OD"
|
||||
},
|
||||
{
|
||||
"answer":"Current",
|
||||
"answer_id":"Current"
|
||||
},
|
||||
{
|
||||
"answer":"CC",
|
||||
"answer_id":"CC"
|
||||
}
|
||||
],
|
||||
"onchange_properties": [
|
||||
{
|
||||
"purpose":"FORM_CTRL",
|
||||
"form_controls":[{
|
||||
"insert_index":"account_type",
|
||||
"expression":"(String('account_type').toLowerCase() != String('savings'))",
|
||||
"expression":"(String('account_type').toLowerCase() != String('savings') && String('account_type').toLowerCase() != String('current'))",
|
||||
"value_keys":[
|
||||
"account_type"
|
||||
],
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"question":"Loan Tenure",
|
||||
"question":"Loan Tenure (in months)",
|
||||
"question_key":"loan_tenure",
|
||||
"type":"1",
|
||||
"field_type":"num",
|
||||
|
||||
@ -151,7 +151,7 @@
|
||||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.5/css/materialize.min.css">-->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700|Material+Icons" rel="stylesheet">
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<meta name="theme-color" content="#1976d2">
|
||||
<meta name="theme-color" content="#d21919">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "PD Genie Lender",
|
||||
"short_name": "Lender - PD Genie",
|
||||
"theme_color": "#1976d2",
|
||||
"theme_color": "#d21919",
|
||||
"background_color": "#fafafa",
|
||||
"display": "standalone",
|
||||
"scope": ".",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user