susee
This commit is contained in:
parent
cfc62c68d5
commit
4d5ae99c73
@ -12,6 +12,10 @@ export class AuthService {
|
|||||||
private apiUrl = environment.apiEndpoint;
|
private apiUrl = environment.apiEndpoint;
|
||||||
constructor(private _http: HttpClient) { }
|
constructor(private _http: HttpClient) { }
|
||||||
|
|
||||||
|
update_token(params): Observable<any> {
|
||||||
|
console.log(params.id)
|
||||||
|
return this._http.post<any>(this.apiUrl + "updateToken",params)
|
||||||
|
}
|
||||||
|
|
||||||
getLoginToken(params): Observable<any> {
|
getLoginToken(params): Observable<any> {
|
||||||
console.log(params.email)
|
console.log(params.email)
|
||||||
@ -21,7 +25,7 @@ export class AuthService {
|
|||||||
|
|
||||||
getForgotToken(params): Observable<any> {
|
getForgotToken(params): Observable<any> {
|
||||||
console.log(params.email)
|
console.log(params.email)
|
||||||
return this._http.post<any>(this.apiUrl + "forget-password",{'email':params.email,'password':params.password})
|
return this._http.post<any>(this.apiUrl + "_api",{'email':params.email,'password':params.password})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@
|
|||||||
<div class="col-md-4 col-sm-12">
|
<div class="col-md-4 col-sm-12">
|
||||||
<nb-form-field>
|
<nb-form-field>
|
||||||
<label for="subject">Pincode:</label>
|
<label for="subject">Pincode:</label>
|
||||||
<input formControlName="pincode" nbInput id="pincode" type="text" [status]="userForm.get('pincode').invalid && userForm.get('pincode').touched? 'danger' : 'basic'">
|
<input formControlName="pincode" nbInput id="pincode" type="text" [status]="userForm.get('pincode').invalid && userForm.get('pincode').touched? 'danger' : 'basic'">
|
||||||
<ng-container nbInputErrorMessage>
|
<ng-container nbInputErrorMessage>
|
||||||
<div style="color:#7c0e0e" *ngIf="userForm.get('pincode').hasError('required') && userForm.get('pincode').touched">Pincode is required.</div>
|
<div style="color:#7c0e0e" *ngIf="userForm.get('pincode').hasError('required') && userForm.get('pincode').touched">Pincode is required.</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -1,126 +1,247 @@
|
|||||||
<nb-card>
|
<nb-card>
|
||||||
<nb-card-header>
|
<nb-card-header>
|
||||||
|
|
||||||
|
|
||||||
<div class="row show-grid">
|
<div class="row show-grid">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div> {{fieldTitle}}</div>
|
<div> {{fieldTitle}}</div>
|
||||||
</div>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div style="text-align: end;">
|
|
||||||
<button nbTooltip="Back" nbTooltipPlacement="top" (click)="back()" nbButton status="warning" hero>
|
|
||||||
<nb-icon icon="corner-down-left-outline"></nb-icon>
|
|
||||||
|
|
||||||
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button nbTooltip="Edit" nbTooltipPlacement="top" *ngIf=" fieldTitle != 'Edit Order'" style=" margin-left: 2rem;" (click)="edit()" nbButton status="primary" hero>
|
|
||||||
<nb-icon icon="edit-outline"></nb-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button nbTooltip="Download" nbTooltipPlacement="top" style=" margin-left: 2rem;"(click)="generatePDF('download')" nbButton status="success" hero>
|
|
||||||
<nb-icon icon="download-outline"></nb-icon>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</nb-card-header>
|
<div class="col-md-8">
|
||||||
|
<div style="text-align: end;">
|
||||||
|
<button nbTooltip="Back" nbTooltipPlacement="top" (click)="back()" nbButton status="warning" hero>
|
||||||
|
<nb-icon icon="corner-down-left-outline"></nb-icon>
|
||||||
|
|
||||||
<nb-card-body>
|
|
||||||
|
|
||||||
<div class="row show-grid">
|
</button>
|
||||||
<div class="col-6 col-md-4">
|
|
||||||
<div>
|
|
||||||
<label for="exampleInputEmail1" class="label">Customer</label> <br />
|
|
||||||
<span *ngIf="fieldTitle == 'View Order'">{{selectCustomer}}</span>
|
|
||||||
<nb-select selected="" [(ngModel)]="selectCustomer" *ngIf="fieldTitle != 'View Order'" [disabled]="fieldTitle =='Edit Order' ">
|
|
||||||
|
|
||||||
<nb-option value="" hidden>Select Customer</nb-option>
|
<button nbTooltip="Edit" nbTooltipPlacement="top" *ngIf=" fieldTitle != 'Edit Order'" style=" margin-left: 2rem;" (click)="edit()" nbButton status="primary" hero>
|
||||||
|
<nb-icon icon="edit-outline"></nb-icon>
|
||||||
|
</button>
|
||||||
|
|
||||||
<nb-option *ngFor="let user of customer; index as i; first as isFirst " (click)="checkType(user)" [value]="user['CusDetails.cusName']
|
<button nbTooltip="Download" nbTooltipPlacement="top" style=" margin-left: 2rem;"(click)="generatePDF('download')" nbButton status="success" hero>
|
||||||
">{{user['CusDetails.cusName']
|
<nb-icon icon="download-outline"></nb-icon>
|
||||||
}}</nb-option>
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nb-card-header>
|
||||||
|
|
||||||
</nb-select>
|
<nb-card-body>
|
||||||
<hr>
|
|
||||||
<div style="font-size: larger;margin-top: 1rem;;margin-bottom: 1rem;"> Shipping Information</div>
|
<div class="row show-grid">
|
||||||
<div class="row show-grid" *ngIf="product.length>0">
|
<div class="col-6 col-md-4">
|
||||||
<div class="col-6 col-md-3">
|
<div>
|
||||||
<div>
|
<label for="exampleInputEmail1" class="label">Customer</label> <br />
|
||||||
<label for="subject" style=" font-weight: 500;">{{selectCustomerData['CusDetails.address_1']}} , {{selectCustomerData['CusDetails.city']}},<br />Contact No-({{selectCustomerData['CusDetails.phoneNo']}}) </label>
|
<span *ngIf="fieldTitle == 'View Order'">{{selectCustomer}}</span>
|
||||||
</div>
|
<nb-select selected="" [(ngModel)]="selectCustomer" *ngIf="fieldTitle != 'View Order'" [disabled]="fieldTitle =='Edit Order' ">
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-2">
|
<nb-option value="" hidden>Select Customer</nb-option>
|
||||||
<!-- <div>
|
|
||||||
<label for="subject" style=" font-weight: 600;width: 30%;">Qty:</label>
|
<nb-option *ngFor="let user of customer; index as i; first as isFirst " (click)="checkType(user)" [value]="user['CusDetails.cusName']
|
||||||
</div> -->
|
">{{user['CusDetails.cusName']
|
||||||
</div>
|
}}</nb-option>
|
||||||
<div class="col-6 col-md-4">
|
|
||||||
<!-- <div>
|
</nb-select>
|
||||||
<label for="subject" style=" font-weight: 600;"></label>
|
<hr>
|
||||||
</div> -->
|
<div style="font-size: larger;margin-top: 1rem;;margin-bottom: 1rem;"> Shipping Information</div>
|
||||||
</div>
|
<div class="row show-grid" *ngIf="product.length>0">
|
||||||
|
<div class="col-6 col-md-3">
|
||||||
|
<div>
|
||||||
|
<label for="subject" style=" font-weight: 500;">{{selectCustomerData['CusDetails.address_1']}} , {{selectCustomerData['CusDetails.city']}},<br />Contact No-({{selectCustomerData['CusDetails.phoneNo']}}) </label>
|
||||||
</div>
|
</div>
|
||||||
<!-- <input type="text" nbInput fullWidth placeholder="Project">-->
|
</div>
|
||||||
</div>
|
<div class="col-6 col-md-2">
|
||||||
</div>
|
<!-- <div>
|
||||||
<div class="col-6 col-md-4">
|
<label for="subject" style=" font-weight: 600;width: 30%;">Qty:</label>
|
||||||
<div>
|
</div> -->
|
||||||
<!-- <nb-select selected="DRIVER" >
|
</div>
|
||||||
<nb-option value="DRIVER">DRIVER</nb-option>
|
<div class="col-6 col-md-4">
|
||||||
|
<!-- <div>
|
||||||
|
<label for="subject" style=" font-weight: 600;"></label>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <input type="text" nbInput fullWidth placeholder="Project">-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-4">
|
||||||
|
<div>
|
||||||
|
<!-- <nb-select selected="DRIVER" >
|
||||||
|
<nb-option value="DRIVER">DRIVER</nb-option>
|
||||||
|
|
||||||
</nb-select> -->
|
</nb-select> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 col-md-4">
|
<div class="col-6 col-md-4">
|
||||||
<div *ngIf="fieldTitle == 'Edit Order' || fieldTitle == 'View Order'">
|
<div *ngIf="fieldTitle == 'Edit Order' || fieldTitle == 'View Order'">
|
||||||
<div style="font-size: larger;font-weight: 600;"> ORDER ID</div>
|
<div style="font-size: larger;font-weight: 600;"> ORDER ID</div>
|
||||||
|
|
||||||
<p> {{setData.orderId}} </p> <br />
|
<p> {{setData.orderId}} </p> <br />
|
||||||
<div style="font-size: larger;font-weight: 600;"> Status</div>
|
<div style="font-size: larger;font-weight: 600;"> Status</div>
|
||||||
<p style="text-transform: capitalize;" *ngIf="fieldTitle == 'View Order' " [ngStyle] = "{'color':setData.status =='ordered'?'#1f1dc9f5':setData.status =='Delivered' ?'green':'red' }" > ({{setData.status}}) </p>
|
<p style="text-transform: capitalize;" *ngIf="fieldTitle == 'View Order' " [ngStyle] = "{'color':setData.status =='ordered'?'#1f1dc9f5':setData.status =='Delivered' ?'green':'red' }" > ({{setData.status}}) </p>
|
||||||
<nb-select selected="" *ngIf="fieldTitle != 'View Order' " placeholder="Change Status" clearable style="width: 57% !important;margin-top: 1rem;" [(ngModel)]="selectStatus" >
|
<nb-select selected="" *ngIf="fieldTitle != 'View Order'" (ngModelChange)="onSelectChange($event)" placeholder="Change Status" clearable style="width: 57% !important;margin-top: 1rem;" [(ngModel)]="selectStatus" >
|
||||||
<!-- <nb-option value="">Change Status</nb-option> -->
|
<!-- <nb-option value="">Change Status</nb-option> -->
|
||||||
<nb-option value="ordered" >Ordered</nb-option>
|
<nb-option value="ordered" >Ordered</nb-option>
|
||||||
<nb-option value="In Progress" >In Progresss</nb-option>
|
<nb-option value="In Progress" >In Progresss</nb-option>
|
||||||
<nb-option value="Out For Delivery" >Out For Delivery</nb-option>
|
<nb-option value="Out For Delivery" >Out For Delivery</nb-option>
|
||||||
|
|
||||||
<nb-option value="Delivered" >Delivered</nb-option>
|
|
||||||
<nb-option value="Cancelled" >Cancelled</nb-option>
|
|
||||||
|
|
||||||
</nb-select>
|
|
||||||
|
|
||||||
<nb-select selected="" placeholder="Select Drivers" *ngIf="fieldTitle != 'View Order' && selectStatus == 'Out For Delivery'" [(ngModel)]="selectDriver" style="width: 57% !important;margin-right: 1rem;margin-top: 1rem;" >
|
|
||||||
<!-- <nb-option value="">Select Drivers</nb-option> -->
|
|
||||||
|
|
||||||
<nb-option *ngFor="let user of drivers; index as i; first as isFirst " [value]="user.id
|
|
||||||
">{{user.userName }}</nb-option>
|
|
||||||
|
|
||||||
|
<nb-option value="Delivered" >Delivered</nb-option>
|
||||||
|
<nb-option value="Cancelled" >Cancelled</nb-option>
|
||||||
|
|
||||||
</nb-select>
|
</nb-select>
|
||||||
<input nbInput *ngIf="fieldTitle != 'View Order' && selectStatus == 'Cancelled'" [(ngModel)]="CancelReason" placeholder="Reason" style=" margin-right: 2%;margin-top: 1rem;" id="text"> <br />
|
|
||||||
<button *ngIf="fieldTitle != 'View Order' " (click)="onSubmit2()" style="margin-top: 1rem;" type="submit" nbButton status="success" hero>
|
|
||||||
Save
|
|
||||||
</button>
|
|
||||||
<span *ngIf="setData.status =='Cancelled'">Reason: {{setData.reason}} </span>
|
|
||||||
<!-- <nb-select selected="DRIVER" >
|
|
||||||
<nb-option value="DRIVER">DRIVER</nb-option>
|
|
||||||
|
|
||||||
</nb-select> -->
|
<nb-select (ngModelChange)="onSelectChange1($event)" selected="" placeholder="Select Drivers" *ngIf="fieldTitle != 'View Order' && selectStatus == 'Out For Delivery'" [(ngModel)]="selectDriver" style="width: 57% !important;margin-right: 1rem;margin-top: 1rem;" >
|
||||||
</div>
|
<!-- <nb-option value="">Select Drivers</nb-option> -->
|
||||||
</div>
|
|
||||||
|
<nb-option *ngFor="let user of drivers; index as i; first as isFirst " [value]="user.id
|
||||||
|
">{{user.userName }}</nb-option>
|
||||||
|
|
||||||
|
|
||||||
|
</nb-select>
|
||||||
|
<input nbInput *ngIf="fieldTitle != 'View Order' && selectStatus == 'Cancelled'" [(ngModel)]="CancelReason" placeholder="Reason" style=" margin-right: 2%;margin-top: 1rem;" id="text"> <br />
|
||||||
|
<button *ngIf="fieldTitle != 'View Order'" [disabled]="hiddenBtn" (click)="onSubmit2()" style="margin-top: 1rem;" type="submit" nbButton status="success" hero>
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
|
<span *ngIf="setData.status =='Cancelled'">Reason: {{setData.reason}} </span>
|
||||||
|
<!-- <nb-select selected="DRIVER" >
|
||||||
|
<nb-option value="DRIVER">DRIVER</nb-option>
|
||||||
|
|
||||||
|
</nb-select> -->
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<nb-card-header>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row show-grid">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div style="font-size: larger;"> Product Information</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<!-- <div style=" text-align: end;">
|
||||||
|
<button (click)="back()" nbButton status="success" hero>
|
||||||
|
Back
|
||||||
|
</button>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nb-card-header>
|
||||||
|
<div class="row show-grid" *ngIf="product.length>0" >
|
||||||
|
<div class="col-6 col-md-3">
|
||||||
|
<div>
|
||||||
|
<label for="subject" style=" font-weight: 600;">Products: ( <span style="color:#ba0404">{{selectCustomerData['CusDetails.cusType'] ||setData['OrderDetails.CusDetails.cusType'] }}</span>)</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-2">
|
||||||
|
<div>
|
||||||
|
<label for="subject" style=" font-weight: 600;width: 30%;">Qty:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-4">
|
||||||
|
<div>
|
||||||
|
<label for="subject" style=" font-weight: 600;"> </label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div *ngFor="let fieldGroup of inputFieldGroups; let i = index">
|
||||||
|
<div *ngIf="fieldTitle != 'View Order'">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row show-grid" *ngIf="product.length>0" >
|
||||||
|
<div class="col-6 col-md-3">
|
||||||
|
<div >
|
||||||
|
<nb-select placeholder="Select Product" [(ngModel)]="fieldGroup.id" style="width: 100% !important;margin-right: 1rem;" >
|
||||||
|
<!-- <nb-option value="">Select Drivers</nb-option> -->
|
||||||
|
|
||||||
|
<nb-option *ngFor="let user of product; index as i; first as isFirst " [value]="user.id
|
||||||
|
">{{user.productName }}({{user.skuId }} )</nb-option>
|
||||||
|
|
||||||
|
|
||||||
|
</nb-select>
|
||||||
|
<!-- <label for="subject" style=" font-weight: 600;">Mixed Gas {{i+1}}:</label> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-2">
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<label for="subject" *ngIf="fieldTitle == 'View Order'" style=" font-weight: 600;">{{ fieldGroup.qty }}</label>
|
||||||
|
<input nbInput style="width: 50%;" *ngIf="fieldTitle != 'View Order'" [(ngModel)]="fieldGroup.qty" type="number">
|
||||||
|
<!-- <input nbInput type="number" min="0" [(ngModel)]="item.qty"> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-4">
|
||||||
|
<div >
|
||||||
|
<!-- <input nbInput type="text" [(ngModel)]="item.productSpec"> -->
|
||||||
|
<label for="subject" *ngIf="fieldTitle == 'View Order'" style=" font-weight: 600;">({{ fieldGroup.productSpec }})</label>
|
||||||
|
<input nbInput *ngIf="fieldTitle != 'View Order' && fieldGroup.id == 6" style=" width: 100%;" [(ngModel)]="fieldGroup.productSpec" placeholder="eg:- N2:CO2:O2 - 50:30:20" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-6 col-md-3">
|
||||||
|
<div >
|
||||||
|
<nb-actions size="medium" *ngIf="fieldTitle != 'View Order'">
|
||||||
|
<nb-action icon="plus-circle-outline" class="custom-action-icon" [nbTooltip]="'Add'" (click)="addInputFieldGroup()"></nb-action>
|
||||||
|
|
||||||
|
<nb-action icon="minus-circle-outline" *ngIf="i !=0" [nbTooltip]="'Remove'" (click)="removeInputFieldGroup(i)"></nb-action>
|
||||||
|
</nb-actions>
|
||||||
|
<!-- <button nbButton status="success" (click)="addInputFieldGroup()" style="margin-right: 1rem;"> Add </button> -->
|
||||||
|
<!-- <button nbButton status="danger" (click)="removeInputFieldGroup(i)">Remove</button> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngFor="let item of ResultDisplay; index as j">
|
||||||
|
|
||||||
|
<div class="row show-grid" *ngIf="fieldTitle == 'View Order'">
|
||||||
|
<div class="col-6 col-md-3">
|
||||||
|
<div >
|
||||||
|
<label for="subject" *ngIf="item.qty != 0 " style=" font-weight: 600;">{{ item.ProductDetails[0].productName }} <br />({{item.ProductDetails[0].skuId}} ) <br />
|
||||||
|
<span *ngIf="item.productSpec != null " >{{ item.productSpec }}</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-2">
|
||||||
|
<div >
|
||||||
|
<label for="subject" *ngIf="item.qty != 0 " style=" font-weight: 600;">{{ item.qty }}</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-4">
|
||||||
|
<div >
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <ngx-mixed-form (childButtonEvent)="receivedMessageHandler($event)"
|
||||||
|
(onInitEvent)="receiveAutoMsgHandler($event)" *ngIf="item.productName == 'Mixed Gas'"></ngx-mixed-form> -->
|
||||||
|
</div>
|
||||||
<nb-card-header>
|
<nb-card-header>
|
||||||
|
|
||||||
|
<hr>
|
||||||
<div class="row show-grid">
|
<div class="row show-grid" *ngIf="productlistReturn.length>0">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div style="font-size: larger;"> Product Information</div>
|
<div style="font-size: larger; color: #182ea1;"> Return Information</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<!-- <div style=" text-align: end;">
|
<!-- <div style=" text-align: end;">
|
||||||
@ -131,266 +252,145 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nb-card-header>
|
</nb-card-header>
|
||||||
<div class="row show-grid" *ngIf="product.length>0" >
|
|
||||||
<div class="col-6 col-md-3">
|
|
||||||
<div>
|
|
||||||
<label for="subject" style=" font-weight: 600;">Products: ( <span style="color:#ba0404">{{selectCustomerData['CusDetails.cusType'] ||setData['OrderDetails.CusDetails.cusType'] }}</span>)</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-2">
|
|
||||||
<div>
|
|
||||||
<label for="subject" style=" font-weight: 600;width: 30%;">Qty:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-4">
|
|
||||||
<div>
|
|
||||||
<label for="subject" style=" font-weight: 600;"> </label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div *ngFor="let fieldGroup of inputFieldGroups; let i = index">
|
<div >
|
||||||
<div *ngIf="fieldTitle != 'View Order'">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row show-grid" *ngIf="product.length>0" >
|
|
||||||
<div class="col-6 col-md-3">
|
|
||||||
<div >
|
|
||||||
<nb-select placeholder="Select Product" [(ngModel)]="fieldGroup.id" style="width: 100% !important;margin-right: 1rem;" >
|
|
||||||
<!-- <nb-option value="">Select Drivers</nb-option> -->
|
|
||||||
|
|
||||||
<nb-option *ngFor="let user of product; index as i; first as isFirst " [value]="user.id
|
|
||||||
">{{user.productName }}({{user.skuId }} )</nb-option>
|
|
||||||
|
|
||||||
|
|
||||||
</nb-select>
|
|
||||||
<!-- <label for="subject" style=" font-weight: 600;">Mixed Gas {{i+1}}:</label> -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-2">
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<label for="subject" *ngIf="fieldTitle == 'View Order'" style=" font-weight: 600;">{{ fieldGroup.qty }}</label>
|
|
||||||
<input nbInput style="width: 50%;" *ngIf="fieldTitle != 'View Order'" [(ngModel)]="fieldGroup.qty" type="number">
|
|
||||||
<!-- <input nbInput type="number" min="0" [(ngModel)]="item.qty"> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-4">
|
|
||||||
<div >
|
|
||||||
<!-- <input nbInput type="text" [(ngModel)]="item.productSpec"> -->
|
|
||||||
<label for="subject" *ngIf="fieldTitle == 'View Order'" style=" font-weight: 600;">({{ fieldGroup.productSpec }})</label>
|
|
||||||
<input nbInput *ngIf="fieldTitle != 'View Order' && fieldGroup.id == 6" style=" width: 100%;" [(ngModel)]="fieldGroup.productSpec" placeholder="eg:- N2:CO2:O2 - 50:30:20" type="text">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-6 col-md-3">
|
|
||||||
<div >
|
|
||||||
<nb-actions size="medium" *ngIf="fieldTitle != 'View Order'">
|
|
||||||
<nb-action icon="plus-circle-outline" class="custom-action-icon" [nbTooltip]="'Add'" (click)="addInputFieldGroup()"></nb-action>
|
|
||||||
|
|
||||||
<nb-action icon="minus-circle-outline" *ngIf="i !=0" [nbTooltip]="'Remove'" (click)="removeInputFieldGroup(i)"></nb-action>
|
|
||||||
</nb-actions>
|
|
||||||
<!-- <button nbButton status="success" (click)="addInputFieldGroup()" style="margin-right: 1rem;"> Add </button> -->
|
|
||||||
<!-- <button nbButton status="danger" (click)="removeInputFieldGroup(i)">Remove</button> -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngFor="let item of ResultDisplay; index as j">
|
|
||||||
|
|
||||||
<div class="row show-grid" *ngIf="fieldTitle == 'View Order'">
|
|
||||||
<div class="col-6 col-md-3">
|
|
||||||
<div >
|
|
||||||
<label for="subject" *ngIf="item.qty != 0 " style=" font-weight: 600;">{{ item.ProductDetails[0].productName }} <br />({{item.ProductDetails[0].skuId}} ) <br />
|
|
||||||
<span *ngIf="item.productSpec != null " >{{ item.productSpec }}</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-2">
|
|
||||||
<div >
|
|
||||||
<label for="subject" *ngIf="item.qty != 0 " style=" font-weight: 600;">{{ item.qty }}</label>
|
|
||||||
|
|
||||||
</div>
|
<div class="row show-grid" *ngIf="productlistReturn.length>0">
|
||||||
</div>
|
<div class="col-6 col-md-3">
|
||||||
<div class="col-6 col-md-4">
|
<div >
|
||||||
<div >
|
|
||||||
|
|
||||||
</div>
|
<label for="subject" style=" font-weight: 600;"><span>Product Name</span></label>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <ngx-mixed-form (childButtonEvent)="receivedMessageHandler($event)"
|
</div>
|
||||||
(onInitEvent)="receiveAutoMsgHandler($event)" *ngIf="item.productName == 'Mixed Gas'"></ngx-mixed-form> -->
|
</div>
|
||||||
</div>
|
<div class="col-6 col-md-2">
|
||||||
<nb-card-header>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<div class="row show-grid" *ngIf="productlistReturn.length>0">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div style="font-size: larger; color: #182ea1;"> Return Information</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<!-- <div style=" text-align: end;">
|
|
||||||
<button (click)="back()" nbButton status="success" hero>
|
|
||||||
Back
|
|
||||||
</button>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nb-card-header>
|
|
||||||
|
|
||||||
|
|
||||||
<div >
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
<label for="subject" style=" font-weight: 600;"><span>Qty</span></label> <br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <input nbInput type="number" min="0" [(ngModel)]="item.qty"> -->
|
||||||
|
</div>
|
||||||
<div class="row show-grid" *ngIf="productlistReturn.length>0">
|
</div>
|
||||||
<div class="col-6 col-md-3">
|
<div class="col-6 col-md-4">
|
||||||
<div >
|
<div >
|
||||||
|
<!-- <input nbInput type="text" [(ngModel)]="item.productSpec"> -->
|
||||||
<label for="subject" style=" font-weight: 600;"><span>Product Name</span></label>
|
<label for="subject" style=" font-weight: 600;"><h6></h6></label>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-2">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<label for="subject" style=" font-weight: 600;"><span>Qty</span></label> <br>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <input nbInput type="number" min="0" [(ngModel)]="item.qty"> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-4">
|
|
||||||
<div >
|
|
||||||
<!-- <input nbInput type="text" [(ngModel)]="item.productSpec"> -->
|
|
||||||
<label for="subject" style=" font-weight: 600;"><h6></h6></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-6 col-md-3">
|
|
||||||
<div >
|
|
||||||
<label for="subject" style=" font-weight: 600;"><h6></h6></label>
|
|
||||||
<!-- <nb-actions size="medium" >
|
|
||||||
<nb-action icon="plus-circle-outline" class="custom-action-icon" [nbTooltip]="'Add'" ></nb-action>
|
|
||||||
|
|
||||||
<nb-action icon="minus-circle-outline" [nbTooltip]="'Remove'" ></nb-action>
|
|
||||||
</nb-actions> -->
|
|
||||||
<!-- <button nbButton status="success" (click)="addInputFieldGroup()" style="margin-right: 1rem;"> Add </button> -->
|
|
||||||
<!-- <button nbButton status="danger" (click)="removeInputFieldGroup(i)">Remove</button> -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="col-6 col-md-3">
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div *ngFor="let dataVal of productlistReturn; let i = index" >
|
|
||||||
<div *ngIf="productlistReturn.length>0">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row show-grid">
|
|
||||||
<div class="col-6 col-md-3">
|
|
||||||
<div >
|
|
||||||
<label for="subject" style=" font-weight: 600;">#</label>
|
|
||||||
<label for="subject" style=" font-weight: 600;margin-left: 1rem;">{{dataVal.ProductDetails[0]. productName}}</label>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-2">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<label for="subject" style=" font-weight: 600;">{{dataVal.qty}}</label> <br>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <input nbInput type="number" min="0" [(ngModel)]="item.qty"> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-4">
|
|
||||||
<div >
|
<div >
|
||||||
<!-- <input nbInput type="text" [(ngModel)]="item.productSpec"> -->
|
<label for="subject" style=" font-weight: 600;"><h6></h6></label>
|
||||||
<label for="subject" style=" font-weight: 600;">Cylinder No: {{dataVal.cylinderNo}}</label>
|
<!-- <nb-actions size="medium" >
|
||||||
</div>
|
<nb-action icon="plus-circle-outline" class="custom-action-icon" [nbTooltip]="'Add'" ></nb-action>
|
||||||
|
|
||||||
|
<nb-action icon="minus-circle-outline" [nbTooltip]="'Remove'" ></nb-action>
|
||||||
|
</nb-actions> -->
|
||||||
|
<!-- <button nbButton status="success" (click)="addInputFieldGroup()" style="margin-right: 1rem;"> Add </button> -->
|
||||||
|
<!-- <button nbButton status="danger" (click)="removeInputFieldGroup(i)">Remove</button> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-6 col-md-3">
|
</div>
|
||||||
<div >
|
|
||||||
|
|
||||||
<!-- <nb-icon icon="eye-outline" style="color: green;" ></nb-icon> -->
|
<hr>
|
||||||
<!-- <nb-actions size="medium" >
|
</div>
|
||||||
<nb-action icon="plus-circle-outline" class="custom-action-icon" [nbTooltip]="'Add'" ></nb-action>
|
|
||||||
|
|
||||||
<nb-action icon="minus-circle-outline" [nbTooltip]="'Remove'" ></nb-action>
|
</div>
|
||||||
</nb-actions> -->
|
</div>
|
||||||
<!-- <button nbButton status="success" (click)="addInputFieldGroup()" style="margin-right: 1rem;"> Add </button> -->
|
|
||||||
<!-- <button nbButton status="danger" (click)="removeInputFieldGroup(i)">Remove</button> -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
<div *ngFor="let dataVal of productlistReturn; let i = index" >
|
||||||
|
<div *ngIf="productlistReturn.length>0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row show-grid">
|
||||||
|
<div class="col-6 col-md-3">
|
||||||
|
<div >
|
||||||
|
<label for="subject" style=" font-weight: 600;">#</label>
|
||||||
|
<label for="subject" style=" font-weight: 600;margin-left: 1rem;">{{dataVal.ProductDetails[0]. productName}}</label>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-2">
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<label for="subject" style=" font-weight: 600;">{{dataVal.qty}}</label> <br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <input nbInput type="number" min="0" [(ngModel)]="item.qty"> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-4">
|
||||||
|
<div >
|
||||||
|
<!-- <input nbInput type="text" [(ngModel)]="item.productSpec"> -->
|
||||||
|
<label for="subject" style=" font-weight: 600;">Cylinder No: {{dataVal.cylinderNo}}</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="col-6 col-md-3">
|
||||||
|
<div >
|
||||||
|
|
||||||
|
<!-- <nb-icon icon="eye-outline" style="color: green;" ></nb-icon> -->
|
||||||
|
<!-- <nb-actions size="medium" >
|
||||||
|
<nb-action icon="plus-circle-outline" class="custom-action-icon" [nbTooltip]="'Add'" ></nb-action>
|
||||||
|
|
||||||
|
<nb-action icon="minus-circle-outline" [nbTooltip]="'Remove'" ></nb-action>
|
||||||
|
</nb-actions> -->
|
||||||
|
<!-- <button nbButton status="success" (click)="addInputFieldGroup()" style="margin-right: 1rem;"> Add </button> -->
|
||||||
|
<!-- <button nbButton status="danger" (click)="removeInputFieldGroup(i)">Remove</button> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<nb-card-footer>
|
|
||||||
<div class="row show-grid" *ngIf="product.length>0">
|
|
||||||
<div class="col-6 col-md-3">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
</div>
|
<nb-card-footer>
|
||||||
</div>
|
<div class="row show-grid" *ngIf="product.length>0">
|
||||||
<div class="col-6 col-md-2">
|
<div class="col-6 col-md-3">
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-4">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-md-3">
|
|
||||||
<div *ngIf="fieldTitle != 'View Order'">
|
|
||||||
<button nbButton status="success" (click)="saveNew()" style="margin-right: 10px;" type="submit" >Submit</button>
|
|
||||||
<button type="button" class="cancel" nbButton status="danger" (click)="cancelData()">Cancel</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-2">
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-4">
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-md-3">
|
||||||
|
<div *ngIf="fieldTitle != 'View Order'">
|
||||||
|
<button nbButton status="success" (click)="saveNew()" style="margin-right: 10px;" type="submit" >Submit</button>
|
||||||
|
<button type="button" class="cancel" nbButton status="danger" (click)="cancelData()">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</nb-card-footer>
|
</nb-card-footer>
|
||||||
</nb-card-body>
|
</nb-card-body>
|
||||||
</nb-card>
|
</nb-card>
|
||||||
|
|||||||
@ -56,6 +56,7 @@ fieldTitle:any =' New Order'
|
|||||||
inputFieldGroups:any = [{id:'', qty: '1', productSpec: '' }];
|
inputFieldGroups:any = [{id:'', qty: '1', productSpec: '' }];
|
||||||
selectCustomerData :any =[];selectStatus:any =[];CancelReason:any =[];selectDriver:any =[];drivers:any =[];
|
selectCustomerData :any =[];selectStatus:any =[];CancelReason:any =[];selectDriver:any =[];drivers:any =[];
|
||||||
invoice = new Invoice();
|
invoice = new Invoice();
|
||||||
|
hiddenBtn= false;
|
||||||
constructor(private dialogService: NbDialogService,private route :ActivatedRoute,private router: Router,public _api:PageapiService,private toastrService: NbToastrService,private service: SmartTableData ,private windowService: NbWindowService) {
|
constructor(private dialogService: NbDialogService,private route :ActivatedRoute,private router: Router,public _api:PageapiService,private toastrService: NbToastrService,private service: SmartTableData ,private windowService: NbWindowService) {
|
||||||
|
|
||||||
this._api.orderDetails_observable$.subscribe((res) => {
|
this._api.orderDetails_observable$.subscribe((res) => {
|
||||||
@ -133,7 +134,7 @@ fieldTitle:any =' New Order'
|
|||||||
|
|
||||||
let passData = res.data
|
let passData = res.data
|
||||||
|
|
||||||
let customer = passData.filter(arr=>{return arr.role == 'CUSTOMER'})
|
let customer = passData.filter(arr=>{return arr.role == 'CUSTOMER' && arr.isActive == 1})
|
||||||
customer.forEach((element:any, index) => {
|
customer.forEach((element:any, index) => {
|
||||||
element.index = index +1
|
element.index = index +1
|
||||||
|
|
||||||
@ -736,6 +737,29 @@ getDriverlistApi(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onSelectChange(newValue: string) {
|
||||||
|
// Handle the selected value change here
|
||||||
|
this.selectDriver = []
|
||||||
|
console.log(newValue);
|
||||||
|
if(newValue == 'Out For Delivery'){
|
||||||
|
this.hiddenBtn = true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.hiddenBtn = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onSelectChange1(newValue: string) {
|
||||||
|
// Handle the selected value change here
|
||||||
|
console.log(newValue);
|
||||||
|
if(!newValue){
|
||||||
|
this.hiddenBtn = true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.hiddenBtn = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
onSubmit2(){
|
onSubmit2(){
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -312,7 +312,7 @@
|
|||||||
<nb-select selected="" placeholder="Select Drivers" *ngIf="selectStatus == 'Out For Delivery'" [(ngModel)]="selectDriver" style="width: 100% !important;margin-right: 1rem;" >
|
<nb-select selected="" placeholder="Select Drivers" *ngIf="selectStatus == 'Out For Delivery'" [(ngModel)]="selectDriver" style="width: 100% !important;margin-right: 1rem;" >
|
||||||
<!-- <nb-option value="">Select Drivers</nb-option> -->
|
<!-- <nb-option value="">Select Drivers</nb-option> -->
|
||||||
|
|
||||||
<nb-option *ngFor="let user of drivers; index as i; first as isFirst " [value]="user.id
|
<nb-option *ngFor="let user of drivers; index as i; first as isFirst " [value]="user.id
|
||||||
">{{user.userName }}</nb-option>
|
">{{user.userName }}</nb-option>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -195,6 +195,12 @@ export class OrderComponent {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
notify(id,ordId,cusName){
|
||||||
|
let obj = { "id" : id , "ordId" : ordId , 'cusName' : cusName }
|
||||||
|
this._api.Notification(obj).subscribe(res => { console.log( "success");
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
onDeleteConfirm(event): void {
|
onDeleteConfirm(event): void {
|
||||||
console.log(event)
|
console.log(event)
|
||||||
@ -485,6 +491,8 @@ onSubmit(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onSubmit2(){
|
onSubmit2(){
|
||||||
if(this.selectedRows.length>0){
|
if(this.selectedRows.length>0){
|
||||||
|
|
||||||
@ -515,6 +523,11 @@ onSubmit2(){
|
|||||||
|
|
||||||
this._api.CreateOrder (param).subscribe(res => {
|
this._api.CreateOrder (param).subscribe(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
|
if(this.selectStatus == "Out For Delivery"){
|
||||||
|
this.selectedRows.forEach(async(element) => {
|
||||||
|
this.notify(this.selectDriver , element.orderId , element.customer )
|
||||||
|
});
|
||||||
|
}
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.showToast('success', 'Updated Successfully', '');
|
this.showToast('success', 'Updated Successfully', '');
|
||||||
this.getorderlistApi();
|
this.getorderlistApi();
|
||||||
@ -661,7 +674,6 @@ refresh(){
|
|||||||
|
|
||||||
manipulateDate(data){
|
manipulateDate(data){
|
||||||
console.log(data)
|
console.log(data)
|
||||||
|
|
||||||
let start = data.start
|
let start = data.start
|
||||||
let end = data.end
|
let end = data.end
|
||||||
|
|
||||||
|
|||||||
@ -112,14 +112,29 @@ public mixDetails_observable$ = this.mixDetails.asObservable();
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delOrder(addParams): Observable<any> {
|
||||||
|
return this._http.post(this.apiUrl + 'delOrderCatogary', addParams)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
getProductList(addParams): Observable<any> {
|
getProductList(addParams): Observable<any> {
|
||||||
return this._http.post(this.apiUrl + 'getProductList', addParams)
|
return this._http.post(this.apiUrl + 'getProductList', addParams)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getProductDropdownList(addParams): Observable<any> {
|
||||||
|
return this._http.post(this.apiUrl + 'getProductDropdownList', addParams)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
CreateReturn(addParams:any): Observable<any> {
|
CreateReturn(addParams:any): Observable<any> {
|
||||||
return this._http.post(this.apiUrl + 'CreateReturn', addParams)
|
return this._http.post(this.apiUrl + 'CreateReturn', addParams)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Notification(addParams:any): Observable<any> {
|
||||||
|
return this._http.post(this.apiUrl + 'sendNotification', addParams)
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<label for="subject">E-mail:</label>
|
<label for="subject">E-mail:</label>
|
||||||
<input formControlName="email" nbInput id="email" type="text" [status]="userForm.get('email').invalid && userForm.get('email').touched? 'danger' : 'basic'">
|
<input formControlName="email" nbInput id="email" type="email" [status]="userForm.get('email').invalid && userForm.get('email').touched? 'danger' : 'basic'">
|
||||||
<ng-container nbInputErrorMessage>
|
<ng-container nbInputErrorMessage>
|
||||||
<div style="color:#7c0e0e" *ngIf="userForm.get('email').hasError('required') && userForm.get('email').touched">Email is required.</div>
|
<div style="color:#7c0e0e" *ngIf="userForm.get('email').hasError('required') && userForm.get('email').touched">Email is required.</div>
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export class UserFormComponent implements OnInit {
|
|||||||
mobileNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
|
mobileNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]),
|
||||||
// lastName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
// lastName: new FormControl('', [Validators.required, Validators.maxLength(20)]),
|
||||||
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
|
email: new FormControl('', [Validators.required, Validators.email,Validators.pattern(
|
||||||
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$',
|
/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$/
|
||||||
)]),
|
)]),
|
||||||
// password: new FormControl('', [Validators.required, Validators.minLength(6)]),
|
// password: new FormControl('', [Validators.required, Validators.minLength(6)]),
|
||||||
password: new FormControl('', [Validators.required,Validators.pattern(
|
password: new FormControl('', [Validators.required,Validators.pattern(
|
||||||
|
|||||||
@ -81,6 +81,7 @@ export class UsersComponent {
|
|||||||
destroyByClick = true;
|
destroyByClick = true;
|
||||||
duration = 2000;
|
duration = 2000;
|
||||||
hasIcon = true;
|
hasIcon = true;
|
||||||
|
logUser = JSON.parse(localStorage.getItem('email')).email;
|
||||||
admin:any =[];
|
admin:any =[];
|
||||||
position: NbGlobalPosition = NbGlobalPhysicalPosition.TOP_RIGHT;
|
position: NbGlobalPosition = NbGlobalPhysicalPosition.TOP_RIGHT;
|
||||||
preventDuplicates = false;
|
preventDuplicates = false;
|
||||||
@ -195,7 +196,7 @@ export class UsersComponent {
|
|||||||
if(res.status == 200){
|
if(res.status == 200){
|
||||||
|
|
||||||
let passData = res.data
|
let passData = res.data
|
||||||
let admin = passData.filter(arr=>{return arr.role == 'ADMIN' || arr.role == 'FRONT-OFFICE'})
|
let admin = passData.filter(arr=>{return ( arr.role == 'ADMIN' || arr.role == 'FRONT-OFFICE' ) && arr.email != this.logUser })
|
||||||
|
|
||||||
admin.forEach((element:any, index) => {
|
admin.forEach((element:any, index) => {
|
||||||
element.index = index +1
|
element.index = index +1
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
apiEndpoint:'https://dev.venbait.in/vnms/api/',
|
apiEndpoint:'https://dev.venbait.in/vnms/api/',
|
||||||
|
// apiEndpoint:'http://localhost:8081/api/',
|
||||||
mailUrl:'',
|
mailUrl:'',
|
||||||
production: false,
|
production: false,
|
||||||
};
|
};
|
||||||
|
|||||||
BIN
vnms_admin_fe.zip
Normal file
BIN
vnms_admin_fe.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user