merge:pd :kms
This commit is contained in:
parent
61c050d728
commit
2479b5f98c
46
ng6-seed/package-lock.json
generated
46
ng6-seed/package-lock.json
generated
@ -4273,8 +4273,7 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@ -4295,14 +4294,12 @@
|
|||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@ -4317,20 +4314,17 @@
|
|||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@ -4447,8 +4441,7 @@
|
|||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@ -4460,7 +4453,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@ -4475,7 +4467,6 @@
|
|||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
@ -4483,14 +4474,12 @@
|
|||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.1",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
@ -4509,7 +4498,6 @@
|
|||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
@ -4590,8 +4578,7 @@
|
|||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@ -4603,7 +4590,6 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@ -4689,8 +4675,7 @@
|
|||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
@ -4726,7 +4711,6 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@ -4746,7 +4730,6 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@ -4790,14 +4773,12 @@
|
|||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -9991,6 +9972,11 @@
|
|||||||
"has-flag": "^3.0.0"
|
"has-flag": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"sweetalert2": {
|
||||||
|
"version": "7.28.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-7.28.4.tgz",
|
||||||
|
"integrity": "sha512-HEAfIAPactjB8CvgsJClxT+6wv2OGh/KkgvgJ8xR28uAXtx9BUQAlws1mruaS7Jzn8gIt6esx4BEZLaZSGvBZw=="
|
||||||
|
},
|
||||||
"symbol-observable": {
|
"symbol-observable": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
|
||||||
|
|||||||
@ -60,6 +60,7 @@
|
|||||||
"screenfull": "^3.2.2",
|
"screenfull": "^3.2.2",
|
||||||
"simple-line-icons": "^2.4.1",
|
"simple-line-icons": "^2.4.1",
|
||||||
"sortablejs": "^1.6.0",
|
"sortablejs": "^1.6.0",
|
||||||
|
"sweetalert2": "^7.28.4",
|
||||||
"tether": "^1.4.0",
|
"tether": "^1.4.0",
|
||||||
"zone.js": "^0.8.26"
|
"zone.js": "^0.8.26"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -223,12 +223,12 @@ export class AwsService {
|
|||||||
let params: any;
|
let params: any;
|
||||||
if (userGroup == 'ADMIN') {
|
if (userGroup == 'ADMIN') {
|
||||||
console.log(userdata);
|
console.log(userdata);
|
||||||
if (userdata.fk_entity_id == 1) {
|
if (userdata.fk_entity_type_id == 1) {
|
||||||
params = {
|
params = {
|
||||||
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
||||||
Username: awsName /* required */
|
Username: awsName /* required */
|
||||||
};
|
};
|
||||||
} else if (userdata.fk_entity_id == 2) {
|
} else if (userdata.fk_entity_type_id == 2) {
|
||||||
params = {
|
params = {
|
||||||
UserPoolId: lender_poolData.UserPoolId, /* required */
|
UserPoolId: lender_poolData.UserPoolId, /* required */
|
||||||
Username: awsName /* required */
|
Username: awsName /* required */
|
||||||
@ -253,7 +253,7 @@ export class AwsService {
|
|||||||
adminenableUser(userdata, awsName) {
|
adminenableUser(userdata, awsName) {
|
||||||
let session:any = this.shared.getAccessToken() || "";
|
let session:any = this.shared.getAccessToken() || "";
|
||||||
// this.getconfig();
|
// this.getconfig();
|
||||||
|
console.log(userdata);
|
||||||
let config = "";
|
let config = "";
|
||||||
AWS.config.region = "ap-south-1";
|
AWS.config.region = "ap-south-1";
|
||||||
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
|
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
|
||||||
@ -271,13 +271,13 @@ export class AwsService {
|
|||||||
//cognitosdata = 7;
|
//cognitosdata = 7;
|
||||||
let params: any;
|
let params: any;
|
||||||
if (userGroup == 'ADMIN') {
|
if (userGroup == 'ADMIN') {
|
||||||
console.log(userdata);
|
|
||||||
if (userdata.fk_entity_id == 1) {
|
if (userdata.fk_entity_type_id == 1) {
|
||||||
params = {
|
params = {
|
||||||
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
||||||
Username: awsName /* required */
|
Username: awsName /* required */
|
||||||
};
|
};
|
||||||
} else if (userdata.fk_entity_id == 2) {
|
} else if (userdata.fk_entity_type_id == 2) {
|
||||||
params = {
|
params = {
|
||||||
UserPoolId: lender_poolData.UserPoolId, /* required */
|
UserPoolId: lender_poolData.UserPoolId, /* required */
|
||||||
Username: awsName /* required */
|
Username: awsName /* required */
|
||||||
@ -308,7 +308,7 @@ export class AwsService {
|
|||||||
)[0];
|
)[0];
|
||||||
// (userGroup);
|
// (userGroup);
|
||||||
if (userGroup == "ADMIN") {
|
if (userGroup == "ADMIN") {
|
||||||
if (userData.type.entity_type_id == 1) {
|
if (userData.type.fk_entity_type_id == 1) {
|
||||||
params = {
|
params = {
|
||||||
UserPoolId: sineedgedev_poolData.UserPoolId /* required */,
|
UserPoolId: sineedgedev_poolData.UserPoolId /* required */,
|
||||||
Username: userData.email /* required */,
|
Username: userData.email /* required */,
|
||||||
@ -331,7 +331,7 @@ export class AwsService {
|
|||||||
/* more items */
|
/* more items */
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
} else if (userData.type.entity_type_id == 2) {
|
} else if (userData.type.fk_entity_type_id == 2) {
|
||||||
console.log(2);
|
console.log(2);
|
||||||
params = {
|
params = {
|
||||||
UserPoolId: lender_poolData.UserPoolId /* required */,
|
UserPoolId: lender_poolData.UserPoolId /* required */,
|
||||||
@ -355,7 +355,7 @@ export class AwsService {
|
|||||||
/* more items */
|
/* more items */
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}else if(userData.type.entity_type_id == 3){
|
}else if(userData.type.fk_entity_type_id == 3){
|
||||||
params = {
|
params = {
|
||||||
UserPoolId: vendor_poolData.UserPoolId /* required */,
|
UserPoolId: vendor_poolData.UserPoolId /* required */,
|
||||||
Username: userData.email /* required */,
|
Username: userData.email /* required */,
|
||||||
@ -409,7 +409,7 @@ export class AwsService {
|
|||||||
//console.log(cognitodata);
|
//console.log(cognitodata);
|
||||||
|
|
||||||
|
|
||||||
|
console.log(userData);
|
||||||
this.getconfig();
|
this.getconfig();
|
||||||
|
|
||||||
//let cognitodata = "539bfefa-ae42-4bee-bf79-4b15d1a2af7f";
|
//let cognitodata = "539bfefa-ae42-4bee-bf79-4b15d1a2af7f";
|
||||||
@ -418,13 +418,20 @@ export class AwsService {
|
|||||||
|
|
||||||
let params: any;
|
let params: any;
|
||||||
|
|
||||||
|
if(userData.userid === undefined){
|
||||||
params = {
|
params = {
|
||||||
GroupName: "ADMIN" /* required */,
|
GroupName: "ADMIN" /* required */,
|
||||||
UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
||||||
Username: cognitodata.User.Username //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
Username: cognitodata.User.Username //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
||||||
};
|
};
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
params = {
|
||||||
|
GroupName: "ADMIN" /* required */,
|
||||||
|
UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */,
|
||||||
|
Username: userData.aws_name //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
//(params);
|
//(params);
|
||||||
return Observable.create(observe=>{
|
return Observable.create(observe=>{
|
||||||
@ -466,7 +473,7 @@ export class AwsService {
|
|||||||
//cognitosdata = 7;
|
//cognitosdata = 7;
|
||||||
let params:any;
|
let params:any;
|
||||||
if (userGroup == 'ADMIN') {
|
if (userGroup == 'ADMIN') {
|
||||||
if(user.type.entity_type_id ==1){
|
if(user.type.fk_entity_type_id ==1){
|
||||||
params = {
|
params = {
|
||||||
UserAttributes: [ /* required */
|
UserAttributes: [ /* required */
|
||||||
{
|
{
|
||||||
@ -484,7 +491,7 @@ export class AwsService {
|
|||||||
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
||||||
Username: user.email /* required */
|
Username: user.email /* required */
|
||||||
};
|
};
|
||||||
}else if(user.type.entity_type_id ==2){
|
}else if(user.type.fk_entity_type_id ==2){
|
||||||
params = {
|
params = {
|
||||||
UserAttributes: [ /* required */
|
UserAttributes: [ /* required */
|
||||||
{
|
{
|
||||||
@ -558,6 +565,24 @@ export class AwsService {
|
|||||||
UserPoolId: lender_poolData.UserPoolId /* required */,
|
UserPoolId: lender_poolData.UserPoolId /* required */,
|
||||||
Username: userData.aws_name /* required */,
|
Username: userData.aws_name /* required */,
|
||||||
|
|
||||||
|
UserAttributes: [
|
||||||
|
{
|
||||||
|
Name: "email" /* required */,
|
||||||
|
Value: changeusers.email
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "phone_number" /* required */,
|
||||||
|
Value: "+91" + changeusers.phone
|
||||||
|
}
|
||||||
|
/* more items */
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}else if(userData.fk_entity_type_id == 3)
|
||||||
|
{
|
||||||
|
params = {
|
||||||
|
UserPoolId: vendor_poolData.UserPoolId /* required */,
|
||||||
|
Username: userData.aws_name /* required */,
|
||||||
|
|
||||||
UserAttributes: [
|
UserAttributes: [
|
||||||
{
|
{
|
||||||
Name: "email" /* required */,
|
Name: "email" /* required */,
|
||||||
@ -581,34 +606,34 @@ export class AwsService {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
adminremoveGroup(roles,users){
|
// adminremoveGroup(roles,users){
|
||||||
console.log(roles);
|
// console.log(roles);
|
||||||
console.log(users);
|
// console.log(users);
|
||||||
if(users !==undefined){
|
// if(users !==undefined){
|
||||||
|
|
||||||
let session:any = this.shared.getAccessToken() ||"";
|
// let session:any = this.shared.getAccessToken() ||"";
|
||||||
this.getconfig();
|
// this.getconfig();
|
||||||
let params:any;
|
// let params:any;
|
||||||
if(users.fk_entity_id ==1){
|
// if(users.fk_entity_type_id ==1){
|
||||||
params = {
|
// params = {
|
||||||
GroupName: roles.GroupName, /* required */
|
// GroupName: roles.GroupName, /* required */
|
||||||
UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
// UserPoolId: sineedgedev_poolData.UserPoolId, /* required */
|
||||||
Username: users.aws_name//'2c64866e-e96f-453b-903f-2b6f831688af' /* required */
|
// Username: users.aws_name//'2c64866e-e96f-453b-903f-2b6f831688af' /* required */
|
||||||
};
|
// };
|
||||||
}else if(users.fk_entity_id ==2){
|
// }else if(users.fk_entity_id ==2){
|
||||||
params = {
|
// params = {
|
||||||
GroupName: roles.GroupName, /* required */
|
// GroupName: roles.GroupName, /* required */
|
||||||
UserPoolId: lender_poolData.UserPoolId, /* required */
|
// UserPoolId: lender_poolData.UserPoolId, /* required */
|
||||||
Username: users.aws_name//'2c64866e-e96f-453b-903f-2b6f831688af' /* required */
|
// Username: users.aws_name//'2c64866e-e96f-453b-903f-2b6f831688af' /* required */
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
// let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider();
|
||||||
cognitoidentityserviceprovider.adminRemoveUserFromGroup(params, function(err, data) {
|
// cognitoidentityserviceprovider.adminRemoveUserFromGroup(params, function(err, data) {
|
||||||
if (err) console.log(err, err.stack); // an error occurred
|
// if (err) console.log(err, err.stack); // an error occurred
|
||||||
else console.log(data); // successful response
|
// else console.log(data); // successful response
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
adminresetpassword(awsuser){
|
adminresetpassword(awsuser){
|
||||||
this.getconfig();
|
this.getconfig();
|
||||||
|
|||||||
@ -1,5 +1,171 @@
|
|||||||
<div class="pad-wrap">
|
<div class="pad-wrap">
|
||||||
<p>
|
<div fxLayout="row wrap">
|
||||||
Dashboard!
|
<div class="column" fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
|
||||||
</p>
|
<mat-card>
|
||||||
|
<div class="wheather-widget text-center grad-blue">
|
||||||
|
<div class="wheather-today">
|
||||||
|
<h3>PD Triggered</h3>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Full PD</p>
|
||||||
|
<h3>13</h3>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Smart PD</p>
|
||||||
|
<h3>13</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
<div class="column" fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
|
||||||
|
<mat-card>
|
||||||
|
<div class="wheather-widget text-center grad-blue">
|
||||||
|
<div class="wheather-today">
|
||||||
|
<h3>PD Allocated</h3>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Full PD</p>
|
||||||
|
<h3>33</h3>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Smart PD</p>
|
||||||
|
<h3>5</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
<div class="column" fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
|
||||||
|
<mat-card>
|
||||||
|
<div class="wheather-widget text-center grad-blue">
|
||||||
|
<div class="wheather-today">
|
||||||
|
<h3>PD Scheduled</h3>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Full PD</p>
|
||||||
|
<h3>20</h3>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Smart PD</p>
|
||||||
|
<h3>6</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Second row card's section-->
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div class="column" fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
|
||||||
|
<mat-card>
|
||||||
|
<div class="wheather-widget text-center grad-blue">
|
||||||
|
<div class="wheather-today">
|
||||||
|
<h3>PD Progress</h3>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Full PD</p>
|
||||||
|
<h3>34</h3>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Smart PD</p>
|
||||||
|
<h3>9</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
<div class="column" fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
|
||||||
|
<mat-card>
|
||||||
|
<div class="wheather-widget text-center grad-blue">
|
||||||
|
<div class="wheather-today">
|
||||||
|
<h3>PD Completed</h3>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Full PD</p>
|
||||||
|
<h3>65</h3>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Smart PD</p>
|
||||||
|
<h3>24</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
<div class="column" fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
|
||||||
|
<mat-card>
|
||||||
|
<div class="wheather-widget text-center grad-blue">
|
||||||
|
<div class="wheather-today">
|
||||||
|
<h3>QC Completed</h3>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Full PD</p>
|
||||||
|
<h3>47</h3>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.gt-sm="50%" fxFlex="100" class="p-gap wheather-child">
|
||||||
|
<p>Smart PD</p>
|
||||||
|
<h3>29</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Lender,Citywise, Same Status-->
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-title>Lender</mat-card-title>
|
||||||
|
<mat-card-subtitle>PD Triggered Today</mat-card-subtitle>
|
||||||
|
<hr>
|
||||||
|
<mat-list>
|
||||||
|
<ng-template let-item let-last="last" ngFor [ngForOf]="lenderpd">
|
||||||
|
<mat-list-item>
|
||||||
|
<h3 mat-line> {{item.lendername}} / {{item.billingaddr}} </h3>
|
||||||
|
<p mat-line> Full PD -{{item.fullpd}} / Smart PD -{{item.smartpd}} </p>
|
||||||
|
</mat-list-item>
|
||||||
|
</ng-template>
|
||||||
|
</mat-list>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-title>Citywise</mat-card-title>
|
||||||
|
<mat-card-subtitle>PD Triggered Today</mat-card-subtitle>
|
||||||
|
<hr>
|
||||||
|
<mat-list>
|
||||||
|
<ng-template let-item let-last="last" ngFor [ngForOf]="citywisepd">
|
||||||
|
<mat-list-item>
|
||||||
|
<h3 mat-line> {{item.cityname}} </h3>
|
||||||
|
<p mat-line> Full PD -{{item.fullpd}} / Smart PD -{{item.smartpd}} </p>
|
||||||
|
</mat-list-item>
|
||||||
|
</ng-template>
|
||||||
|
</mat-list>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.gt-sm="33.33%" fxFlex="100" class="m-gap p-gap">
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-title>Information</mat-card-title>
|
||||||
|
<mat-card-subtitle>PD In Same Status</mat-card-subtitle>
|
||||||
|
<hr>
|
||||||
|
<mat-list>
|
||||||
|
<ng-template let-item let-last="last" ngFor [ngForOf]="message">
|
||||||
|
<mat-list-item>
|
||||||
|
<img mat-list-avatar src="{{item.photo}}" alt="">
|
||||||
|
<h3 mat-line> {{item.applicantname}} </h3>
|
||||||
|
<p mat-line> {{item.applicantid}}</p>
|
||||||
|
<p mat-line> {{item.lendername}} - {{item.status}} </p>
|
||||||
|
</mat-list-item>
|
||||||
|
</ng-template>
|
||||||
|
</mat-list>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -9,4 +9,57 @@ export class DashboardComponent {
|
|||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//Lender wise PD Triggered
|
||||||
|
lenderpd: Object[] = [{
|
||||||
|
lendername:'ICICI',
|
||||||
|
billingaddr:'Bangalore',
|
||||||
|
fullpd:'9',
|
||||||
|
smartpd:'6',
|
||||||
|
}, {
|
||||||
|
lendername:'IOB',
|
||||||
|
billingaddr:'Chennai',
|
||||||
|
fullpd:'10',
|
||||||
|
smartpd:'5',
|
||||||
|
}, {
|
||||||
|
lendername:'SBI',
|
||||||
|
billingaddr:'Pune',
|
||||||
|
fullpd:'16',
|
||||||
|
smartpd:'3',
|
||||||
|
}, ];
|
||||||
|
|
||||||
|
//City Wise PD Triggered
|
||||||
|
citywisepd: Object[] = [{
|
||||||
|
cityname: 'Bangalore',
|
||||||
|
fullpd:'45',
|
||||||
|
smartpd:'17',
|
||||||
|
}, {
|
||||||
|
cityname: 'Chennai',
|
||||||
|
fullpd:'33',
|
||||||
|
smartpd:'16',
|
||||||
|
}, {
|
||||||
|
cityname: 'Salem',
|
||||||
|
fullpd:'22',
|
||||||
|
smartpd:'12',
|
||||||
|
}, ];
|
||||||
|
|
||||||
|
//Same status
|
||||||
|
message: Object[] = [{
|
||||||
|
applicantname: 'Saravana',
|
||||||
|
applicantid:'ICICITN0118000354',
|
||||||
|
lendername:'ICICI',
|
||||||
|
status:'Allocated',
|
||||||
|
photo: 'assets/images/face3.jpg',
|
||||||
|
}, {
|
||||||
|
applicantname: 'Kumaran',
|
||||||
|
applicantid:'IOBKA0418000578',
|
||||||
|
lendername:'IOB',
|
||||||
|
status:'Allocated',
|
||||||
|
photo: 'assets/images/face6.jpg',
|
||||||
|
}, {
|
||||||
|
applicantname: 'Priya',
|
||||||
|
applicantid:'SBIGA0118000241',
|
||||||
|
lendername:'SBI',
|
||||||
|
status:'Triggered',
|
||||||
|
photo: 'assets/images/face4.jpg',
|
||||||
|
}, ];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,11 +17,11 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<!-- <ngx-select-dropdown [multiple]="false" [value]="citydatas.city_id" [options]="citydatas" ></ngx-select-dropdown> -->
|
<!-- <ngx-select-dropdown [multiple]="false" [value]="citydatas.city_id" [options]="citydatas" ></ngx-select-dropdown> -->
|
||||||
<mat-select placeholder="Pick Up City name" required [formControl]="_branchForm.controls['fk_city_id']">
|
<mat-select placeholder="City Name" required [formControl]="_branchForm.controls['fk_city_id']">
|
||||||
<!-- <mat-option (click)="onChangedData()" *ngFor="let masters of masterArray" [value]="masters.value" [disabled]="masters.disabled"> -->
|
<!-- <mat-option (click)="onChangedData()" *ngFor="let masters of masterArray" [value]="masters.value" [disabled]="masters.disabled"> -->
|
||||||
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id">{{ cd.name }}</mat-option>
|
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id">{{ cd.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</mat-error>
|
<mat-error *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">City Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <small *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</small> -->
|
<!-- <small *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</small> -->
|
||||||
</div>
|
</div>
|
||||||
@ -29,7 +29,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput type="text" placeholder="Branch Name" required [formControl]="_branchForm.controls['name']">
|
<input matInput type="text" placeholder="Branch Name" required [formControl]="_branchForm.controls['name']">
|
||||||
<mat-error *ngIf="!_branchForm.controls['name'].valid && _branchForm.controls['name'].touched">You must inculde a Branch Name</mat-error>
|
<mat-error *ngIf="!_branchForm.controls['name'].valid && _branchForm.controls['name'].touched">Branch Name Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <small *ngIf="!_branchForm.controls['name'].valid && _branchForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</small> -->
|
<!-- <small *ngIf="!_branchForm.controls['name'].valid && _branchForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</small> -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -31,17 +31,17 @@ fxLayoutAlign="center">
|
|||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Pick Up State Name" required [formControl]="_cityForm.controls['fk_state_id']">
|
<mat-select placeholder="State Name" required [formControl]="_cityForm.controls['fk_state_id']">
|
||||||
<mat-option *ngFor="let sd of stateDatas" [value]="sd.state_id">{{ sd.name }}</mat-option>
|
<mat-option *ngFor="let sd of stateDatas" [value]="sd.state_id">{{ sd.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="!_cityForm.controls['fk_state_id'].valid && _cityForm.controls['fk_state_id'].touched" class="mat-text-warn">You must Pickup State Name.</mat-error>
|
<mat-error *ngIf="!_cityForm.controls['fk_state_id'].valid && _cityForm.controls['fk_state_id'].touched" class="mat-text-warn">State Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput type="text" placeholder="City Name" required [formControl]="_cityForm.controls['name']">
|
<input matInput type="text" placeholder="City Name" required [formControl]="_cityForm.controls['name']">
|
||||||
<mat-error *ngIf="!_cityForm.controls['name'].valid && _cityForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_cityForm.controls['name'].valid && _cityForm.controls['name'].touched" class="mat-text-warn">City Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Rating" required [formControl]="_CommentOnLocalityForm.controls['rating']">
|
<input matInput type="text" placeholder="Rating" required [formControl]="_CommentOnLocalityForm.controls['rating']">
|
||||||
<mat-error *ngIf="!_CommentOnLocalityForm.controls['rating'].valid && _CommentOnLocalityForm.controls['rating'].touched" class="mat-text-warn">You must include a Rating.</mat-error>
|
<mat-error *ngIf="!_CommentOnLocalityForm.controls['rating'].valid && _CommentOnLocalityForm.controls['rating'].touched" class="mat-text-warn">Rating Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,38 +16,38 @@
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Company Name" required [formControl]="_companyForm.controls['name']">
|
<input matInput type="text" placeholder="Company Name" required [formControl]="_companyForm.controls['name']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['name'].valid && _companyForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['name'].valid && _companyForm.controls['name'].touched" class="mat-text-warn">Company Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Company addressline1" required [formControl]="_companyForm.controls['addressline1']">
|
<input matInput type="text" placeholder="Company Address Line1" required [formControl]="_companyForm.controls['addressline1']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['addressline1'].valid && _companyForm.controls['addressline1'].touched" class="mat-text-warn">You must include a addressline1.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['addressline1'].valid && _companyForm.controls['addressline1'].touched" class="mat-text-warn">Company Address Line1 Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Company addressline2" required [formControl]="_companyForm.controls['addressline2']">
|
<input matInput type="text" placeholder="Company Address Line2" required [formControl]="_companyForm.controls['addressline2']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['addressline2'].valid && _companyForm.controls['addressline2'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['addressline2'].valid && _companyForm.controls['addressline2'].touched" class="mat-text-warn">Company Address Line2 Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Company addressline3" required [formControl]="_companyForm.controls['addressline3']">
|
<input matInput type="text" placeholder="Company Address Line3" required [formControl]="_companyForm.controls['addressline3']">
|
||||||
<mat-error *ngIf="!_companyForm.controls['addressline3'].valid && _companyForm.controls['addressline3'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['addressline3'].valid && _companyForm.controls['addressline3'].touched" class="mat-text-warn">Company Address Line3 Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="Pick Up City name" required [formControl]="_companyForm.controls['city']">
|
<mat-select placeholder="City Name" required [formControl]="_companyForm.controls['city']">
|
||||||
|
|
||||||
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id">{{ cd.name }}</mat-option>
|
<mat-option *ngFor="let cd of citydatas" [value]="cd.city_id">{{ cd.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="!_companyForm.controls['city'].valid && _companyForm.controls['city'].touched" class="mat-text-warn">You must include a City.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['city'].valid && _companyForm.controls['city'].touched" class="mat-text-warn">City Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <small *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</small> -->
|
<!-- <small *ngIf="!_branchForm.controls['fk_city_id'].valid && _branchForm.controls['fk_city_id'].touched" class="mat-text-warn">You must Pickup City Name.</small> -->
|
||||||
</div>
|
</div>
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Pin code" required [formControl]="_companyForm.controls['pincode']">
|
<input matInput type="text" placeholder="Pin code" required [formControl]="_companyForm.controls['pincode']">
|
||||||
<mat-hint>pincode should be in 6 digit format</mat-hint>
|
<mat-hint>Pincode should be in 6 digit format</mat-hint>
|
||||||
<!-- <mat-error *ngIf="_companyForm.controls['pincode'].hasError('required') && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include phone number.</mat-error> -->
|
<!-- <mat-error *ngIf="_companyForm.controls['pincode'].hasError('required') && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include phone number.</mat-error> -->
|
||||||
<!-- <mat-error *ngIf="!_companyForm.controls['pincode'].valid && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include a pincode number.</mat-error> -->
|
<!-- <mat-error *ngIf="!_companyForm.controls['pincode'].valid && _companyForm.controls['pincode'].touched" class="mat-text-warn">You must include a pincode number.</mat-error> -->
|
||||||
<mat-error *ngIf="_companyForm.controls['pincode'].hasError('minlength') && _companyForm.controls['pincode'].touched" class="mat-text-warn">Your pincode must be at least 5 characters long.</mat-error>
|
<mat-error *ngIf="_companyForm.controls['pincode'].hasError('minlength') && _companyForm.controls['pincode'].touched" class="mat-text-warn">Your pincode must be at least 5 characters long.</mat-error>
|
||||||
@ -65,10 +65,10 @@
|
|||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="Pick Up State Name" required [formControl]="_companyForm.controls['state']">
|
<mat-select placeholder="State Name" required [formControl]="_companyForm.controls['state']">
|
||||||
<mat-option *ngFor="let sd of stateDatas" [value]="sd.state_id">{{ sd.name }}</mat-option>
|
<mat-option *ngFor="let sd of stateDatas" [value]="sd.state_id">{{ sd.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="!_companyForm.controls['state'].valid && _companyForm.controls['state'].touched" class="mat-text-warn">You must Pickup a State.</mat-error>
|
<mat-error *ngIf="!_companyForm.controls['state'].valid && _companyForm.controls['state'].touched" class="mat-text-warn">State Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Description" required [formControl]="_customerBehaviourForm.controls['description']">
|
<input matInput type="text" placeholder="Description" required [formControl]="_customerBehaviourForm.controls['description']">
|
||||||
<mat-error *ngIf="!_customerBehaviourForm.controls['description'].valid && _customerBehaviourForm.controls['description'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_customerBehaviourForm.controls['description'].valid && _customerBehaviourForm.controls['description'].touched" class="mat-text-warn">Description Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Name" required [formControl]="_customerSegmentForm.controls['name']">
|
<input matInput type="text" placeholder="Name" required [formControl]="_customerSegmentForm.controls['name']">
|
||||||
<mat-error *ngIf="!_customerSegmentForm.controls['name'].valid && _customerSegmentForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_customerSegmentForm.controls['name'].valid && _customerSegmentForm.controls['name'].touched" class="mat-text-warn">Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -42,7 +42,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Abbrevation" required [formControl]="_customerSegmentForm.controls['abbr']">
|
<input matInput type="text" placeholder="Abbrevation" required [formControl]="_customerSegmentForm.controls['abbr']">
|
||||||
<mat-error *ngIf="!_customerSegmentForm.controls['abbr'].valid && _customerSegmentForm.controls['abbr'].touched" class="mat-text-warn">You must include a Abbrevation.</mat-error>
|
<mat-error *ngIf="!_customerSegmentForm.controls['abbr'].valid && _customerSegmentForm.controls['abbr'].touched" class="mat-text-warn">Abbrevation Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Name" required [formControl]="_designationForm.controls['name']">
|
<input matInput type="text" placeholder="Name" required [formControl]="_designationForm.controls['name']">
|
||||||
<mat-error *ngIf="!_designationForm.controls['name'].valid && _designationForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_designationForm.controls['name'].valid && _designationForm.controls['name'].touched" class="mat-text-warn">Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -42,7 +42,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Short Name" required [formControl]="_designationForm.controls['short_name']">
|
<input matInput type="text" placeholder="Short Name" required [formControl]="_designationForm.controls['short_name']">
|
||||||
<mat-error *ngIf="!_designationForm.controls['short_name'].valid && _designationForm.controls['short_name'].touched" class="mat-text-warn">You must include a Short Name.</mat-error>
|
<mat-error *ngIf="!_designationForm.controls['short_name'].valid && _designationForm.controls['short_name'].touched" class="mat-text-warn">Short Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Frequency Name" required [formControl]="_frequencyForm.controls['name']">
|
<input matInput type="text" placeholder="Frequency Name" required [formControl]="_frequencyForm.controls['name']">
|
||||||
<mat-error *ngIf="!_frequencyForm.controls['name'].valid && _frequencyForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_frequencyForm.controls['name'].valid && _frequencyForm.controls['name'].touched" class="mat-text-warn">Frequency Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -33,7 +33,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Classification Name" required [formControl]="_IndustryClassificationForm.controls['name']">
|
<input matInput type="text" placeholder="Classification Name" required [formControl]="_IndustryClassificationForm.controls['name']">
|
||||||
<mat-error *ngIf="!_IndustryClassificationForm.controls['name'].valid && _IndustryClassificationForm.controls['name'].touched" class="mat-text-warn">You must include a Classified Name.</mat-error>
|
<mat-error *ngIf="!_IndustryClassificationForm.controls['name'].valid && _IndustryClassificationForm.controls['name'].touched" class="mat-text-warn">Classified Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Lender Hierarchy Name" required [formControl]="_lenderHierarchyForm.controls['lender_hierarchy']">
|
<input matInput type="text" placeholder="Lender Hierarchy Name" required [formControl]="_lenderHierarchyForm.controls['lender_hierarchy']">
|
||||||
<mat-error *ngIf="!_lenderHierarchyForm.controls['lender_hierarchy'].valid && _lenderHierarchyForm.controls['lender_hierarchy'].touched" class="mat-text-warn">You must include a Lender Hierarchy Name.</mat-error>
|
<mat-error *ngIf="!_lenderHierarchyForm.controls['lender_hierarchy'].valid && _lenderHierarchyForm.controls['lender_hierarchy'].touched" class="mat-text-warn">Lender Hierarchy Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ fxLayout="row">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Name" required [formControl]="_occupationForm.controls['name']">
|
<input matInput type="text" placeholder="Name" required [formControl]="_occupationForm.controls['name']">
|
||||||
<mat-error *ngIf="!_occupationForm.controls['name'].valid && _occupationForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_occupationForm.controls['name'].valid && _occupationForm.controls['name'].touched" class="mat-text-warn">Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -33,8 +33,8 @@ fxLayoutAlign="center">
|
|||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Name" required [formControl]="_pdLocationApproachForm.controls['description']">
|
<input matInput type="text" placeholder="Descriptsion" required [formControl]="_pdLocationApproachForm.controls['description']">
|
||||||
<mat-error *ngIf="!_pdLocationApproachForm.controls['description'].valid && _pdLocationApproachForm.controls['description'].touched" class="mat-text-warn">You must include a Description.</mat-error>
|
<mat-error *ngIf="!_pdLocationApproachForm.controls['description'].valid && _pdLocationApproachForm.controls['description'].touched" class="mat-text-warn">Description Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -33,8 +33,8 @@ fxLayoutAlign="center">
|
|||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Name" required [formControl]="_pdTypeForm.controls['type_name']">
|
<input matInput type="text" placeholder="Type Name" required [formControl]="_pdTypeForm.controls['type_name']">
|
||||||
<mat-error *ngIf="!_pdTypeForm.controls['type_name'].valid && _pdTypeForm.controls['type_name'].touched" class="mat-text-warn">You must include a type_name.</mat-error>
|
<mat-error *ngIf="!_pdTypeForm.controls['type_name'].valid && _pdTypeForm.controls['type_name'].touched" class="mat-text-warn">Type Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Product Name" required [formControl]="_productMasterForm.controls['name']">
|
<input matInput type="text" placeholder="Product Name" required [formControl]="_productMasterForm.controls['name']">
|
||||||
<mat-error *ngIf="!_productMasterForm.controls['name'].valid && _productMasterForm.controls['name'].touched" class="mat-text-warn">You must include a Product name.</mat-error>
|
<mat-error *ngIf="!_productMasterForm.controls['name'].valid && _productMasterForm.controls['name'].touched" class="mat-text-warn">Product Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -41,7 +41,7 @@ fxLayoutAlign="center">
|
|||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Product Abbr" required [formControl]="_productMasterForm.controls['abbr']">
|
<input matInput type="text" placeholder="Product Abbr" required [formControl]="_productMasterForm.controls['abbr']">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-error *ngIf="!_productMasterForm.controls['abbr'].valid && _productMasterForm.controls['abbr'].touched" class="mat-text-warn">You must include a Product abbrevation.</mat-error>
|
<mat-error *ngIf="!_productMasterForm.controls['abbr'].valid && _productMasterForm.controls['abbr'].touched" class="mat-text-warn">Product Abbrevation Required.</mat-error>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="text-align:right;">
|
<div class="row" style="text-align:right;">
|
||||||
|
|||||||
@ -16,7 +16,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Category Name" required [formControl]="_questionCategoryForm.controls['categroy_name']">
|
<input matInput type="text" placeholder="Category Name" required [formControl]="_questionCategoryForm.controls['categroy_name']">
|
||||||
<mat-error *ngIf="!_questionCategoryForm.controls['categroy_name'].valid && _questionCategoryForm.controls['categroy_name'].touched" class="mat-text-warn">You must include a category name.</mat-error>
|
<mat-error *ngIf="!_questionCategoryForm.controls['categroy_name'].valid && _questionCategoryForm.controls['categroy_name'].touched" class="mat-text-warn">Category Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Name" required [formControl]="_regionsForm.controls['name']">
|
<input matInput type="text" placeholder="Name" required [formControl]="_regionsForm.controls['name']">
|
||||||
<mat-error *ngIf="!_regionsForm.controls['name'].valid && _regionsForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_regionsForm.controls['name'].valid && _regionsForm.controls['name'].touched" class="mat-text-warn">Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Name" required [formControl]="_relationShipForm.controls['name']">
|
<input matInput type="text" placeholder="Name" required [formControl]="_relationShipForm.controls['name']">
|
||||||
<mat-error *ngIf="!_relationShipForm.controls['name'].valid && _relationShipForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_relationShipForm.controls['name'].valid && _relationShipForm.controls['name'].touched" class="mat-text-warn">Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -32,17 +32,17 @@ fxLayoutAlign="center">
|
|||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Pick Up Region Name" required [formControl]="_statesForm.controls['fk_region_id']">
|
<mat-select placeholder="Region Name" required [formControl]="_statesForm.controls['fk_region_id']">
|
||||||
<mat-option *ngFor="let sd of regionDatas" [value]="sd.region_id">{{ sd.name }}</mat-option>
|
<mat-option *ngFor="let sd of regionDatas" [value]="sd.region_id">{{ sd.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="!_statesForm.controls['fk_region_id'].valid && _statesForm.controls['fk_region_id'].touched" class="mat-text-warn">You must include a Region.</mat-error>
|
<mat-error *ngIf="!_statesForm.controls['fk_region_id'].valid && _statesForm.controls['fk_region_id'].touched" class="mat-text-warn">Region Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Name" required [formControl]="_statesForm.controls['name']">
|
<input matInput type="text" placeholder="Name" required [formControl]="_statesForm.controls['name']">
|
||||||
<mat-error *ngIf="!_statesForm.controls['name'].valid && _statesForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_statesForm.controls['name'].valid && _statesForm.controls['name'].touched" class="mat-text-warn">Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -58,7 +58,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Code" required [formControl]="_statesForm.controls['code']">
|
<input matInput type="text" placeholder="Code" required [formControl]="_statesForm.controls['code']">
|
||||||
<mat-error *ngIf="!_statesForm.controls['code'].valid && _statesForm.controls['code'].touched" class="mat-text-warn">You must include a Code.</mat-error>
|
<mat-error *ngIf="!_statesForm.controls['code'].valid && _statesForm.controls['code'].touched" class="mat-text-warn">Code Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -41,10 +41,10 @@ fxLayoutAlign="center">
|
|||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Pick Up Product Name" required [formControl]="_subProductMasterForm.controls['fk_product_id']">
|
<mat-select placeholder="Product Name" required [formControl]="_subProductMasterForm.controls['fk_product_id']">
|
||||||
<mat-option *ngFor="let sd of productDatas" [value]="sd.product_id">{{ sd.name }}</mat-option>
|
<mat-option *ngFor="let sd of productDatas" [value]="sd.product_id">{{ sd.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="!_subProductMasterForm.controls['fk_product_id'].valid && _subProductMasterForm.controls['fk_product_id'].touched" class="mat-text-warn">You must include a Product name.</mat-error>
|
<mat-error *ngIf="!_subProductMasterForm.controls['fk_product_id'].valid && _subProductMasterForm.controls['fk_product_id'].touched" class="mat-text-warn">Product Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<!-- <mat-form-field style="width: 100%">
|
<!-- <mat-form-field style="width: 100%">
|
||||||
@ -56,7 +56,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Sub Product Name" required [formControl]="_subProductMasterForm.controls['name']">
|
<input matInput type="text" placeholder="Sub Product Name" required [formControl]="_subProductMasterForm.controls['name']">
|
||||||
<mat-error *ngIf="!_subProductMasterForm.controls['name'].valid && _subProductMasterForm.controls['name'].touched" class="mat-text-warn">You must include a Sub Product name.</mat-error>
|
<mat-error *ngIf="!_subProductMasterForm.controls['name'].valid && _subProductMasterForm.controls['name'].touched" class="mat-text-warn">Sub Product Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -65,7 +65,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Sub Product Abbrevation" required [formControl]="_subProductMasterForm.controls['abbr']">
|
<input matInput type="text" placeholder="Sub Product Abbrevation" required [formControl]="_subProductMasterForm.controls['abbr']">
|
||||||
<mat-error *ngIf="!_subProductMasterForm.controls['abbr'].valid && _subProductMasterForm.controls['abbr'].touched" class="mat-text-warn">You must include a Sub Product Abbrevation.</mat-error>
|
<mat-error *ngIf="!_subProductMasterForm.controls['abbr'].valid && _subProductMasterForm.controls['abbr'].touched" class="mat-text-warn">Sub Product Abbrevation Requireds.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="ml-xs mr-xs">
|
<div class="ml-xs mr-xs">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Title" required [formControl]="_titleForm.controls['name']">
|
<input matInput type="text" placeholder="Title" required [formControl]="_titleForm.controls['name']">
|
||||||
<mat-error *ngIf="!_titleForm.controls['name'].valid && _titleForm.controls['name'].touched" class="mat-text-warn">You must include a Title.</mat-error>
|
<mat-error *ngIf="!_titleForm.controls['name'].valid && _titleForm.controls['name'].touched" class="mat-text-warn">Title Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="Activity Name" required [formControl]="_activityMasterForm.controls['name']">
|
<input matInput type="text" placeholder="Activity Name" required [formControl]="_activityMasterForm.controls['name']">
|
||||||
<mat-error *ngIf="!_activityMasterForm.controls['name'].valid && _activityMasterForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_activityMasterForm.controls['name'].valid && _activityMasterForm.controls['name'].touched" class="mat-text-warn">Activity Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -32,7 +32,7 @@ fxLayoutAlign="center">
|
|||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput type="text" placeholder="UOM Name" required [formControl]="_uomForm.controls['name']">
|
<input matInput type="text" placeholder="UOM Name" required [formControl]="_uomForm.controls['name']">
|
||||||
<mat-error *ngIf="!_uomForm.controls['name'].valid && _uomForm.controls['name'].touched" class="mat-text-warn">You must include a Name.</mat-error>
|
<mat-error *ngIf="!_uomForm.controls['name'].valid && _uomForm.controls['name'].touched" class="mat-text-warn">UOM Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -18,6 +18,9 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
<div *ngIf="noRecordFound" class="nocontent ml-xs mr-xs" style="width: 90%;">No records found</div>
|
||||||
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="managepdteam()" matTooltip="Manage PD Team" matTooltipPosition="above"><mat-icon>people</mat-icon></button>
|
||||||
|
</div>
|
||||||
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
<div class="ml-xs mr-xs" style="width: 10%; text-align: right;">
|
||||||
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" [color]="color" (click)="addPdTeam()" matTooltip="Add PD Team" matTooltipPosition="above"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -69,7 +69,10 @@ export class PdTeamListComponent implements OnInit {
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**To Manage Team */
|
||||||
|
managepdteam(){
|
||||||
|
this.router.navigate(['/setting/pdteam/pdteammanage']);
|
||||||
|
}
|
||||||
changeListView(){
|
changeListView(){
|
||||||
this.getPdTeam();
|
this.getPdTeam();
|
||||||
this.listView = true;
|
this.listView = true;
|
||||||
|
|||||||
@ -0,0 +1,54 @@
|
|||||||
|
<mat-card>
|
||||||
|
|
||||||
|
<div style="margin: 6px; padding: 4px;">
|
||||||
|
<div class="p_title" style="font-size: 26px; font-style: bold;">Manage PD Team</div>
|
||||||
|
<!--<div class="sub_title" style="font-size: 11px;">List of Entity Master Details</div>-->
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="loader">
|
||||||
|
<mat-progress-bar mode="indeterminate" color="primary" class="mb-1"></mat-progress-bar>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none" *ngIf="viewpage">
|
||||||
|
<div fxFlex="100%">
|
||||||
|
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.gt-sm="30" fxFlex.gt-xs="30" fxFlex="50" *ngFor="let pdteamdetails of pdTeamManageData; let i = index;" >
|
||||||
|
<mat-card class="mb-1">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<mat-card-title style="margin-bottom:0px!important;" >{{pdteamdetails.team_name | titlecase}} <mat-icon (click)="cityinfo(pdteamdetails.pdteam_id)"style="margin-left:29px;;">info</mat-icon></mat-card-title>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<mat-card-subtitle >{{pdteamdetails.short_name}}</mat-card-subtitle>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<mat-list class='bag' [dragula]='"bag"' [dragulaModel]="pdteamdetails.USERPROFILE" [attr.data-id]="pdteamdetails.pdteam_id" >
|
||||||
|
|
||||||
|
|
||||||
|
<mat-list-item *ngFor="let users of pdteamdetails.USERPROFILE let i=index" [attr.data-id]="users.userid" [attr.data-index]="i">
|
||||||
|
<div #bag1 class="d-flex w-100 justify-content-between">
|
||||||
|
{{ users.user_full_name |titlecase}}
|
||||||
|
|
||||||
|
<i class="fa fa-arrows-alt ml-1 mr-1"aria-hidden="true"></i></div></mat-list-item>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-list>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div style="width: 10%; text-align: right;">
|
||||||
|
<button mat-fab class="mr-1 mb-1" style="margin-top: 7px;" color="primary" matTooltip="Submit" [disabled]="btnsave" (click)="getnewTeamDetails()" matTooltipPosition="above"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="!viewpage" style="text-align: center">
|
||||||
|
<span>{{pdTeamManageData}}</span>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
.tooltip {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
border-bottom: 1px dotted black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip .tooltiptext {
|
||||||
|
visibility: hidden;
|
||||||
|
width: 120px;
|
||||||
|
background-color: black;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 5px 0;
|
||||||
|
|
||||||
|
/* Position the tooltip */
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip:hover .tooltiptext {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { PdTeamManageComponent } from './pd-team-manage.component';
|
||||||
|
|
||||||
|
describe('PdTeamManageComponent', () => {
|
||||||
|
let component: PdTeamManageComponent;
|
||||||
|
let fixture: ComponentFixture<PdTeamManageComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ PdTeamManageComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(PdTeamManageComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
import { Output, EventEmitter,Component, OnInit,ViewEncapsulation, Directive, ViewChild } from '@angular/core';
|
||||||
|
import { PdTeamService } from '../../service/masters/pd-team.service';
|
||||||
|
import { DragulaService } from 'ng2-dragula';
|
||||||
|
|
||||||
|
/**sweet alert */
|
||||||
|
import Swal from 'sweetalert2'
|
||||||
|
@Component({
|
||||||
|
selector: 'app-pd-team-manage',
|
||||||
|
templateUrl: './pd-team-manage.component.html',
|
||||||
|
styleUrls: ['./pd-team-manage.component.scss']
|
||||||
|
})
|
||||||
|
|
||||||
|
export class PdTeamManageComponent implements OnInit {
|
||||||
|
saveData: any;
|
||||||
|
viewpage:boolean = false;
|
||||||
|
pdTeamManageData:any;
|
||||||
|
pdTeamColor:any =[];
|
||||||
|
pdTeamNewList:any = [];
|
||||||
|
transferData: any;
|
||||||
|
btnsave:boolean = true;
|
||||||
|
teamDetails:any = [];
|
||||||
|
loader:boolean = false;
|
||||||
|
mapDetails:any =[];
|
||||||
|
@ViewChild('bag1') bag1: any;
|
||||||
|
constructor( public pdteammanage:PdTeamService,private dragulaService:DragulaService) {
|
||||||
|
this.getPDTeamManageDetails();
|
||||||
|
this.getpdteamchange();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getPDTeamManageDetails()
|
||||||
|
{
|
||||||
|
this.loader = true;
|
||||||
|
this.pdteammanage.getPdTeam().subscribe(res=>{
|
||||||
|
this.pdTeamManageData = res;
|
||||||
|
if(this.pdTeamManageData.dataStatus == true)
|
||||||
|
{
|
||||||
|
this.loader = false;
|
||||||
|
this.btnsave = true;
|
||||||
|
this.viewpage = true;
|
||||||
|
this.pdTeamManageData = this.pdTeamManageData.records;
|
||||||
|
|
||||||
|
console.log(this.pdTeamManageData);
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
this.viewpage = false;
|
||||||
|
this.pdTeamManageData = "No Records Found";
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getpdteamchange(){
|
||||||
|
let that = this;
|
||||||
|
|
||||||
|
//console.log(this.bag1);
|
||||||
|
that.dragulaService.dropModel.subscribe((args: any) => {
|
||||||
|
|
||||||
|
let [bagName, el, target, source] = args;
|
||||||
|
//console.log(el);
|
||||||
|
console.log(this.bag1.nativeElement);
|
||||||
|
console.log(this.bag1.nativeElement === target);
|
||||||
|
if(this.bag1.nativeElement){ // needed since dropModel triggers for all bags, not only on the dropped bag
|
||||||
|
console.log(this.bag1.nativeElement);
|
||||||
|
|
||||||
|
let transferData:any = {
|
||||||
|
userid: el.dataset.id,
|
||||||
|
oldTeamName: source.dataset.id,
|
||||||
|
newTeamName: target.dataset.id,
|
||||||
|
oldIndex: el.dataset.index
|
||||||
|
}
|
||||||
|
console.log(el);
|
||||||
|
for(let i = 0; i < that.pdTeamManageData.length; i++){
|
||||||
|
let users = that.pdTeamManageData[i].USERPROFILE;
|
||||||
|
for(let us of users){
|
||||||
|
if(us.userid == transferData.userid){
|
||||||
|
transferData.newIndex = i;
|
||||||
|
//console.log(transferData);
|
||||||
|
this.pdTeamNewList.push(transferData);
|
||||||
|
//console.log(that.transferData);
|
||||||
|
console.log(this.pdTeamNewList);
|
||||||
|
this.btnsave = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
getnewTeamDetails(){
|
||||||
|
if(this.pdTeamNewList.length ==0)
|
||||||
|
{
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
this.pdteammanage.savePdTeamManage(this.pdTeamNewList).subscribe(res=>
|
||||||
|
{
|
||||||
|
this.saveData = res;
|
||||||
|
if(this.saveData.dataStatus == true)
|
||||||
|
{
|
||||||
|
this.getPDTeamManageDetails();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cityinfo(id) {
|
||||||
|
Swal("<h5 style='align-items:left !important';>CITY:<br/>"+this.pdTeamManageData[id].CITYMAP+'<br/>'+"PRODUCTS: "+this.pdTeamManageData[id].PRODUCTS+"<br/>"+"CS: "+this.pdTeamManageData[id].CUSTOMERSEGMENT+".. </h5 >");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,6 +3,9 @@ import { RouterModule } from '@angular/router';
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||||
|
import { PdTeamManageComponent } from './pd-team-manage/pd-team-manage.component';
|
||||||
|
import {MatListModule} from '@angular/material/list';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
@ -30,6 +33,7 @@ import { PdTeamRoutes } from './pd-team.routing';
|
|||||||
|
|
||||||
/** Service */
|
/** Service */
|
||||||
import { PdTeamService } from '../service/masters/pd-team.service';
|
import { PdTeamService } from '../service/masters/pd-team.service';
|
||||||
|
import { DragulaModule } from 'ng2-dragula';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom angular notifier options
|
* Custom angular notifier options
|
||||||
@ -97,13 +101,14 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
NgxDatatableModule,
|
NgxDatatableModule,
|
||||||
MatSortModule,
|
MatSortModule,
|
||||||
MatSlideToggleModule,
|
MatSlideToggleModule,
|
||||||
MatTooltipModule,
|
MatTooltipModule,MatListModule,DragulaModule,
|
||||||
NotifierModule.withConfig(customNotifierOptions),
|
NotifierModule.withConfig(customNotifierOptions),
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
PdTeamListComponent,
|
PdTeamListComponent,
|
||||||
PdTeamAddComponent,
|
PdTeamAddComponent,
|
||||||
PdTeamEditComponent],
|
PdTeamEditComponent,
|
||||||
|
PdTeamManageComponent],
|
||||||
|
|
||||||
providers: [PdTeamService]
|
providers: [PdTeamService]
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import { Routes } from '@angular/router';
|
|||||||
import { PdTeamAddComponent } from '../pd-team/pd-team-add/pd-team-add.component';
|
import { PdTeamAddComponent } from '../pd-team/pd-team-add/pd-team-add.component';
|
||||||
import { PdTeamEditComponent } from '../pd-team/pd-team-edit/pd-team-edit.component';
|
import { PdTeamEditComponent } from '../pd-team/pd-team-edit/pd-team-edit.component';
|
||||||
import { PdTeamListComponent } from '../pd-team/pd-team-list/pd-team-list.component';
|
import { PdTeamListComponent } from '../pd-team/pd-team-list/pd-team-list.component';
|
||||||
|
import { PdTeamManageComponent } from './pd-team-manage/pd-team-manage.component';
|
||||||
|
|
||||||
|
|
||||||
export const PdTeamRoutes: Routes = [{
|
export const PdTeamRoutes: Routes = [{
|
||||||
@ -16,6 +17,9 @@ export const PdTeamRoutes: Routes = [{
|
|||||||
},{
|
},{
|
||||||
path:'editpdteam',
|
path:'editpdteam',
|
||||||
component:PdTeamEditComponent
|
component:PdTeamEditComponent
|
||||||
|
},{
|
||||||
|
path:'pdteammanage',
|
||||||
|
component:PdTeamManageComponent
|
||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,8 @@ export interface Master {
|
|||||||
export class PdTeamService {
|
export class PdTeamService {
|
||||||
|
|
||||||
|
|
||||||
//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
private apiUrl = "http://localhost/sparqapi/api/";
|
//private apiUrl = "http://localhost/sparqapi/api/";
|
||||||
pk: { "primary_key": any; };
|
pk: { "primary_key": any; };
|
||||||
|
|
||||||
|
|
||||||
@ -215,5 +215,31 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
// catchError(this.handleError('role', []))
|
// catchError(this.handleError('role', []))
|
||||||
// )
|
// )
|
||||||
// }
|
// }
|
||||||
|
/**
|
||||||
|
* PD Team Manage
|
||||||
|
* sriram
|
||||||
|
*/
|
||||||
|
getPdTeam()
|
||||||
|
{
|
||||||
|
return this._http.get(this.apiUrl+'getPdManage').pipe(catchError(this.handleError('role',[])));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save pd Team Manage
|
||||||
|
* sriram
|
||||||
|
*/
|
||||||
|
|
||||||
|
savePdTeamManage(teamDetails:any)
|
||||||
|
{
|
||||||
|
let records = {records:{teamDetails,fk_updatedby:this._aws.getlocale(),updatedon :currentdate}};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// console.log(records);
|
||||||
|
return this._http.post(this.apiUrl+'savePdTeamManage',records);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* End of the function
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
@ -150,8 +150,8 @@ export class UserService {
|
|||||||
let pdtypeid:any;
|
let pdtypeid:any;
|
||||||
let pdteam:any;
|
let pdteam:any;
|
||||||
|
|
||||||
if(users.pdteam !=null && users.pdtype !=null){
|
if(users.pdteam !=null){
|
||||||
pdtypeid = users.pdtype.pd_type_id;
|
|
||||||
|
|
||||||
pdteam = users.pdteam.pdteam_id;
|
pdteam = users.pdteam.pdteam_id;
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ export class UserService {
|
|||||||
userid = users.userid
|
userid = users.userid
|
||||||
}
|
}
|
||||||
let pdofficer = {
|
let pdofficer = {
|
||||||
'fk_pd_type_id':pdtypeid,
|
|
||||||
'fk_team_id':pdteam,
|
'fk_team_id':pdteam,
|
||||||
'fk_user_id':userid
|
'fk_user_id':userid
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<mat-card>
|
<mat-card>
|
||||||
|
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon button" (click)="back()">
|
USER REGISTRATION <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"(click)="back()"><mat-icon>close</mat-icon>
|
||||||
<mat-icon>chevron_left</mat-icon>
|
</button> </mat-card-title>
|
||||||
</button> User Registrations</mat-card-title>
|
|
||||||
<!-- <div class="profile-avatar">
|
<!-- <div class="profile-avatar">
|
||||||
|
|
||||||
<img fxFlexOffset="50px" [src]="'https://www.google.co.in/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=2ahUKEwi8qsnv7NPdAhWFWysKHZIZBDcQjRx6BAgBEAU&url=https%3A%2F%2Fwww.facebook.com%2FProfilePictures%2F&psig=AOvVaw12u0YbndUEVORSODg1OWeg&ust=1537885714967641'" style="width: 70px;height: 100px;border-radius: 50%;">
|
<img fxFlexOffset="50px" [src]="'https://www.google.co.in/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=2ahUKEwi8qsnv7NPdAhWFWysKHZIZBDcQjRx6BAgBEAU&url=https%3A%2F%2Fwww.facebook.com%2FProfilePictures%2F&psig=AOvVaw12u0YbndUEVORSODg1OWeg&ust=1537885714967641'" style="width: 70px;height: 100px;border-radius: 50%;">
|
||||||
@ -15,17 +15,17 @@
|
|||||||
|
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="First name" [formControl]="regForm.controls['firstName']" required>
|
<input matInput placeholder="First Name" [formControl]="regForm.controls['firstName']" required>
|
||||||
<mat-error *ngIf="regForm.controls['firstName'].hasError('required') && regForm.controls['firstName'].touched" class="mat-text-warn">You must include a first name.</mat-error>
|
<mat-error *ngIf="regForm.controls['firstName'].hasError('required') && regForm.controls['firstName'].touched" class="mat-text-warn">First Name Required.</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['firstName'].hasError('minlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Your first name must be at least 5 characters long.</mat-error>
|
<mat-error *ngIf="regForm.controls['firstName'].hasError('minlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Atleast 5 Characters.</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['firstName'].hasError('maxlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Your first name cannot exceed 10 characters.</mat-error>
|
<mat-error *ngIf="regForm.controls['firstName'].hasError('maxlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Not More Than 10 Characters.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="Last name" [formControl]="regForm.controls['lastName']" required>
|
<input matInput placeholder="Last Name" [formControl]="regForm.controls['lastName']" required>
|
||||||
<mat-error *ngIf="regForm.controls['lastName'].hasError('required') && regForm.controls['lastName'].touched" class="mat-text-warn">You must include a last name.</mat-error>
|
<mat-error *ngIf="regForm.controls['lastName'].hasError('required') && regForm.controls['lastName'].touched" class="mat-text-warn">Last Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <mat-error *ngIf="regForm.controls['lastName'].hasError('minlength') && regForm.controls['lastName'].touched" class="mat-text-warn">Your first name must be at least 5 characters long.</mat-error>
|
<!-- <mat-error *ngIf="regForm.controls['lastName'].hasError('minlength') && regForm.controls['lastName'].touched" class="mat-text-warn">Your first name must be at least 5 characters long.</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['lastName'].hasError('maxlength') && regForm.controls['lastName'].touched" class="mat-text-warn">Your first name cannot exceed 10 characters.</mat-error> -->
|
<mat-error *ngIf="regForm.controls['lastName'].hasError('maxlength') && regForm.controls['lastName'].touched" class="mat-text-warn">Your first name cannot exceed 10 characters.</mat-error> -->
|
||||||
@ -33,27 +33,45 @@
|
|||||||
<input matInput placeholder="User Id" [formControl]="regForm.controls['userid']">
|
<input matInput placeholder="User Id" [formControl]="regForm.controls['userid']">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<span dividerColor="primary" class="ml-xs mr-xs" *ngIf="profileaccess">
|
<span dividerColor="primary" class="ml-xs mr-xs" *ngIf="profileaccess">
|
||||||
<img [src]="profileurl" style="width: 17%;height: 50%;border-radius: 50%;"></span>
|
<img [src]="profileurl" style="width: 10%;border-radius: 50%;"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-card-title>Account Details</mat-card-title><hr/>
|
<mat-card-title>Account Details</mat-card-title><hr/><br/>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="Email address" [formControl]="regForm.controls['email']" type="email" required>
|
<input matInput placeholder="Email Address" [formControl]="regForm.controls['email']" type="email" required>
|
||||||
<mat-error *ngIf="regForm.controls['email'].hasError('required') && regForm.controls['email'].touched" class="mat-text-warn">You must include an email address.</mat-error>
|
<mat-error *ngIf="regForm.controls['email'].hasError('required') && regForm.controls['email'].touched" class="mat-text-warn">email Address Required.</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['email'].errors?.email && regForm.controls['email'].touched" class="mat-text-warn">You must include a valid email address.</mat-error>
|
<mat-error *ngIf="regForm.controls['email'].errors?.email && regForm.controls['email'].touched" class="mat-text-warn">Invalid Email Address.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<!-- <mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<!-- <mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="Alt Email address" [formControl]="regForm.controls['altemail']" type="email">
|
<input matInput placeholder="Alt Email address" [formControl]="regForm.controls['altemail']" type="email">
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||||
<input matInput placeholder="Phone number" [formControl]="regForm.controls['phone']" type="number" required>
|
<input matInput placeholder="Phone Number" [formControl]="regForm.controls['phone']" type="number" required>
|
||||||
<mat-error *ngIf="regForm.controls['phone'].hasError('required') && regForm.controls['phone'].touched" class="mat-text-warn">You must include phone number.</mat-error>
|
<mat-error *ngIf="regForm.controls['phone'].hasError('required') && regForm.controls['phone'].touched" class="mat-text-warn">Phone Number Required.</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['phone'].errors?.phone && regForm.controls['phone'].touched" class="mat-text-warn">You must include a valid phone number.</mat-error>
|
<mat-error *ngIf="regForm.controls['phone'].errors?.phone && regForm.controls['phone'].touched" class="mat-text-warn">Invalid Phone Number.</mat-error>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
|
||||||
|
<mat-select matInput placeholder="State" [formControl]="regForm.controls['state']" required (selectionChange)="getcity($event)" >
|
||||||
|
<mat-option>--</mat-option>
|
||||||
|
<mat-option *ngFor="let s of State" [value]="s" >
|
||||||
|
{{s.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="regForm.controls['state'].hasError('required') && regForm.controls['state'].touched" class="mat-text-warn">State Required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
|
||||||
|
<mat-select matInput placeholder="City" [formControl]="regForm.controls['city']" required>
|
||||||
|
<mat-option>--</mat-option>
|
||||||
|
<mat-option *ngFor="let c of City" [value]="c">
|
||||||
|
{{c.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="regForm.controls['city'].hasError('required') && regForm.controls['city'].touched" class="mat-text-warn">city Required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +113,7 @@
|
|||||||
<input matInput placeholder="Pincode" [formControl]="regForm.controls['pincode']">
|
<input matInput placeholder="Pincode" [formControl]="regForm.controls['pincode']">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<!-- <div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
<mat-select matInput placeholder="State" [formControl]="regForm.controls['state']" required (selectionChange)="getcity($event)" >
|
<mat-select matInput placeholder="State" [formControl]="regForm.controls['state']" required (selectionChange)="getcity($event)" >
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
@ -103,6 +121,7 @@
|
|||||||
{{s.name}}
|
{{s.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<mat-error *ngIf="regForm.controls['state'].hasError('required') && regForm.controls['state'].touched" class="mat-text-warn">State Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
||||||
@ -112,57 +131,55 @@
|
|||||||
{{c.name}}
|
{{c.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<mat-error *ngIf="regForm.controls['city'].hasError('required') && regForm.controls['city'].touched" class="mat-text-warn">city Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>-->
|
||||||
<mat-card-title>Role Information</mat-card-title><hr/><br/>
|
<mat-card-title>Role Information</mat-card-title><hr/><br/>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
|
||||||
<mat-select matInput placeholder="Enitity type" (selectionChange)="checktype($event.value)" [formControl]="regForm.controls['type']"
|
<mat-select matInput placeholder="Enitity Type" (selectionChange)="checktype($event.value)" [formControl]="regForm.controls['type']"
|
||||||
required>
|
required>
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let types of types" [value]="types">
|
<mat-option *ngFor="let types of types" [value]="types">
|
||||||
{{types.name}}
|
{{types.name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="regForm.controls['type'].hasError('required') && regForm.controls['type'].touched" class="mat-text-warn">Select User Role</mat-error>
|
<mat-error *ngIf="regForm.controls['type'].hasError('required') && regForm.controls['type'].touched" class="mat-text-warn">Enitity Type Required</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['type'].errors?.phone && regForm.controls['type'].touched" class="mat-text-warn">Select User Role</mat-error>
|
<mat-error *ngIf="regForm.controls['type'].errors?.phone && regForm.controls['type'].touched" class="mat-text-warn">Enitity Type Required</mat-error>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- <span *ngIf="roleload"> -->
|
<!-- <span *ngIf="roleload"> -->
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="typeValue == '2'">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="typeValue == '2'">
|
||||||
<mat-select matInput placeholder="Lender Name" [formControl]="regForm.controls['lenVenName']" required>
|
<mat-select matInput placeholder="Lender Name" [formControl]="regForm.controls['lenVenName']" required>
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let ent of entities" [value]="ent">
|
<mat-option *ngFor="let ent of entities" [value]="ent">
|
||||||
{{ent.full_name}}
|
{{ent.full_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<mat-error *ngIf="regForm.controls['lenVenName'].hasError('required') && regForm.controls['lenVenName'].touched" class="mat-text-warn">Lender Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="typeValue == '3'">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="typeValue == '3'">
|
||||||
<mat-select matInput placeholder="Vendor Name" [formControl]="regForm.controls['lenVenName']" required>
|
<mat-select matInput placeholder="Vendor Name" [formControl]="regForm.controls['lenVenName']" required>
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let ent of entities" [value]="ent">
|
<mat-option *ngFor="let ent of entities" [value]="ent">
|
||||||
{{ent.full_name}}
|
{{ent.full_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select><mat-error *ngIf="regForm.controls['lenVenName'].hasError('required') && regForm.controls['lenVenName'].touched" class="mat-text-warn">Vendor Name Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;">
|
|
||||||
<mat-select matInput placeholder="Role" (selectionChange)="toggleAllSelection($event,regForm.controls['type'].value)" [formControl]="regForm.controls['role']" required>
|
<mat-select matInput placeholder="Role" (selectionChange)="toggleAllSelection($event,regForm.controls['type'].value)" [formControl]="regForm.controls['role']" required>
|
||||||
<!-- <mat-option #allSelected (click)="toggleAllSelection()" [value]="0">ALL</mat-option> -->
|
<!-- <mat-option #allSelected (click)="toggleAllSelection()" [value]="0">ALL</mat-option> -->
|
||||||
<mat-option *ngFor="let role of roles" [value]="role" >
|
<mat-option *ngFor="let role of roles" [value]="role" >
|
||||||
{{role.role_name}}
|
{{role.role_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
<div *ngIf="roleload"><mat-progress-bar mode="indeterminate" color="defalut"></mat-progress-bar></div>
|
<div *ngIf="roleload"><mat-progress-bar mode="indeterminate" color="defalut"></mat-progress-bar></div>
|
||||||
<mat-error *ngIf="regForm.controls['role'].hasError('required') && regForm.controls['role'].touched" class="mat-text-warn">Select User Role</mat-error>
|
<mat-error *ngIf="regForm.controls['role'].hasError('required') && regForm.controls['role'].touched" class="mat-text-warn">User Role Required</mat-error>
|
||||||
<mat-error *ngIf="regForm.controls['role'].errors?.phone && regForm.controls['role'].touched" class="mat-text-warn">Select User Role</mat-error>
|
<mat-error *ngIf="regForm.controls['role'].errors?.phone && regForm.controls['role'].touched" class="mat-text-warn">User Role Required</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- <div fxLayout="row" fxLayoutAlign="start center" class="mb-2" *ngIf="roleAccess">
|
<!-- <div fxLayout="row" fxLayoutAlign="start center" class="mb-2" *ngIf="roleAccess">
|
||||||
|
|
||||||
<!-- <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" >
|
<!-- <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" >
|
||||||
@ -185,7 +202,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="roleAccess">
|
||||||
<mat-select matInput placeholder="PD Team" [formControl]="regForm.controls['pdteam']" required >
|
<mat-select matInput placeholder="PD Team" [formControl]="regForm.controls['pdteam']" required >
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let pd of pdTeam" [value]="pd" >
|
<mat-option *ngFor="let pd of pdTeam" [value]="pd" >
|
||||||
@ -194,7 +211,7 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
<!-- <mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
||||||
<mat-select matInput placeholder="PD Type" [formControl]="regForm.controls['pdtype']" required>
|
<mat-select matInput placeholder="PD Type" [formControl]="regForm.controls['pdtype']" required>
|
||||||
<mat-option>--</mat-option>
|
<mat-option>--</mat-option>
|
||||||
<mat-option *ngFor="let PDT of pdType" [value]="PDT">
|
<mat-option *ngFor="let PDT of pdType" [value]="PDT">
|
||||||
@ -202,40 +219,41 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
<div fxLayout="row" class="mb-2" >
|
||||||
UserProfile
|
<div style="width:80%">
|
||||||
<input type="file" (change)="onFileChange($event)" [formControl]="regForm.controls['userpic']" accept="image/*" />
|
User Profile
|
||||||
<br/>
|
<input type="file" (change)="onFileChange($event)" [formControl]="regForm.controls['userpic']" accept="image/*" />
|
||||||
<div *ngIf="imageaccess">
|
<br/>
|
||||||
<img [src]="filename" style="width: 27%;
|
<div *ngIf="imageaccess">
|
||||||
height: 62%;
|
<img [src]="filename" style="width: 14%; border-radius: 50%;">
|
||||||
border-radius: 50%;
|
</div>
|
||||||
">
|
<span *ngIf="usersData !=''">
|
||||||
</div>
|
{{img}}
|
||||||
<span *ngIf="usersData !=''">
|
</span>
|
||||||
{{img}}
|
</div>
|
||||||
</span>
|
<div style="width:20%">
|
||||||
|
<mat-slide-toggle color="primary" [formControl]="regForm.controls['isactive']">
|
||||||
|
Isactive
|
||||||
|
</mat-slide-toggle>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</mat-card-content>
|
||||||
|
|
||||||
<mat-slide-toggle color="primary" [formControl]="regForm.controls['isactive']">
|
|
||||||
Isactive
|
|
||||||
</mat-slide-toggle>
|
|
||||||
</mat-card-content>
|
|
||||||
<hr>
|
<hr>
|
||||||
<!-- <pre>{{regForm.controls['userid'].value | json}}</pre> -->
|
<!-- <pre>{{regForm.controls['userid'].value | json}}</pre> -->
|
||||||
|
|
||||||
<mat-card-actions>
|
<mat-card-actions style="text-align:right;">
|
||||||
|
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
|
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Submit" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
|
||||||
<button mat-raised-button color="primary" type="submit">Register</button>
|
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
</form>
|
</form>
|
||||||
<!-- <button mat-raised-button color="primary" (click)="userupdate()" >Submit</button> -->
|
<!-- <button mat-raised-button color="primary" (click)="userupdate()" >Submit</button> -->
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<div *ngIf="loader">
|
<div *ngIf="loader">
|
||||||
<mat-progress-bar mode="indeterminate" color="accent" class="mb-1"></mat-progress-bar>
|
<mat-progress-bar mode="indeterminate" color="primary" class="mb-1"></mat-progress-bar>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -10,7 +10,7 @@ import { MatOption } from '@angular/material';
|
|||||||
import { UserService } from '../../service/user.service';
|
import { UserService } from '../../service/user.service';
|
||||||
import { ifStmt } from '@angular/compiler/src/output/output_ast';
|
import { ifStmt } from '@angular/compiler/src/output/output_ast';
|
||||||
const pdoff = "PD Officer";
|
const pdoff = "PD Officer";
|
||||||
|
const pdexu = "PD Executive";
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-register',
|
selector: 'app-register',
|
||||||
templateUrl: './register.component.html',
|
templateUrl: './register.component.html',
|
||||||
@ -232,9 +232,9 @@ this.loader = true;
|
|||||||
// this.roleAccess = false;
|
// this.roleAccess = false;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
if (this.usersData != '' && this.usersData !==undefined || e.value.role_name == pdoff && enitiyid.entity_type_id == 1) {
|
if (this.usersData != '' && this.usersData !==undefined || e.value.role_name == pdoff && enitiyid.entity_type_id == 1 || e.value.role_name == pdexu && enitiyid.entity_type_id == 1) {
|
||||||
console.log(e);
|
|
||||||
if(e.role_name == pdoff && enitiyid.entity_type_id == 1 || e.value.role_name == pdoff && enitiyid.entity_type_id == 1){
|
if(e.role_name == pdoff && enitiyid.entity_type_id == 1 ||e.role_name == pdexu && enitiyid.entity_type_id == 1 || e.value.role_name == pdoff && enitiyid.entity_type_id == 1 || e.value.role_name == pdexu && enitiyid.entity_type_id == 1){
|
||||||
|
|
||||||
this.roleAccess = true;
|
this.roleAccess = true;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -36,19 +36,41 @@
|
|||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Mobile No </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Mobile No </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let us"> {{us.mobile_no}} </mat-cell>
|
<mat-cell *matCellDef="let us"> {{us.mobile_no}} </mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<ng-container matColumnDef="Roles">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Roles </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let us"> {{us.role_name}} </mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container matColumnDef="Entity">
|
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Entities </mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let us"> {{us.entitytypename}} </mat-cell>
|
||||||
|
</ng-container>
|
||||||
<ng-container matColumnDef="IsActive">
|
<ng-container matColumnDef="IsActive">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> Is Active </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let us"><!--{{row.isactive}}-->
|
<mat-cell *matCellDef="let us"><!--{{row.isactive}}-->
|
||||||
<a (click)="isactive(us.userid,us.aws_name)"><mat-icon *ngIf="us.isactive == 1;else notactive;" class="active" matTooltip="Active" matTooltipPosition="above">done</mat-icon></a>
|
<mat-slide-toggle *ngIf="us.isactive == 1;else notactive;"
|
||||||
<a (click)="isactive(us.userid,us.aws_name)"><ng-template #notactive ><mat-icon class="deactive" matTooltip="Inactive" matTooltipPosition="above">close</mat-icon></ng-template></a>
|
class="example-margin"
|
||||||
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
|
checked="true" [color]="color"
|
||||||
|
(change)="isactive(us.userid,us.aws_name)"
|
||||||
|
onclick="return confirm('Are you sure?')">
|
||||||
|
</mat-slide-toggle>
|
||||||
|
<ng-template #notactive >
|
||||||
|
<mat-slide-toggle
|
||||||
|
class="example-margin"
|
||||||
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
|
checked="false" [color]="color"
|
||||||
|
(change)="isactive(us.userid,us.aws_name)"
|
||||||
|
onclick="return confirm('Are you sure?')">
|
||||||
|
</mat-slide-toggle></ng-template>
|
||||||
|
<!-- <a (click)="isactive(us.userid,us.aws_name)"><mat-icon *ngIf="us.isactive == 1;else notactive;" class="active" matTooltip="Active" matTooltipPosition="above">done</mat-icon></a>
|
||||||
|
<a (click)="isactive(us.userid,us.aws_name)"><ng-template #notactive ><mat-icon class="deactive" matTooltip="Inactive" matTooltipPosition="above">close</mat-icon></ng-template></a> -->
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="Actions">
|
<ng-container matColumnDef="Actions">
|
||||||
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let us">
|
<mat-cell *matCellDef="let us">
|
||||||
<a mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editUserDetails(us.userid,us.aws_name)"><mat-icon>edit</mat-icon></a>
|
<a mat-icon-button [color]="color" class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editUserDetails(us.userid,us.aws_name)"><mat-icon>edit</mat-icon></a>
|
||||||
<!-- <a mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="deleteuser(us)"><mat-icon>delete_forever</mat-icon></a> -->
|
<!-- <a mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="deleteuser(us)"><mat-icon>delete_forever</mat-icon></a> -->
|
||||||
<!-- <a mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="adminedituser(us)"><mat-icon>account_circle</mat-icon></a> -->
|
<!-- <a mat-icon-button class="hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="adminedituser(us)"><mat-icon>account_circle</mat-icon></a> -->
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
@ -61,6 +83,6 @@
|
|||||||
|
|
||||||
<!-- <div *ngIf="dataSource.length === 0">No records found</div> -->
|
<!-- <div *ngIf="dataSource.length === 0">No records found</div> -->
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator [pageSize]="pageSize" [pageSizeOptions]="[5, 10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import { MatPaginator, MatTableDataSource,MatSort } from '@angular/material';
|
|||||||
import { UserService } from '../../service/user.service';
|
import { UserService } from '../../service/user.service';
|
||||||
import { DataSource } from '@angular/cdk/table';
|
import { DataSource } from '@angular/cdk/table';
|
||||||
import { CognitoService } from '../../../AwsService/cognito.service';
|
import { CognitoService } from '../../../AwsService/cognito.service';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-user-list',
|
selector: 'app-user-list',
|
||||||
templateUrl: './user-list.component.html',
|
templateUrl: './user-list.component.html',
|
||||||
@ -13,11 +15,13 @@ import { CognitoService } from '../../../AwsService/cognito.service';
|
|||||||
export class UserListComponent implements OnInit {
|
export class UserListComponent implements OnInit {
|
||||||
public dataLength: number;
|
public dataLength: number;
|
||||||
public dataSource = new MatTableDataSource();
|
public dataSource = new MatTableDataSource();
|
||||||
displayedColumns = ['SerialNo','FullName','Email','Mobile','Actions', 'IsActive'];
|
displayedColumns = ['SerialNo','FullName','Email','Mobile','Roles','Entity','Actions', 'IsActive'];
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
color="primary";
|
||||||
|
// pagination variable details
|
||||||
|
pageSize = 10;
|
||||||
userdata: any = [];
|
userdata: any = [];
|
||||||
loader: boolean = false;
|
loader: boolean = false;
|
||||||
|
|
||||||
@ -41,9 +45,6 @@ export class UserListComponent implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
delete this.aws.localUserId;
|
delete this.aws.localUserId;
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { TemplatesService } from './templates.service';
|
||||||
|
|
||||||
|
describe('TemplatesService', () => {
|
||||||
|
beforeEach(() => TestBed.configureTestingModule({}));
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
const service: TemplatesService = TestBed.get(TemplatesService);
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class TemplatesService {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
}
|
||||||
@ -8,7 +8,10 @@ import {
|
|||||||
MatRadioModule,
|
MatRadioModule,
|
||||||
MatButtonModule,MatTableModule,MatPaginatorModule,
|
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
MatToolbarModule,MatSelectModule } from '@angular/material';
|
MatToolbarModule,MatSelectModule,
|
||||||
|
MatListModule, MatMenuModule,
|
||||||
|
MatCheckboxModule, MatStepperModule, MatTabsModule,
|
||||||
|
MatExpansionModule } from '@angular/material';
|
||||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload';
|
import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload';
|
||||||
@ -44,6 +47,9 @@ import { MastersService } from './service/masters/masters.service';
|
|||||||
MatButtonModule,MatTableModule,MatPaginatorModule,
|
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
MatToolbarModule,MatSelectModule,
|
MatToolbarModule,MatSelectModule,
|
||||||
|
MatListModule, MatMenuModule,
|
||||||
|
MatCheckboxModule, MatStepperModule, MatTabsModule,
|
||||||
|
MatExpansionModule ,
|
||||||
FormsModule,ReactiveFormsModule,
|
FormsModule,ReactiveFormsModule,
|
||||||
// HttpClientModule,
|
// HttpClientModule,
|
||||||
],
|
],
|
||||||
|
|||||||
@ -0,0 +1,38 @@
|
|||||||
|
<form [formGroup]="_editTempCategoryFrom" (submit)="onSubmit()">
|
||||||
|
<div formArrayName="temp_category" class="example-full-width">
|
||||||
|
<mat-list role="list">
|
||||||
|
<mat-list-item style="margin: 2px 0;" *ngFor="let answ of _editTempCategoryFrom.controls.temp_category['controls']; let i=index ; let last = last;"
|
||||||
|
role="listitem">
|
||||||
|
<div [formGroupName]="i">
|
||||||
|
<div fxLayout="row" fxLayoutWrap fxLayoutGap="5%" fxLayoutAlign="start center">
|
||||||
|
<div fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Category" formControlName="fk_category_id">
|
||||||
|
<mat-option *ngFor="let category of m_categoryList" [value]="category.fk_category_id">{{ category.name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<!--<mat-error *ngIf="submitted && f.fk_category_id.hasError('required')" class="mat-text-warn">You must Select Lender Type.</mat-error>-->
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-form-field style="width: 25%; text-align: center" appearance="outline">
|
||||||
|
<input matInput formControlName="weightage">
|
||||||
|
</mat-form-field> <span>%</span>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<button *ngIf="_editTempCategoryFrom.controls.temp_category.controls.length > 1" (click)="removeLanguage(i)" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<button *ngIf="last" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Add More" matTooltipPosition="above" (click)="addLanguage($event); false"><mat-icon>add</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-list>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="text-align:right;">
|
||||||
|
<!--<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>-->
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EditCategoryComponent } from './edit-category.component';
|
||||||
|
|
||||||
|
describe('EditCategoryComponent', () => {
|
||||||
|
let component: EditCategoryComponent;
|
||||||
|
let fixture: ComponentFixture<EditCategoryComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EditCategoryComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EditCategoryComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core';
|
||||||
|
import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material';
|
||||||
|
import { FormGroup, FormControl, FormBuilder, Validators , FormArray} from '@angular/forms';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import { DataSource } from '@angular/cdk/table';
|
||||||
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-template-edit-category',
|
||||||
|
templateUrl: './edit-category.component.html',
|
||||||
|
styleUrls: ['./edit-category.component.scss']
|
||||||
|
})
|
||||||
|
export class EditCategoryComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
|
@Input() questionId: number;
|
||||||
|
|
||||||
|
public _editTempCategoryFrom: FormGroup;
|
||||||
|
public submitted = false;
|
||||||
|
constructor(
|
||||||
|
private _formBuilder: FormBuilder,
|
||||||
|
public dialog: MatDialog) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.initalLoadFormData();
|
||||||
|
if(this.categoryList.length > 0){
|
||||||
|
for (let val of this.categoryList) {
|
||||||
|
// alert(JSON.stringify(val));
|
||||||
|
let vals = val;
|
||||||
|
this.addLanguage(vals['fk_category_id'], vals['name'], vals['weightage'], null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
initalLoadFormData(){
|
||||||
|
this._editTempCategoryFrom = this._formBuilder.group({
|
||||||
|
temp_category: this._formBuilder.array([
|
||||||
|
// this.initAnswers(),
|
||||||
|
])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// convenience getter for easy access to form fields
|
||||||
|
get f() { return this._editTempCategoryFrom.controls; }
|
||||||
|
|
||||||
|
public m_categoryList = [{
|
||||||
|
fk_category_id: 1,
|
||||||
|
name: 'Category List 1',
|
||||||
|
weightage: 2,
|
||||||
|
},{
|
||||||
|
fk_category_id: 2,
|
||||||
|
name: 'Category List 2',
|
||||||
|
weightage: 5,
|
||||||
|
},{
|
||||||
|
fk_category_id: 3,
|
||||||
|
name: 'Category List 2',
|
||||||
|
weightage: 5,
|
||||||
|
}];
|
||||||
|
|
||||||
|
public categoryList = [{
|
||||||
|
fk_category_id: 1,
|
||||||
|
name: 'Category List 1',
|
||||||
|
weightage: 2,
|
||||||
|
},{
|
||||||
|
fk_category_id: 2,
|
||||||
|
name: 'Category List 2',
|
||||||
|
weightage: 5,
|
||||||
|
}];
|
||||||
|
|
||||||
|
// Dynamic Form field creation Functionality : START ===>
|
||||||
|
initAnswers(fk_cat_id, name, weightage) {
|
||||||
|
return this._formBuilder.group({
|
||||||
|
fk_category_id: [fk_cat_id, Validators.compose([Validators.required])],
|
||||||
|
name: [name, Validators.compose([Validators.required])],
|
||||||
|
weightage: [weightage, Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
addLanguage(fk_cat_id, name, weightage, e) {
|
||||||
|
const control = <FormArray>this._editTempCategoryFrom.controls['temp_category'];
|
||||||
|
control.push(this.initAnswers(fk_cat_id, name, weightage));
|
||||||
|
}
|
||||||
|
removeLanguage(i: number) {
|
||||||
|
const control = <FormArray>this._editTempCategoryFrom.controls['temp_category'];
|
||||||
|
control.removeAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
// END ===>
|
||||||
|
|
||||||
|
|
||||||
|
/** To Save/Edited Popup Data */
|
||||||
|
onSubmit() {
|
||||||
|
this.submitted = true;
|
||||||
|
// stop here if form is invalid
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
//Called once, before the instance is destroyed.
|
||||||
|
//Add 'implements OnDestroy' to the class.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
<form [formGroup]="_editTempLenderFrom" (submit)="onSubmit()">
|
||||||
|
<div formArrayName="temp_lender" class="example-full-width">
|
||||||
|
<div *ngFor="let answ of _editTempLenderFrom.controls.temp_lender['controls']; let i=index">
|
||||||
|
<div [formGroupName]="i">
|
||||||
|
<div fxLayout="row" fxLayoutWrap fxLayoutGap="0.5%" fxLayoutAlign="start center">
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-select placeholder="Lender" formControlName="fk_lender_id">
|
||||||
|
<mat-option *ngFor="let enti of entityOptions" [value]="enti.fk_lender_id">{{ enti.name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_lender_id.hasError('required')" class="mat-text-warn">You must Select Lender Type.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-select placeholder="Product" formControlName="fk_product_id">
|
||||||
|
<mat-option *ngFor="let enti of entityOptions" [value]="enti.fk_product_id">{{ enti.name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_product_id.hasError('required')" class="mat-text-warn">You must Select Product.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-select placeholder="Catergory Segment" formControlName="fk_category_segment_id">
|
||||||
|
<mat-option *ngFor="let enti of entityOptions" [value]="enti.fk_category_segment_id">{{ enti.name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_category_segment_id.hasError('required')" class="mat-text-warn">You must Select Category Segment.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!--<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<input matInput placeholder="Email" formControlName="contact_email">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<input matInput placeholder="Mobile Number" formControlName="contact_mobile_no">
|
||||||
|
</mat-form-field>-->
|
||||||
|
<span *ngIf="_editTempLenderFrom.controls.temp_lender.controls.length > 1" (click)="removeLanguage(i)">
|
||||||
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button mat-fab class="mr-1 mb-1" color="primary" matTooltip="Add More Contact Person" matTooltipPosition="above" (click)="addLanguage($event); false"><mat-icon>add</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EditLenderComponent } from './edit-lender.component';
|
||||||
|
|
||||||
|
describe('EditLenderComponent', () => {
|
||||||
|
let component: EditLenderComponent;
|
||||||
|
let fixture: ComponentFixture<EditLenderComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EditLenderComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EditLenderComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core';
|
||||||
|
import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material';
|
||||||
|
import { FormGroup, FormControl, FormBuilder, Validators , FormArray} from '@angular/forms';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import { DataSource } from '@angular/cdk/table';
|
||||||
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-template-edit-lender',
|
||||||
|
templateUrl: './edit-lender.component.html',
|
||||||
|
styleUrls: ['./edit-lender.component.scss']
|
||||||
|
})
|
||||||
|
export class EditLenderComponent implements OnInit {
|
||||||
|
|
||||||
|
|
||||||
|
@Input() questionId: number;
|
||||||
|
|
||||||
|
public _editTempLenderFrom: FormGroup;
|
||||||
|
public submitted = false;
|
||||||
|
constructor(
|
||||||
|
private _formBuilder: FormBuilder) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this._editTempLenderFrom = this._formBuilder.group({
|
||||||
|
temp_lender: this._formBuilder.array([
|
||||||
|
this.initAnswers(),
|
||||||
|
])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// convenience getter for easy access to form fields
|
||||||
|
get f() { return this._editTempLenderFrom.controls; }
|
||||||
|
|
||||||
|
|
||||||
|
public entityOptions = [{
|
||||||
|
fk_lender_id: 1,
|
||||||
|
name: 'Lender1'
|
||||||
|
},{
|
||||||
|
fk_lender_id: 2,
|
||||||
|
name: 'Lender2'
|
||||||
|
}];
|
||||||
|
|
||||||
|
// Dynamic Form field creation Functionality : START ===>
|
||||||
|
initAnswers() {
|
||||||
|
return this._formBuilder.group({
|
||||||
|
fk_lender_id: ['', Validators.compose([Validators.required])],
|
||||||
|
fk_product_id: ['', Validators.compose([Validators.required])],
|
||||||
|
fk_category_segment_id: ['', Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
addLanguage(e) {
|
||||||
|
const control = <FormArray>this._editTempLenderFrom.controls['temp_lender'];
|
||||||
|
control.push(this.initAnswers());
|
||||||
|
}
|
||||||
|
removeLanguage(i: number) {
|
||||||
|
const control = <FormArray>this._editTempLenderFrom.controls['temp_lender'];
|
||||||
|
control.removeAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
// END ===>
|
||||||
|
|
||||||
|
|
||||||
|
/** To Save/Edited Popup Data */
|
||||||
|
onSubmit() {
|
||||||
|
this.submitted = true;
|
||||||
|
// stop here if form is invalid
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
//Called once, before the instance is destroyed.
|
||||||
|
//Add 'implements OnDestroy' to the class.
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
<!--<form [formGroup]="_editTempCategoryFrom" (submit)="onSubmit()">
|
||||||
|
<div formArrayName="temp_category" class="example-full-width">
|
||||||
|
<mat-list role="list">
|
||||||
|
<mat-list-item style="margin: 2px 0;" *ngFor="let answ of _editTempCategoryFrom.controls.temp_category['controls']; let i=index ; let last = last;"
|
||||||
|
role="listitem">
|
||||||
|
<div [formGroupName]="i">
|
||||||
|
<div fxLayout="row" fxLayoutWrap fxLayoutGap="5%" fxLayoutAlign="start center">
|
||||||
|
<div fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Category" formControlName="fk_category_id">
|
||||||
|
<mat-option *ngFor="let category of m_categoryList" [value]="category.fk_category_id">{{ category.name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<mat-form-field style="width: 25%; text-align: center" appearance="outline">
|
||||||
|
<input matInput formControlName="weightage">
|
||||||
|
</mat-form-field> <span>%</span>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<button *ngIf="_editTempCategoryFrom.controls.temp_category.controls.length > 1" (click)="removeLanguage(i)" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div fxFlex="0 1 auto" class="ml-xs">
|
||||||
|
<button *ngIf="last" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Add More" matTooltipPosition="above" (click)="addLanguage($event); false"><mat-icon>add</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-list>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</form>-->
|
||||||
|
<mat-card>
|
||||||
|
<mat-accordion>
|
||||||
|
<mat-expansion-panel>
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title>
|
||||||
|
Category 1
|
||||||
|
</mat-panel-title>
|
||||||
|
<mat-panel-description>
|
||||||
|
50%
|
||||||
|
</mat-panel-description>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
|
||||||
|
<!--<mat-horizontal-stepper [linear]="isLinear" #stepper>
|
||||||
|
<mat-step [stepControl]="firstFormGroup">
|
||||||
|
<form [formGroup]="firstFormGroup">
|
||||||
|
<ng-template matStepLabel>Questions</ng-template>
|
||||||
|
<mat-list role="list">
|
||||||
|
<mat-list-item role="listitem">Item 1</mat-list-item>
|
||||||
|
<hr>
|
||||||
|
<mat-list-item role="listitem">Item 2</mat-list-item>
|
||||||
|
<hr>
|
||||||
|
<mat-list-item role="listitem">Item 3</mat-list-item>
|
||||||
|
<hr>
|
||||||
|
</mat-list>
|
||||||
|
<div>
|
||||||
|
<button mat-button matStepperNext>Next</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</mat-step>
|
||||||
|
<mat-step [stepControl]="secondFormGroup">
|
||||||
|
<form [formGroup]="secondFormGroup">
|
||||||
|
<ng-template matStepLabel>Answers</ng-template>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Address" formControlName="secondCtrl" required>
|
||||||
|
</mat-form-field>
|
||||||
|
<div>
|
||||||
|
<button mat-button matStepperPrevious>Back</button>
|
||||||
|
<button mat-button matStepperNext>Next</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</mat-step>
|
||||||
|
<mat-step>
|
||||||
|
<ng-template matStepLabel>Done</ng-template>
|
||||||
|
You are now done.
|
||||||
|
<div>
|
||||||
|
<button mat-button matStepperPrevious>Back</button>
|
||||||
|
<button mat-button (click)="stepper.reset()">Reset</button>
|
||||||
|
</div>
|
||||||
|
</mat-step>
|
||||||
|
</mat-horizontal-stepper>-->
|
||||||
|
</mat-expansion-panel>
|
||||||
|
<mat-expansion-panel (opened)="panelOpenState = true" (closed)="panelOpenState = false">
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title>
|
||||||
|
Category 2
|
||||||
|
</mat-panel-title>
|
||||||
|
<mat-panel-description>
|
||||||
|
50%
|
||||||
|
</mat-panel-description>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<p>I'm visible because I am open</p>
|
||||||
|
</mat-expansion-panel>
|
||||||
|
</mat-accordion>
|
||||||
|
</mat-card>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EditQuestionAnswerComponent } from './edit-question-answer.component';
|
||||||
|
|
||||||
|
describe('EditQuestionAnswerComponent', () => {
|
||||||
|
let component: EditQuestionAnswerComponent;
|
||||||
|
let fixture: ComponentFixture<EditQuestionAnswerComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EditQuestionAnswerComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EditQuestionAnswerComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core';
|
||||||
|
import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material';
|
||||||
|
import { FormGroup, FormControl, FormBuilder, Validators , FormArray} from '@angular/forms';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import { DataSource } from '@angular/cdk/table';
|
||||||
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-template-edit-question-answer',
|
||||||
|
templateUrl: './edit-question-answer.component.html',
|
||||||
|
styleUrls: ['./edit-question-answer.component.scss']
|
||||||
|
})
|
||||||
|
export class EditQuestionAnswerComponent implements OnInit {
|
||||||
|
|
||||||
|
|
||||||
|
@Input() questionId: number;
|
||||||
|
|
||||||
|
public _editTempCategoryFrom: FormGroup;
|
||||||
|
public submitted = false;
|
||||||
|
public panelOpenState : boolean;
|
||||||
|
constructor(
|
||||||
|
private _formBuilder: FormBuilder,
|
||||||
|
public dialog: MatDialog) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.initalLoadFormData();
|
||||||
|
if(this.categoryList.length > 0){
|
||||||
|
for (let val of this.categoryList) {
|
||||||
|
// alert(JSON.stringify(val));
|
||||||
|
let vals = val;
|
||||||
|
this.addLanguage(vals['fk_category_id'], vals['name'], vals['weightage'], null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
initalLoadFormData(){
|
||||||
|
this._editTempCategoryFrom = this._formBuilder.group({
|
||||||
|
temp_category: this._formBuilder.array([
|
||||||
|
// this.initAnswers(),
|
||||||
|
])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// convenience getter for easy access to form fields
|
||||||
|
get f() { return this._editTempCategoryFrom.controls; }
|
||||||
|
|
||||||
|
public m_categoryList = [{
|
||||||
|
fk_category_id: 1,
|
||||||
|
name: 'Category List 1',
|
||||||
|
weightage: 2,
|
||||||
|
},{
|
||||||
|
fk_category_id: 2,
|
||||||
|
name: 'Category List 2',
|
||||||
|
weightage: 5,
|
||||||
|
},{
|
||||||
|
fk_category_id: 3,
|
||||||
|
name: 'Category List 2',
|
||||||
|
weightage: 5,
|
||||||
|
}];
|
||||||
|
|
||||||
|
public categoryList = [{
|
||||||
|
fk_category_id: 1,
|
||||||
|
name: 'Category List 1',
|
||||||
|
weightage: 2,
|
||||||
|
},{
|
||||||
|
fk_category_id: 2,
|
||||||
|
name: 'Category List 2',
|
||||||
|
weightage: 5,
|
||||||
|
}];
|
||||||
|
|
||||||
|
// Dynamic Form field creation Functionality : START ===>
|
||||||
|
initAnswers(fk_cat_id, name, weightage) {
|
||||||
|
return this._formBuilder.group({
|
||||||
|
fk_category_id: [fk_cat_id, Validators.compose([Validators.required])],
|
||||||
|
name: [name, Validators.compose([Validators.required])],
|
||||||
|
weightage: [weightage, Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
addLanguage(fk_cat_id, name, weightage, e) {
|
||||||
|
const control = <FormArray>this._editTempCategoryFrom.controls['temp_category'];
|
||||||
|
control.push(this.initAnswers(fk_cat_id, name, weightage));
|
||||||
|
}
|
||||||
|
removeLanguage(i: number) {
|
||||||
|
const control = <FormArray>this._editTempCategoryFrom.controls['temp_category'];
|
||||||
|
control.removeAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
// END ===>
|
||||||
|
|
||||||
|
|
||||||
|
/** To Save/Edited Popup Data */
|
||||||
|
onSubmit() {
|
||||||
|
this.submitted = true;
|
||||||
|
// stop here if form is invalid
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
//Called once, before the instance is destroyed.
|
||||||
|
//Add 'implements OnDestroy' to the class.
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,56 +1,38 @@
|
|||||||
|
|
||||||
<mat-card style="padding: 6px;">
|
<mat-card style="padding: 6px;">
|
||||||
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
<div fxLayout="row" fxLayoutAlign="end start">
|
||||||
<h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2>
|
|
||||||
<div style="width: 20%;"></div>
|
|
||||||
<div style="width: 30%;text-align:right;">
|
|
||||||
<button mat-raised-button mat-icon-button color="primary" class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"
|
<button mat-raised-button mat-icon-button color="primary" class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"
|
||||||
(click)="backToList()"><mat-icon>close</mat-icon></button>
|
(click)="backToList()"><mat-icon>close</mat-icon></button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<form (submit)="onSubmit()">
|
|
||||||
<mat-card style="padding: 6px;">
|
<mat-card style="padding: 6px;">
|
||||||
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
<h6>Template Name</h6>
|
||||||
|
<hr>
|
||||||
|
<form (submit)="onSubmit()">
|
||||||
|
<div fxLayout="row" fxLayoutWrap fxLayoutGap="0.5%" fxLayoutAlign="start center">
|
||||||
<mat-form-field class="ml-xs">
|
<mat-form-field class="ml-xs">
|
||||||
<input matInput placeholder="Template Name">
|
<input matInput placeholder="Template Name">
|
||||||
<mat-error *ngIf="submitted && f.pan.hasError('required')" class="mat-text-warn">You must Include Pan Number.</mat-error>
|
<!--<mat-error *ngIf="submitted && f.pan.hasError('required')" class="mat-text-warn">You must Include Pan Number.</mat-error>-->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<div>
|
||||||
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</form>
|
<mat-card>
|
||||||
<button mat-raised-button (click)="isLinear = !isLinear" id="toggle-linear">
|
<mat-tab-group>
|
||||||
{{!isLinear ? 'Enable linear mode' : 'Disable linear mode'}}
|
<mat-tab label="Lender Details">
|
||||||
</button>
|
<app-template-edit-lender [questionId]="question_id">
|
||||||
<mat-vertical-stepper [linear]="isLinear" #stepper>
|
</app-template-edit-lender>
|
||||||
<mat-step [stepControl]="firstFormGroup">
|
</mat-tab>
|
||||||
<form [formGroup]="firstFormGroup">
|
<mat-tab label="Category">
|
||||||
<ng-template matStepLabel>Fill out your name</ng-template>
|
<app-template-edit-category [questionId]="question_id">
|
||||||
<mat-form-field>
|
</app-template-edit-category> </mat-tab>
|
||||||
<input matInput placeholder="Last name, First name" formControlName="firstCtrl" required>
|
<mat-tab label="Questions / Answers">
|
||||||
</mat-form-field>
|
<app-template-edit-question-answer [questionId]="question_id">
|
||||||
<div>
|
</app-template-edit-question-answer>
|
||||||
<button mat-button matStepperNext>Next</button>
|
</mat-tab>
|
||||||
</div>
|
</mat-tab-group>
|
||||||
</form>
|
</mat-card>
|
||||||
</mat-step>
|
|
||||||
<mat-step [stepControl]="secondFormGroup">
|
|
||||||
<form [formGroup]="secondFormGroup">
|
|
||||||
<ng-template matStepLabel>Fill out your address</ng-template>
|
|
||||||
<mat-form-field>
|
|
||||||
<input matInput placeholder="Address" formControlName="secondCtrl" required>
|
|
||||||
</mat-form-field>
|
|
||||||
<div>
|
|
||||||
<button mat-button matStepperPrevious>Back</button>
|
|
||||||
<button mat-button matStepperNext>Next</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</mat-step>
|
|
||||||
<mat-step>
|
|
||||||
<ng-template matStepLabel>Done</ng-template>
|
|
||||||
You are now done.
|
|
||||||
<div>
|
|
||||||
<button mat-button matStepperPrevious>Back</button>
|
|
||||||
<button mat-button (click)="stepper.reset()">Reset</button>
|
|
||||||
</div>
|
|
||||||
</mat-step>
|
|
||||||
</mat-vertical-stepper>
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|||||||
@ -16,11 +16,14 @@ import { TemplateListComponent } from './../templates.list.component';
|
|||||||
templateUrl: './templates.edit.component.html'
|
templateUrl: './templates.edit.component.html'
|
||||||
})
|
})
|
||||||
export class TemplateEditComponent implements OnInit, OnDestroy {
|
export class TemplateEditComponent implements OnInit, OnDestroy {
|
||||||
public pageTitle: string = "Edit Template";
|
public pageTitle: string = "Edit Template";
|
||||||
|
public question_id : number;
|
||||||
|
public submitted: boolean = false;
|
||||||
|
|
||||||
constructor( private route: ActivatedRoute,
|
constructor( private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private templateListComponent : TemplateListComponent) {
|
private templateListComponent : TemplateListComponent) {
|
||||||
|
this.question_id = this.route.snapshot.params['question-id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -32,6 +35,12 @@ export class TemplateEditComponent implements OnInit, OnDestroy {
|
|||||||
this.router.navigate([ '../../' ], { relativeTo: this.route });
|
this.router.navigate([ '../../' ], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** To Save/Edited Popup Data */
|
||||||
|
onSubmit() {
|
||||||
|
this.submitted = true;
|
||||||
|
// stop here if form is invalid
|
||||||
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
//Called once, before the instance is destroyed.
|
//Called once, before the instance is destroyed.
|
||||||
//Add 'implements OnDestroy' to the class.
|
//Add 'implements OnDestroy' to the class.
|
||||||
|
|||||||
@ -1,11 +1,73 @@
|
|||||||
<div *ngIf="listView">
|
<div *ngIf="listView">
|
||||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
<!--========================== Template List View-->
|
||||||
<input matInput [(ngModel)]="names" placeholder="Contact Person">
|
|
||||||
<!--<mat-error *ngIf="submitted && f.contact_person.hasError('required')" class="mat-text-warn">You must Include Contact Person.</mat-error>-->
|
<div>
|
||||||
</mat-form-field>
|
<mat-card>
|
||||||
|
<mat-card class="mat-elevation-z1">
|
||||||
|
<div style="margin: 6px; padding: 4px;">
|
||||||
|
<div class="p_title" style="font-size: 16px; font-style: bold;">Template Master</div>
|
||||||
|
<div class="sub_title" style="font-size: 11px;">List of Templates</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none">
|
||||||
|
<div fxFlex="80%">
|
||||||
|
<!--<form [formGroup]="filterFormGroupCtrl">
|
||||||
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutGap="0.5px" fxLayoutAlign="start none" style="padding: 6px;">
|
||||||
|
<mat-select placeholder="Category" formControlName="category">
|
||||||
|
<mat-option *ngFor="let cat of categories" [value]="cat.question_categroy_id" (click)="getQuestionsMasters()">
|
||||||
|
{{cat.categroy_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</div>
|
||||||
|
</form>-->
|
||||||
|
</div>
|
||||||
|
<div fxFlex="20%">
|
||||||
|
<button mat-stroked-button color="primary">Add New Template</button>
|
||||||
|
<!--<button mat-stroked-button color="primary" (click)="addNewQuestion()">Add Questions</button>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<ng-container *ngIf="templateList.length > 0">
|
||||||
|
<div style="padding: 0 12px;">
|
||||||
|
<mat-card class="product-card" *ngFor="let template of dataSource.connect() | async">
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start start" style="padding: 6px 2px;">
|
||||||
|
|
||||||
|
<div fxFlex="90%" style="padding: 12px 8px;">
|
||||||
|
|
||||||
|
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="start center">
|
||||||
|
<div class="ml-xs" fxFlex="20%">
|
||||||
|
<b> {{ template.template_name }} </b>
|
||||||
|
</div>
|
||||||
|
<div class="ml-xs" fxFlex="80%">
|
||||||
|
<div *ngIf="template.lender_details.length > 0" class="text-line-limit">
|
||||||
|
<span *ngFor="let lender of template.lender_details ; let last = last"> {{lender.full_name}} - {{lender.product_name}} - {{lender.customer_segment_name}} <i *ngIf="!last">,</i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="10%">
|
||||||
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="goToEdit(template.template_id)"><mat-icon>edit</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
<mat-card *ngIf="noQuesMasterRecrdFound">
|
||||||
|
<div class="no-record-found">No Record Found ... </div>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
<mat-paginator #paginator class="mat-elevation-z1" [length]="templateList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
||||||
|
[pageSizeOptions]="[5, 10, 25, 100]" (page)="pageEvent = $event; pageChange($event)">
|
||||||
|
</mat-paginator>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--=================================== END-->
|
||||||
|
|
||||||
<button (click)="goToEdit()">Edit</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<notifier-container></notifier-container>
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
// mat table css
|
||||||
|
|
||||||
|
.example-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example-header {
|
||||||
|
min-height: 64px;
|
||||||
|
padding: 8px 24px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mat-form-field {
|
||||||
|
font-size: 14px;
|
||||||
|
// width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mat-table {
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-line-limit {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
// white-space: nowrap;
|
||||||
|
display: -webkit-box;
|
||||||
|
line-height: 16px; /* fallback */
|
||||||
|
max-height: 32px; /* fallback */
|
||||||
|
-webkit-line-clamp: 2; /* number of lines to show */
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
|
||||||
|
// text-overflow: ellipsis;
|
||||||
|
// overflow: hidden;
|
||||||
|
// width: 160px;
|
||||||
|
// height: 1.2em;
|
||||||
|
// white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-label {
|
||||||
|
padding: 2px 6px;
|
||||||
|
background: #629cff;
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 2px 3px #c8bbbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-record-found {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #03a9f4;
|
||||||
|
padding : 12px 8px;
|
||||||
|
}
|
||||||
@ -11,25 +11,81 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-list',
|
selector: 'app-list',
|
||||||
|
styleUrls: ['./templates.list.component.scss'],
|
||||||
templateUrl: './templates.list.component.html'
|
templateUrl: './templates.list.component.html'
|
||||||
})
|
})
|
||||||
export class TemplateListComponent implements OnInit, OnDestroy {
|
export class TemplateListComponent implements OnInit, OnDestroy {
|
||||||
public listView: boolean = true;
|
|
||||||
|
public templateList = [];
|
||||||
|
public listView: boolean;
|
||||||
public names: string;
|
public names: string;
|
||||||
|
public noTemplMasterRecrdFound: boolean = false;
|
||||||
|
|
||||||
|
// pagination variable details
|
||||||
|
length = 50;
|
||||||
|
pageIndex = 0;
|
||||||
|
pageSize = 10;
|
||||||
|
pageEvent: PageEvent;
|
||||||
|
|
||||||
|
// data source variable details
|
||||||
|
templateListData = null;
|
||||||
|
public dataLength: number;
|
||||||
|
public dataSource = new MatTableDataSource();
|
||||||
|
displayedColumns = ['categroy_name', 'question', 'actions'];
|
||||||
|
|
||||||
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router) {
|
||||||
|
this.listView = true;
|
||||||
// this.names = 'dinesh';
|
// this.names = 'dinesh';
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// alert(1);
|
|
||||||
alert();
|
|
||||||
this.listView = true;
|
this.listView = true;
|
||||||
|
this.getTemplateMastersListDetails();
|
||||||
}
|
}
|
||||||
|
|
||||||
goToEdit(){
|
|
||||||
this.router.navigate([ '../list/edit', '1' ], { relativeTo: this.route });
|
// get question master list details
|
||||||
|
getTemplateMastersListDetails() {
|
||||||
|
this.templateList = this.m_templateList.records;
|
||||||
|
this.templateListData = this.m_templateList.records;
|
||||||
|
this.dataLength = this.m_templateList.records.length;
|
||||||
|
this.dataSource.data = this.templateListData;
|
||||||
|
|
||||||
|
// this.noTemplMasterRecrdFound = false;
|
||||||
|
// this.search_cid = this.filterFormGroupCtrl.controls.category.value;
|
||||||
|
// console.log(this.search_cid + ", " + this.filterFormGroupCtrl);
|
||||||
|
// this.questionsService.getQuestionMasterDetails(this.search_cid).subscribe(
|
||||||
|
// data => {
|
||||||
|
// if (data) {
|
||||||
|
// if (data.records) {
|
||||||
|
// this.templateList = data.records;
|
||||||
|
// this.templateListData = data.records;
|
||||||
|
// this.dataLength = data.records.length;
|
||||||
|
// this.dataSource.data = this.templateListData;
|
||||||
|
// } else {
|
||||||
|
// this.templateList = [];
|
||||||
|
// this.dataLength = null;
|
||||||
|
// this.noTemplMasterRecrdFound = true;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// this.templateList = [];
|
||||||
|
// this.dataLength = null;
|
||||||
|
// this.noTemplMasterRecrdFound = true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// )
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
goToEdit(template_id : number){
|
||||||
|
this.router.navigate([ '../list/edit', template_id ], { relativeTo: this.route });
|
||||||
this.listView = false;
|
this.listView = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +97,112 @@ export class TemplateListComponent implements OnInit, OnDestroy {
|
|||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
//Called once, before the instance is destroyed.
|
//Called once, before the instance is destroyed.
|
||||||
//Add 'implements OnDestroy' to the class.
|
//Add 'implements OnDestroy' to the class.
|
||||||
alert();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public m_templateList = {
|
||||||
|
"dataStatus": true,
|
||||||
|
"status": 200,
|
||||||
|
"records":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"template_id": "1",
|
||||||
|
"template_name": "sample dev template",
|
||||||
|
"createdon": "28/09/2018",
|
||||||
|
"fk_createdby": "1",
|
||||||
|
"updatedon": null,
|
||||||
|
"fk_updatedby": null,
|
||||||
|
"isactive": "1",
|
||||||
|
"createdby": "sriram v",
|
||||||
|
"updatedby": null,
|
||||||
|
"lender_details": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"template_id": "2",
|
||||||
|
"template_name": "two template",
|
||||||
|
"createdon": "28/09/2018",
|
||||||
|
"fk_createdby": "1",
|
||||||
|
"updatedon": null,
|
||||||
|
"fk_updatedby": null,
|
||||||
|
"isactive": "1",
|
||||||
|
"createdby": "sriram v",
|
||||||
|
"updatedby": null,
|
||||||
|
"lender_details": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"template_id": "3",
|
||||||
|
"template_name": "ABCD template redd",
|
||||||
|
"createdon": "11/10/2018",
|
||||||
|
"fk_createdby": "1",
|
||||||
|
"updatedon": null,
|
||||||
|
"fk_updatedby": null,
|
||||||
|
"isactive": "1",
|
||||||
|
"createdby": "sriram v",
|
||||||
|
"updatedby": null,
|
||||||
|
"lender_details": [
|
||||||
|
{
|
||||||
|
"template_lender_map_id": "1",
|
||||||
|
"fk_template_id": "3",
|
||||||
|
"fk_lender_id": "1",
|
||||||
|
"full_name": "ICICIedited",
|
||||||
|
"short_name": "checkee",
|
||||||
|
"fk_product_id": "1",
|
||||||
|
"product_name": "Home Loan ",
|
||||||
|
"product_abbr": "HL",
|
||||||
|
"fk_customer_segment": "1",
|
||||||
|
"customer_segment_name": "Salaried Non Professional ",
|
||||||
|
"customer_segment_abbr": "SNP",
|
||||||
|
"createdon": "11/10/2018",
|
||||||
|
"fk_createdby": "1",
|
||||||
|
"updatedon": null,
|
||||||
|
"isactive": "1",
|
||||||
|
"fk_updatedby": null,
|
||||||
|
"createdby": "sriram v",
|
||||||
|
"updatedby": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"template_lender_map_id": "2",
|
||||||
|
"fk_template_id": "3",
|
||||||
|
"fk_lender_id": "1",
|
||||||
|
"full_name": "ICICIedited",
|
||||||
|
"short_name": "checkee",
|
||||||
|
"fk_product_id": "2",
|
||||||
|
"product_name": "Non Residential Premises Loans",
|
||||||
|
"product_abbr": "NRPL",
|
||||||
|
"fk_customer_segment": "2",
|
||||||
|
"customer_segment_name": "Salaried Professional ",
|
||||||
|
"customer_segment_abbr": "SP",
|
||||||
|
"createdon": "11/10/2018",
|
||||||
|
"fk_createdby": "1",
|
||||||
|
"updatedon": "11/10/2018",
|
||||||
|
"isactive": "1",
|
||||||
|
"fk_updatedby": null,
|
||||||
|
"createdby": "sriram v",
|
||||||
|
"updatedby": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"template_lender_map_id": "2",
|
||||||
|
"fk_template_id": "3",
|
||||||
|
"fk_lender_id": "1",
|
||||||
|
"full_name": "ICICIedited",
|
||||||
|
"short_name": "checkee",
|
||||||
|
"fk_product_id": "2",
|
||||||
|
"product_name": "Non Residential Premises Loans",
|
||||||
|
"product_abbr": "NRPL",
|
||||||
|
"fk_customer_segment": "2",
|
||||||
|
"customer_segment_name": "Salaried Professional ",
|
||||||
|
"customer_segment_abbr": "SP",
|
||||||
|
"createdon": "11/10/2018",
|
||||||
|
"fk_createdby": "1",
|
||||||
|
"updatedon": "11/10/2018",
|
||||||
|
"isactive": "1",
|
||||||
|
"fk_updatedby": null,
|
||||||
|
"createdby": "sriram v",
|
||||||
|
"updatedby": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
template: `<h2>Templates Master Details List</h2>
|
template: `
|
||||||
<div>
|
<div>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -12,7 +12,8 @@ import {
|
|||||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
MatToolbarModule,MatSelectModule,
|
MatToolbarModule,MatSelectModule,
|
||||||
MatListModule, MatMenuModule,
|
MatListModule, MatMenuModule,
|
||||||
MatCheckboxModule, MatStepperModule
|
MatCheckboxModule, MatStepperModule, MatTabsModule,
|
||||||
|
MatExpansionModule
|
||||||
} from '@angular/material';
|
} from '@angular/material';
|
||||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
@ -24,6 +25,9 @@ import { TemplatesRouting } from './templates.routing';
|
|||||||
import { TemplatesComponent } from './templates.component';
|
import { TemplatesComponent } from './templates.component';
|
||||||
import { TemplateListComponent } from './templates-list/templates.list.component';
|
import { TemplateListComponent } from './templates-list/templates.list.component';
|
||||||
import { TemplateEditComponent } from './templates-list/edit/templates.edit.component';
|
import { TemplateEditComponent } from './templates-list/edit/templates.edit.component';
|
||||||
|
import { EditCategoryComponent } from './templates-list/edit/edit-category/edit-category.component';
|
||||||
|
import { EditLenderComponent } from './templates-list/edit/edit-lender/edit-lender.component';
|
||||||
|
import { EditQuestionAnswerComponent } from './templates-list/edit/edit-question-answer/edit-question-answer.component';
|
||||||
|
|
||||||
// import { QuestionsService } from './../service/questions/questions.service';
|
// import { QuestionsService } from './../service/questions/questions.service';
|
||||||
/*
|
/*
|
||||||
@ -86,7 +90,9 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
MatButtonModule,MatTableModule,MatPaginatorModule,
|
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||||
MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule,
|
MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule,
|
||||||
|
MatExpansionModule,
|
||||||
MatStepperModule,
|
MatStepperModule,
|
||||||
|
MatTabsModule,
|
||||||
MatSlideToggleModule,
|
MatSlideToggleModule,
|
||||||
MatCheckboxModule,
|
MatCheckboxModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
@ -96,7 +102,10 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
declarations: [
|
declarations: [
|
||||||
TemplatesComponent,
|
TemplatesComponent,
|
||||||
TemplateListComponent,
|
TemplateListComponent,
|
||||||
TemplateEditComponent
|
TemplateEditComponent,
|
||||||
|
EditCategoryComponent,
|
||||||
|
EditLenderComponent,
|
||||||
|
EditQuestionAnswerComponent
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
],
|
],
|
||||||
|
|||||||
@ -121,6 +121,9 @@
|
|||||||
transform: scale3D(0, 0, 1);
|
transform: scale3D(0, 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.mat-cell{
|
||||||
|
font-size:1.2em !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
<link rel="stylesheet" href="assets/wheather-icon/css/weather-icons.min.css" />
|
<link rel="stylesheet" href="assets/wheather-icon/css/weather-icons.min.css" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user