Compare commits
2 Commits
1a26b75cb0
...
b8cda807ef
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8cda807ef | ||
|
|
8bf7331837 |
@@ -849,10 +849,19 @@
|
||||
<div class="col-12 col-sm-6 p-0 mt-3 mt-sm-0">
|
||||
<div class="row w-100 m-0 p-0 d-flex justify-content-between">
|
||||
<div class="col-6 p-1">
|
||||
<button kendoButton class="btn-pre-order w-100" [disabled]="isLoadingPreOrder"
|
||||
<!-- <button kendoButton class="btn-pre-order w-100" [disabled]="isLoadingPreOrder"
|
||||
[icon]="loadingIconPreOrder" (click)="showConfirmation()">
|
||||
<span *ngIf="!isLoadingPreOrder" class="text-btn-order">Fechar orçamento</span>
|
||||
</button> -->
|
||||
|
||||
<button *ngIf="!isLoadingPreOrder" kendoButton class="btn-order w-100"
|
||||
(click)="showConfirmation()" [disabled]="isLoadingPreOrder" [icon]="loadingIconOrder">
|
||||
<span class="text-btn-order">Fechar orçamento</span>
|
||||
</button>
|
||||
<kendo-loader *ngIf="isLoadingPreOrder" size="small"></kendo-loader>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 p-1">
|
||||
<button *ngIf="!isLoadingOrder" kendoButton class="btn-order w-100"
|
||||
|
||||
@@ -65,6 +65,7 @@ import { OrderDiscount } from '../store/models/order-discount.model';
|
||||
import { SaleState } from '../store/models/sale-state.model';
|
||||
import { ShoppingItem } from '../store/models/shopping-item';
|
||||
import { Shopping } from '../store/models/shopping.model';
|
||||
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
|
||||
|
||||
export interface JsonModel {
|
||||
shippingDate: string;
|
||||
@@ -700,6 +701,7 @@ export class CartSalesComponent
|
||||
}
|
||||
|
||||
async showConfirmation() {
|
||||
this.isLoadingPreOrder = true;
|
||||
const dialog: DialogRef = this.dialogService.open({
|
||||
title: 'Por favor, confirme',
|
||||
content: 'Deseja gravar como orçamento ?',
|
||||
@@ -715,6 +717,7 @@ export class CartSalesComponent
|
||||
dialog.result.subscribe((result) => {
|
||||
if (result instanceof DialogCloseResult) {
|
||||
console.log('close');
|
||||
this.isLoadingPreOrder = false;
|
||||
} else {
|
||||
const resultConfirmation = JSON.stringify(result);
|
||||
console.log('action1', resultConfirmation);
|
||||
@@ -722,6 +725,7 @@ export class CartSalesComponent
|
||||
console.log('criando orçamento');
|
||||
this.createPreOrder();
|
||||
}
|
||||
this.isLoadingPreOrder = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user