Compare commits
11 Commits
f04f5f5215
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
769af04587 | ||
|
|
7bc186cbe2 | ||
|
|
b8cda807ef | ||
|
|
8bf7331837 | ||
|
|
1a26b75cb0 | ||
|
|
de46ca882d | ||
|
|
e464c54c97 | ||
|
|
6292312e1d | ||
|
|
f300dc07d1 | ||
|
|
1cb849a299 | ||
|
|
f1f76a8a9a |
@@ -7,4 +7,4 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: portal
|
||||
image: 172.35.0.216:3000/simplifique/vendaweb-portal:161ed4d
|
||||
image: 172.35.0.216:3000/simplifique/vendaweb-portal:b8cda80
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="container d-flex justify-content-between align-items-center py-3">
|
||||
<!-- Logo à esquerda -->
|
||||
<div class="logo-jurunense">
|
||||
<a href="/#/menu" title="Simplifique">
|
||||
<a href="/#/sales/menu" title="Simplifique">
|
||||
<img src="assets/img/logo_simplifique.png" alt="Imagem" class="img-fluid" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="container d-flex justify-content-between align-items-center py-3">
|
||||
<!-- Logo -->
|
||||
<div class="logo-jurunense">
|
||||
<a href="/#/menu" title="Simplifique">
|
||||
<a href="/#/sales/menu" title="Simplifique">
|
||||
<img src="assets/img/logo_simplifique.png" alt="Logo Simplifique" class="img-fluid" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -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;
|
||||
@@ -632,7 +633,7 @@ export class CartSalesComponent
|
||||
|
||||
if (billing !== null) {
|
||||
const savePayment = localStorage.getItem('paymentPlan');
|
||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob);
|
||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob, customer !== null ? customer.customerId : 1);
|
||||
this.subscritpionPaymentPlan = this.paymentPlan$.subscribe((data) => {
|
||||
this.paymentPlans = data;
|
||||
if (
|
||||
@@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -798,13 +802,16 @@ export class CartSalesComponent
|
||||
|
||||
setBilling(billing: any) {
|
||||
localStorage.setItem('billing', JSON.stringify(billing));
|
||||
const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
|
||||
this.idBilling = billing.codcob;
|
||||
console.log(JSON.stringify(billing));
|
||||
localStorage.removeItem('paymentPlan');
|
||||
this.formPayment.patchValue({
|
||||
paymentPlan: null,
|
||||
});
|
||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob);
|
||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob,
|
||||
customer !== null ? customer.customerId : 1
|
||||
);
|
||||
this.subscritpionPaymentPlan = this.paymentPlan$
|
||||
.pipe(
|
||||
tap((data) => (this.paymentPlans = data)),
|
||||
@@ -2386,7 +2393,7 @@ export class CartSalesComponent
|
||||
openPrintPreOrder() {
|
||||
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
|
||||
this.urlPrintPreOrder =
|
||||
'http://172.35.0.219:8068/Viewer/{action}?order=' +
|
||||
'https://portainer.simplifiquehc.com.br/Viewer/{action}?order=' +
|
||||
this.preOrderNumber +
|
||||
'&model=' +
|
||||
this.modelPrintPreOrder;
|
||||
@@ -2400,7 +2407,7 @@ export class CartSalesComponent
|
||||
openPrintOrder() {
|
||||
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
|
||||
this.urlPrintOrder =
|
||||
'http://172.35.0.219:8068/Viewer/{action}?orderId=' +
|
||||
'https://portainer.simplifiquehc.com.br/Viewer/{action}?orderId=' +
|
||||
this.orderNumber +
|
||||
'&model=' +
|
||||
this.modelPrintOrder;
|
||||
|
||||
@@ -60,8 +60,8 @@ export class LookupService {
|
||||
}
|
||||
}
|
||||
|
||||
getPaymentPlan(billingId: string = '9999'): Observable<PaymentPlan[]> {
|
||||
const url = environment.url + `lists/paymentplan/${billingId}`;
|
||||
getPaymentPlan(billingId: string = '9999', customerId: number = 1): Observable<PaymentPlan[]> {
|
||||
const url = environment.url + `lists/paymentplan/${billingId}/${customerId}`;
|
||||
try {
|
||||
const response = this.http.get<PaymentPlan[]>(url);
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user