Fairoj : PD Score table component added and some other issue fixed

This commit is contained in:
venbatechnologies@gmail.com 2019-07-24 17:48:41 +05:30
parent 6c8a4a1bae
commit 3a64838a61
30 changed files with 2506 additions and 2002 deletions

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
"license": "MIT",
"scripts": {
"production": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod ",
"staging": "node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng build --prod --configuration=staging",
"staging": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod --configuration=staging",
"ng": "ng",
"start": "ng serve",
"build": "ng build",

View File

@ -45,7 +45,8 @@ export class DashboardComponent {
ngOnInit(){
// console.clear();
this.access = this.userRoleID == 3 || this.userRoleID == 4 || this.userRoleID == 6 ? false : true;
// this.access = this.userRoleID == 3 || this.userRoleID == 4 || this.userRoleID == 6 ? false : true;
this.access = this.userRoleID == 4 || this.userRoleID == 6 ? false : true;
this.getDoughnutChartData();
}

View File

@ -108,7 +108,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this.userRoleType=localStorage.getItem('user_role');
this.permissionDeined = this.userRoleType == '3' || this.userRoleType == '4' || this.userRoleType == '6' ? false : true;
this.permissionDeined = this.userRoleType == '4' || this.userRoleType == '6' ? false : true;
// console.clear();
const elemSidebar = <HTMLElement>document.querySelector('.sidebar-container ');

View File

@ -11,7 +11,7 @@ export class RoleMenuItemsPipe implements PipeTransform {
switch(localStorage.getItem('user_role')){
case '1': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
case '2': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
case '3': return;
case '3': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
case '4': return;
case '5': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports");
case '6': return;

View File

@ -8,7 +8,7 @@
</div>
<div fxFlex="50" class="pb-0 text-sm-right">
<button mat-fab (click)="viewMapPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Map view" matTooltipPosition="above"><mat-icon>map</mat-icon></button>
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button mat-fab (click)="addPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Add PD" matTooltipPosition="above" *ngIf="roleAccessDetails.trigger"><mat-icon>add</mat-icon></button></span>
<span *ngIf="userRoleID == 10 || userRoleID == 2 || userRoleID == 3"><button mat-fab (click)="addPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Add PD" matTooltipPosition="above" *ngIf="roleAccessDetails.trigger"><mat-icon>add</mat-icon></button></span>
</div>
</div>
<mat-card>

View File

@ -184,6 +184,12 @@ salesMarginPerCalculation(indexVal: number,values: any): void {
else {
control.controls[indexVal].controls['margin_final_value'].setValue('');
}
if(values.rate_per_unit != '' && values.margin_per != ''){
// console.log(values.margin_per,values.rate_per_unit)
let calculate_margin_per_uom=(parseFloat(values.margin_per)*parseFloat(values.rate_per_unit))/100
// console.log("margin_per",calculate_margin_per_uom);
control.controls[indexVal].controls['margin_per_uom'].setValue(calculate_margin_per_uom.toFixed(2))
}
}
salesMarginAmtCalculation(indexVal: number,values: any): void {
let control:any = <FormArray>this.salesItemForm.controls['salesCalItemwise'];
@ -201,6 +207,12 @@ salesMarginAmtCalculation(indexVal: number,values: any): void {
else {
control.controls[indexVal].controls['margin_final_value'].setValue('');
}
if(values.rate_per_unit != '' && values.margin_per_uom != ''){
// console.log(values.margin_per_uom,values.rate_per_unit)
let calculate_margin_per=parseFloat(values.margin_per_uom)/parseFloat(values.rate_per_unit)*100
// console.log("margin_per",calculate_margin_per);
control.controls[indexVal].controls['margin_per'].setValue(calculate_margin_per.toFixed(1))
}
}
// generate other UOM
generateOtherUOM(index: number, values: any): void {

View File

@ -19,9 +19,18 @@
<mat-tab-group>
<mat-tab label={{pageTitle}}>
<ng-template matTabContent>
<div fxLayout="row wrap">
<div fxFlex="100">
<mat-card>
<mat-form-field style="width:60% !important;">
<mat-select placeholder="Is the Asset Information Available" formControlName="asset_info_available" (selectionChange)="setAction($event.value)">
<mat-option>Select</mat-option>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
</mat-card>
<mat-card style="min-height: 550px;">
<mat-card-content>
<div fxLayout="row" fxLayoutAlign="start none">

View File

@ -272,10 +272,12 @@ export class AssetsInfoComponent implements OnInit {
formLoadData(val) {
if (val !== null) {
let value = val;
let asset_info=value.hasOwnProperty('asset_info_available') ? value.asset_info_available == true ? 'yes' : 'no' : 'yes'
this._assetsQuesFrom = this._formBuilder.group({
parent_pdid: [this.parent_pdid],
pdid: [this.pdid],
formid: ['4'],
asset_info_available:[asset_info],
assets_details: this._formBuilder.array([
// this.initDetails(),
]),
@ -290,11 +292,12 @@ export class AssetsInfoComponent implements OnInit {
pdid: [this.pdid],
formid: ['4'],
assets_details: this._formBuilder.array([
this.initDetails(),
// this.initDetails(),
]),
// business_assets_details : this._formBuilder.array([
// this.initBusinessDetails(),
// ]),
asset_info_available:[''],
assets_form_remark: ['']
});
}
@ -813,6 +816,14 @@ export class AssetsInfoComponent implements OnInit {
} else {
this.disableAfterSubmit = true;
var answerFormValues = this._assetsQuesFrom.value;
if(answerFormValues.asset_info_available){
if(answerFormValues.asset_info_available == 'yes'){
answerFormValues.asset_info_available=true
}
else{
answerFormValues.asset_info_available=false
}
}
//To Remove The "Null" With Key also
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
@ -1011,6 +1022,23 @@ retriveFile(){
}
});
}
setAction(dummy){
console.log(this._assetsQuesFrom.value);
let value=dummy
// let value = this._assetsQuesFrom.controls.asset_info_available.value;
// console.log("value",value);
let control=this._assetsQuesFrom.controls.assets_details as FormArray
if(value == 'yes'){
let control=this._assetsQuesFrom.controls.assets_details as FormArray
control.push(this.initDetails())
}
else{
this._assetsQuesFrom.controls.assets_details.value.forEach((res,index)=>{
control.removeAt(index);
})
control.removeAt(0)
}
}
}

View File

@ -100,6 +100,7 @@
<mat-form-field>
<mat-select placeholder="Account Holders Name" formControlName="applicant_name"
[compareWith]="compareObjects">
<mat-option>Select</mat-option>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.group_id != 2 ? val.name : val.name | titlecase}}

View File

@ -18,7 +18,8 @@
<ng-template matTabContent>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="100">
<div formArrayName="business_assets_for_address" fxFill>
<div formArrayName="business_assets_for_address" fxFill >
<div
*ngFor="let itemrow of _businessAssetsQuesFrom.controls.business_assets_for_address['controls']; let i=index; let last=last;">
<div [formGroupName]="i">
@ -202,8 +203,16 @@
</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-form-field style="width:60% !important;">
<mat-select placeholder="Is the Asset Information Available" formControlName="asset_info_available" >
<mat-option>Select</mat-option>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field><br/>
<div fxLayout="row" fxLayoutAlign="start none">
<div formArrayName="business_assets_details" fxFill>
<div formArrayName="business_assets_details" fxFill *ngIf="_businessAssetsQuesFrom.controls['asset_info_available'].value == 'yes'">
<div
*ngFor="let sup of _businessAssetsQuesFrom.controls.business_assets_details['controls']; let i=index; let last=last;">
<mat-card>

View File

@ -87,12 +87,15 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
this.generalExistBusinessYear = this.pd_all_details.business_years;
this.generalExistBusinessMonth = this.pd_all_details.business_month;
this.getM_Address_Type();
}
documentsAndFilesList: any = [];
/** init Function */
ngOnInit() {
console.clear();
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
// });
@ -119,13 +122,12 @@ export class BusinessAssetsInfoComponent implements OnInit {
}
});
this.getM_State_For_Address();
this.getPdSupplierFormDetails();
this.getM_Assets_Type();
this.getM_PropertyType();
this.getM_Address_Type();
this.getM_Vehicle_Type();
this.getM_Address_Type();
this.retriveFile();
}
/** init Function Ends Here */
@ -338,6 +340,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
formLoadData(val) {
if (val !== null) {
let value = val;
let asset_info=value.hasOwnProperty('asset_info_available') ? value.asset_info_available == true ? 'yes' : 'no' : 'yes'
this.loadaddresses(1);
this._businessAssetsQuesFrom = this._formBuilder.group({
parent_pdid: [this.parent_pdid],
@ -347,6 +350,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
// business_address_details: this._formBuilder.array([]),
business_assets_for_address: this._formBuilder.array([]),
business_assets_details: this._formBuilder.array([]),
asset_info_available:[asset_info],
business_assets_form_remark: [value.business_assets_form_remark || null]
});
// if (value.business_address_availability == 'yes') {
@ -367,6 +371,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
company_id: [this.company_id],
business_assets_for_address: this._formBuilder.array([]),
business_assets_details: this._formBuilder.array([this.initBusinessDetails()]),
asset_info_available:[''],
business_assets_form_remark: ['']
});
this.loadaddresses(2);
@ -779,6 +784,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
let getList = this.addressList.map(dval => dval.value.replace(/\s/g, "").toLowerCase());
let getkeyname = this.addressList.map(dval => dval.key_name);
let findName = this.m_address_type.find(x => x.address_type_id == property_id);
console.log(findName,property_id);
// console.log(getkeyname.indexOf(i));
let evt = event.replace(/\s/g, "").toLowerCase();
@ -874,6 +880,15 @@ export class BusinessAssetsInfoComponent implements OnInit {
var answerFormValues = this._businessAssetsQuesFrom.value;
let dataOwner_name = [];
if(answerFormValues.asset_info_available){
if(answerFormValues.asset_info_available == 'yes'){
answerFormValues.asset_info_available=true
}
else{
answerFormValues.asset_info_available=false
}
}
//To Remove The "Null" With Key also
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);

View File

@ -33,6 +33,7 @@
<mat-form-field>
<mat-select placeholder="Account Holders Name" formControlName="applicant_name"
[compareWith]="compareObjects">
<mat-option>Select</mat-option>
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.group_id != 2 ? val.name : val.name | titlecase}}

View File

@ -41,6 +41,9 @@
</mat-select>
<mat-error *ngIf="_finalRemarkForm.controls['is_service_provided'].hasError('required')">Service Provided Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Personal feedback or market intelligence on the case (if any)" formControlName="market_intelligence">
</mat-form-field>
</mat-card-content>
</mat-card>
<br>
@ -304,6 +307,7 @@
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Other Remarks</mat-label>
<textarea matInput placeholder="Other Remarks" formControlName="final_form_remarks"></textarea>
<mat-error *ngIf="_finalRemarkForm.controls['final_form_remarks'].invalid">Other Remarks is Required</mat-error>
</mat-form-field>
</div>
<div fxFlex="40" align="end">

View File

@ -78,6 +78,7 @@ export class FinalRemarksComponent implements OnInit {
final_custormer_remark_type: [],
final_other_customer_behaviour: ['', Validators.required],
is_service_provided: ['', Validators.required],
market_intelligence:[''],
pd_officers_recommendation: ['', Validators.required],
others_pd_officers_recommendation: [''],
was_the_pd_address_ogl:[''],
@ -110,6 +111,13 @@ export class FinalRemarksComponent implements OnInit {
this._finalRemarkForm.removeControl('sealing_activity');
this._finalRemarkForm.removeControl('demolition_activity');
}
if(this.product_abbr != 'LAEP'){
this._finalRemarkForm.controls['final_form_remarks'].setValidators(Validators.compose([Validators.required]))
}
else{
this._finalRemarkForm.controls['final_form_remarks'].clearValidators()
this._finalRemarkForm.controls['final_form_remarks'].updateValueAndValidity();
}
this.getM_Type();
@ -226,6 +234,9 @@ export class FinalRemarksComponent implements OnInit {
this._finalRemarkForm.controls.is_service_provided.setValue(data.records.is_service_provided);
this._finalRemarkForm.controls.final_form_remarks.setValue(data.records.final_form_remarks);
this._finalRemarkForm.controls.market_intelligence.setValue(data.records.market_intelligence || '');
if(this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP'){
if(this.product_abbr == 'LAEP') {this._finalRemarkForm.controls.outlet_location.setValue(this.product_abbr == 'LAEP' ? data.records.outlet_location : ''); }

View File

@ -13,9 +13,14 @@
margin: 0 2%;
}
.top .thumbnail .date {
// margin-right: 13px;
position: absolute;
top: 4px;
right: -10px;
top: 4px;
}
.top .thumbnail{
position: relative;
}
.example-container {
// display: flex;
@ -68,5 +73,73 @@
// margin-top: 3% !important;
// }
// .after-com-parent >*:not(:first-child) {
// margin-left: 3% !important;
// }
// margin-left: 3% !imortant;
// }
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
$product-bg-color-hover: rgba(103, 58, 183, 0.7);
.p-list-main {
background: white;
margin: auto;
position: relative;
overflow: hidden !important;
border-radius: 10px 10px 10px 10px;
box-shadow: $base-card-box-shadow;
transform: scale(0.95);
transition: box-shadow 0.5s, transform 0.5s;
&:hover {
transform: scale(1);
box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
}
.p-list {
position: relative;
.top {
height: 100%;
width: 100%;
// background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
background-size: 100%;
}
.bottom {
width: 200%;
height: 15%;
transition: transform 0.5s;
h1 {
margin: 0;
padding: 0;
}
p {
margin: 0;
padding: 0;
}
.left {
height: 100%;
width: 50%;
background: #f4f4f4;
position: relative;
float: left;
.details {
padding: 5px;
float: left;
// width: calc(70% - 40px);
}
}
.right {
width: 50%;
background: #A6CDDE;
color: white;
float: right;
height: 200%;
overflow: hidden;
.details {
padding: 20px;
float: right;
width: calc(70% - 40px);
}
}
}
}
}

View File

@ -294,6 +294,8 @@ export class LoanDetailsComponent implements OnInit {
this.loanDetailsForm.controls['emv_per_customer'].setValue(value.records.emv_per_customer);
// this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
}
console.log("product abbr",this.productAbbr);
console.log("value",value)
this.loanDetailsForm.controls['property_seller'].setValue(this.productAbbr != 'LAP' ? value.records.property_seller || null : '');
this.loanDetailsForm.controls['address'].setValue(value.records.address || null);
@ -808,6 +810,7 @@ export class LoanDetailsComponent implements OnInit {
}
}
}
if (!this.loanDetailsForm.valid) {
this.validateAllFormFields(this.loanDetailsForm);
@ -902,6 +905,13 @@ export class LoanDetailsComponent implements OnInit {
records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value;
records.property_seller=this.loanDetailsForm.controls['property_seller'].value;
records.address=this.loanDetailsForm.controls['address'].value;
records.state=this.loanDetailsForm.controls['state'].value;
records.city=this.loanDetailsForm.controls['city'].value;
records.pincode=this.loanDetailsForm.controls['pincode'].value;
records.other_pincode=this.loanDetailsForm.controls['other_pincode'].value;
this._pd.saveForm(records).subscribe(data => {
if (data.status == 200) {
this.notifier.notify('success', 'Saved Successfully.');

View File

@ -126,9 +126,9 @@
</div>
<div fxFlex="60" align="right">
<span><button *ngIf="roleAccessDetails.trigger && addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span>
<span *ngIf="userRoleID == 3 || userRoleID == 10"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10"><button *ngIf="roleAccessDetails.schedule && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span>
<span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && enableStartPD" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,master.pd_status)"><mat-icon>question_answer</mat-icon></button></span>
<span *ngIf="userRoleID == 2 || userRoleID == 3 || userRoleID == 10"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="userRoleID == 2 || userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10"><button *ngIf="roleAccessDetails.schedule && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span>
<span *ngIf="userRoleID == 2 || userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && enableStartPD" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,master.pd_status)"><mat-icon>question_answer</mat-icon></button></span>
</div>
</div>
</div>

View File

@ -0,0 +1,7 @@
<mat-card class="parent_mat_card">
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="close()" style="margin-right: 2px;"><mat-icon>close</mat-icon></button>
<!-- <mat-label>jsjhdj</mat-label> -->
<mat-dialog-content>
<div [innerHTML]="value"></div>
</mat-dialog-content>
</mat-card>

View File

@ -0,0 +1,102 @@
::ng-deep .mat-dialog-container{
overflow: hidden !important;
}
::ng-deep .mat-card-header-text{
margin:0px !important;
}
.mat-purple{
background-color: gray !important;
}
.cdk-global-overlay-wrapper{
justify-content: center !important;
}
mat-card.parent_mat_card > {
mat-card-header {
display: flex;
flex-direction: column;
}
mat-card-content {
min-height:auto;
max-height:52vh;
overflow:auto;
}
.user-thumb {
position: absolute;
bottom: -35%;
// img {
// border: 5px solid $white;
// border-radius: 100%;
// height: 75px;
// width: 75px;
// }
}
// @media only screen and (max-width:319px) {
// mat-card-content {
// max-height: 350px;
// overflow: auto;
// }
// }
// @media only screen and (min-width:320px) and (max-width:767px) {
// mat-card-content {
// max-height: 350px;
// overflow: auto;
// }
// }
// @media only screen and (min-width:768px) and (max-width:1023px) {
// mat-card-content {
// max-height: 350px;
// overflow: auto;
// }
// }
// @media only screen and (min-width:1024px) and (max-width:1899px) {
// mat-card-content {
// max-height: 400px;
// overflow: auto;
// }
// }
// @media only screen and (min-width:1900px) {
// mat-card-content {
// max-height: 500px;
// overflow: auto;
// }
// }
}
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
mat-card .child_mat_card > mat-card {
border-radius: 0px 0px 0px 15px;
box-shadow: $base-card-box-shadow;
transform: scale(0.95);
transition: box-shadow 0.5s, transform 0.5s;
&:hover {
cursor: pointer;
// background-color: #e00201 !important;
transform: scale(1);
box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
}
}
#customers {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#customers td, #customers th {
border: 1px solid #ddd;
padding: 8px;
}
#customers tr:nth-child(even){background-color: #f2f2f2;}
#customers tr:hover {background-color: #ddd;}
#customers th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { QcNewComponent } from './qc-new.component';
describe('QcNewComponent', () => {
let component: QcNewComponent;
let fixture: ComponentFixture<QcNewComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ QcNewComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(QcNewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,101 @@
import { Component, OnInit, Inject } from '@angular/core';
import { QcService } from 'app/quality-check/qc-service/qc.service';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
@Component({
selector: 'app-qc-new',
templateUrl: './qc-new.component.html',
styleUrls: ['./qc-new.component.scss']
})
export class QcNewComponent implements OnInit {
value
pd_id
constructor(private qcService:QcService,private dialogRef: MatDialogRef<QcNewComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) {
this.pd_id=this.data.startId
console.log(this.pd_id);
}
ngOnInit() {
this.qcService.getPDScore(this.pd_id).subscribe(res=>{
if(res.dataStatus){
console.log(res);
this.value=res.records
}
})
// this.value=`<!DOCTYPE html>
// <html>
// <head>
// </head>
// <body>
// <table border="3">
// <tr>
// <th>Company</th>
// <th>Contact</th>
// <th>Country</th>
// </tr>
// <tr>
// <td>Alfreds Futterkiste</td>
// <td>Maria Anders</td>
// <td>Germany</td>
// </tr>
// <tr>
// <td>Berglunds snabbköp</td>
// <td>Christina Berglund</td>
// <td>Sweden</td>
// </tr>
// <tr>
// <td>Centro comercial Moctezuma</td>
// <td>Francisco Chang</td>
// <td>Mexico</td>
// </tr>
// <tr>
// <td>Ernst Handel</td>
// <td>Roland Mendel</td>
// <td>Austria</td>
// </tr>
// <tr>
// <td>Island Trading</td>
// <td>Helen Bennett</td>
// <td>UK</td>
// </tr>
// <tr>
// <td>Königlich Essen</td>
// <td>Philip Cramer</td>
// <td>Germany</td>
// </tr>
// <tr>
// <td>Laughing Bacchus Winecellars</td>
// <td>Yoshi Tannamuri</td>
// <td>Canada</td>
// </tr>
// <tr>
// <td>Magazzini Alimentari Riuniti</td>
// <td>Giovanni Rovelli</td>
// <td>Italy</td>
// </tr>
// <tr>
// <td>North/South</td>
// <td>Simon Crowther</td>
// <td>UK</td>
// </tr>
// <tr>
// <td>Paris spécialités</td>
// <td>Marie Bertrand</td>
// <td>France</td>
// </tr>
// </table>
// </body>
// </html>
// `
}
close(){
this.dialogRef.close();
}
}

View File

@ -1,3 +1,16 @@
<!-- <mat-sidenav-container
class="example-container" (backdropClick)="close('backdrop')" >
<mat-sidenav class="sidebar" #sidenav (keydown.escape)="close('escape')" disableClose position="end">
<p><button mat-button (click)="close('toggle button')">Toggle</button></p>
</mat-sidenav>
<mat-sidenav-content>
<p><button mat-button (click)="sidenav.open()">Open</button></p>
<p>Closed due to: {{reason}}</p>
</mat-sidenav-content>
</mat-sidenav-container> -->
<div class="other-sideMenu">
<!-- this is for completed pd report -->
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
<div *ngIf="reGenerateBtn">
@ -30,6 +43,7 @@
<!-- <span class="mr-1 ml-1">View More</span> -->
<span class="mr-1 ml-1">PD Report</span>
<span class="empty-spacer"></span>
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Score" matTooltipPosition="above" (click)="showAction()" ><mat-icon>arrow_upward</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="getFrameContent(IFrameContent)" style="margin-right: 2px;"><mat-icon>save</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Notes" matTooltipPosition="above" (click)="reportReview('REMARKS')" style="margin-right: 2px;"><mat-icon>notes</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Complete" matTooltipPosition="above" (click)="reportReview('COMPLETE')" style="margin-right: 2px;"><mat-icon>done_all</mat-icon></button>
@ -116,4 +130,6 @@
</div>
</ng-container>
<notifier-container></notifier-container>
<notifier-container></notifier-container>
</div>

View File

@ -6,11 +6,12 @@
display: block;
}
:host /deep/ {
mat-sidenav {
max-width: 400px;
max-height: 500px;
overflow-y: auto;
}
// mat-sidenav {
// max-width: 400px;
// max-height: 500px;
// overflow-y: auto;
// }
.mat-sidenav-content {
padding: 0;
@ -135,4 +136,37 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
width:100px;
height: 3000px !important;
}
}
}
.example-container {
// height: 100%;
// top: -120px;
bottom: 0;
left: 0;
right: 0;
z-index:2;
}
// .example-events {
// width: 300px;
// height: 200px;
// // overflow: auto;
// border: 1px solid #555;
// }
// .sidebar{
// position: relative;
// height :100%;
// // position: absolute;
// // z-index: 3;
// // height: 100%;
// // height: 100%;
// // width: 400px;
// // top:100%
// }
// .other-sideMenu{
// // display: none;
// position: absolute;
// z-index: -1;
// }

View File

@ -11,12 +11,14 @@ import { QcService } from './../../qc-service/qc.service';
import {
MatDialog,
MatDialogRef,
MAT_DIALOG_DATA
MAT_DIALOG_DATA,
} from "@angular/material";
import{MatSidenav} from '@angular/material/sidenav'
import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component';
import { QcReviewComponent } from './qc-review/qc-review.component';
import { HttpResponse } from "@angular/common/http";
import { environment } from 'environments/environment';
import { QcNewComponent } from './qc-new/qc-new.component';
@Component({
selector: 'app-qc-pd-report',
@ -25,6 +27,21 @@ import { environment } from 'environments/environment';
})
export class QcPdReportComponent implements OnInit {
@ViewChild('sidenav') sidenav: MatSidenav;
reason = '';
close(reason: string) {
this.reason = reason;
this.sidenav.close();
}
events: string[] = [];
opened: boolean;
// @ViewChild('sidenav') sidenav: MatSidenav;
// shouldRun = [/(^|\.)plnkr\.co$/, /(^|\.)stackblitz\.io$/].some(h => h.test(window.location.host));
Url: SafeUrl;
startPD: any;
// public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
@ -83,6 +100,10 @@ export class QcPdReportComponent implements OnInit {
// this.previous = 2;
this.urlSafe= this.sanitizer.bypassSecurityTrustResourceUrl(this.reportRandomString);
}
// close(value){
// console.log("value",value);
// this.sidenav.close();
// }
getFrameContent(content: any)
{
@ -302,6 +323,29 @@ export class QcPdReportComponent implements OnInit {
// this.isPopupOpened = false;
});
}
showAction(){
// this.router.navigate(['qc_new'])
const dialogRef = this.dialog.open(QcNewComponent, {
data: { startId: this.startPD },
// disableClose: true,
minWidth: '60%',
maxWidth: '90%',
minHeight:'50%',
maxHeight:'90%',
disableClose: false
});
dialogRef.afterClosed()
.subscribe(dataresult => {
if(dataresult.status==true){
// this.getPdReportVersionList();
}
// this.getPdReportFinalTemplateDetails();
// this.getQuestionsMasters();
// this.getBranch();
// this.isPopupOpened = false;
});
}
changeDocumentEdit(): void {
@ -365,7 +409,7 @@ export class QcPdReportComponent implements OnInit {
// }s
// })
}
export() {
this.pdTrigerService.pdReportExportExcel().subscribe((blob: HttpResponse<Blob>) => {
if (blob) {

View File

@ -86,7 +86,8 @@ export class QcReviewComponent implements OnInit {
myClick(): void {
let template = this.ngForm.value;
template.pd_id = this.data.startId;
template.random_String = this.data.random_string;
template.random_string = this.data.random_string;
template.parent_pd_id=this.data.startId;
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
this.notifier.notify('success', 'Your Changes Updated.!');
this.dialogRef.close({

View File

@ -618,4 +618,7 @@ export class QcService {
let records = { 'records': { "pdid":id,"content":content,"fk_createdby":this._aws.getlocale(),'random_string':randomString}};
return this._http.post<any>(this.apiUrl+"saveHTMLReport", records);
}
getPDScore(pdid:any):Observable<any>{
return this._http.post<any>(this.apiUrl+'getPDScore',{'pd_id':pdid})
}
}

View File

@ -5,6 +5,7 @@ import { QcListComponent } from './qc-list/qc-list.component';
import { QcViewComponent } from './qc-list/qc-view/qc-view.component';
import { QcStartComponent } from './qc-list/qc-start/qc-start.component';
import { QcPdReportComponent } from './qc-list/qc-pd-report/qc-pd-report.component';
import { QcNewComponent } from './qc-list/qc-pd-report/qc-new/qc-new.component';
const routes: Routes =[
{
@ -31,6 +32,10 @@ const routes: Routes =[
path: 'pd_report/:pdid/:string',
component: QcPdReportComponent,
},
// {
// path:'qc_new/:pdid/:string',
// component:QcNewComponent
// },
]
}
]

View File

@ -101,6 +101,7 @@ import { PersonalInfoComponent } from 'app/personal-discussion/manage-pd/list-pd
import { AllocationViewMoreComponent } from 'app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component';
import { PdRequirementComponent } from 'app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component';
import { FuturePlansAndBusinessEnvironmentComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
import { QcNewComponent } from './qc-list/qc-pd-report/qc-new/qc-new.component';
/**
@ -173,8 +174,8 @@ const customNotifierOptions: NotifierOptions = {
PdfViewerModule,
ManagePdModule,
],
declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent, QcPdReportComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, NumberToWordsPipe],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, InitiateAdditionalPdComponent,
declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent, QcPdReportComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, NumberToWordsPipe, QcNewComponent],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, InitiateAdditionalPdComponent,QcNewComponent,
BusinessAssetsInfoComponent,
ClientInfoComponent,
SupplierInfoComponent,

View File

@ -8,8 +8,8 @@ export const environment = {
environmentName: 'Development Environment',//Localhost Environment.
//apiEndpoint: 'https://ssa.sineedge.com/sparqtest/api/',
apiEndpoint: 'https://demo.pdgenie.com/sparqtest/api/',
// apiEndpoint: 'https://demo.pdgenie.com/sparqtest/api/',
apiEndpoint: 'https://demo.pdgenie.com/sparqapi/api/',
authorization: 'sparqvenba2018',