Compare commits

..

13 Commits

Author SHA1 Message Date
joelson
769af04587 fix: update cart sales print viewer urls 2026-02-23 09:14:26 -03:00
Gitea Action
7bc186cbe2 chore: update image tag to b8cda80 [skip ci] 2026-02-20 13:11:29 +00:00
Luis Eduardo Estevao
b8cda807ef Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 5m59s
2026-02-20 10:04:51 -03:00
Luis Eduardo Estevao
8bf7331837 feat: implement new shopping cart sales component with responsive Kendo UI grid for item display and management. 2026-02-20 10:04:44 -03:00
Gitea Action
1a26b75cb0 chore: update image tag to de46ca8 [skip ci] 2026-02-19 13:18:38 +00:00
Luis Eduardo Estevao
de46ca882d Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 5m56s
2026-02-19 10:12:40 -03:00
Luis Eduardo Estevao
e464c54c97 feat: add initial header components for sales and admin views, including user info, logout, and a shopping cart for sales. 2026-02-19 10:12:34 -03:00
Gitea Action
6292312e1d chore: update image tag to f300dc0 [skip ci] 2026-02-19 13:09:12 +00:00
Luis Eduardo Estevao
f300dc07d1 Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 6m48s
2026-02-19 10:02:20 -03:00
Luis Eduardo Estevao
1cb849a299 feat: add cart sales component and lookup service for managing sales orders. Add parameter customerId find payment plans. 2026-02-19 10:02:15 -03:00
Gitea Action
f1f76a8a9a chore: update image tag to f04f5f5 [skip ci] 2026-02-18 16:38:13 +00:00
Luis Eduardo Estevao
f04f5f5215 Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 5m33s
2026-02-18 13:32:19 -03:00
Luis Eduardo Estevao
210a26cb82 feat: Implement partner management UI, customer creation modal, and orders page logic. 2026-02-18 13:32:14 -03:00
9 changed files with 86 additions and 255 deletions

View File

@@ -7,4 +7,4 @@ spec:
spec: spec:
containers: containers:
- name: portal - name: portal
image: 172.35.0.216:3000/simplifique/vendaweb-portal:161ed4d image: 172.35.0.216:3000/simplifique/vendaweb-portal:b8cda80

View File

@@ -2,7 +2,7 @@
<div class="container d-flex justify-content-between align-items-center py-3"> <div class="container d-flex justify-content-between align-items-center py-3">
<!-- Logo à esquerda --> <!-- Logo à esquerda -->
<div class="logo-jurunense"> <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" /> <img src="assets/img/logo_simplifique.png" alt="Imagem" class="img-fluid" />
</a> </a>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div class="container d-flex justify-content-between align-items-center py-3"> <div class="container d-flex justify-content-between align-items-center py-3">
<!-- Logo --> <!-- Logo -->
<div class="logo-jurunense"> <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" /> <img src="assets/img/logo_simplifique.png" alt="Logo Simplifique" class="img-fluid" />
</a> </a>
</div> </div>

View File

@@ -4,17 +4,11 @@
<h4>FILTRO DE PARCEIROS</h4> <h4>FILTRO DE PARCEIROS</h4>
<label> <label>
<span>CPF</span> <span>CPF</span>
<kendo-textbox <kendo-textbox formControlName="cpf" placeholder="Informe o CPF do parceiro"></kendo-textbox>
formControlName="cpf"
placeholder="Informe o CPF do parceiro"
></kendo-textbox>
</label> </label>
<label class="mt-2"> <label class="mt-2">
<span>Nome</span> <span>Nome</span>
<kendo-textbox <kendo-textbox formControlName="name" placeholder="Informe o nome do parceiro"></kendo-textbox>
formControlName="name"
placeholder="Informe o nome do parceiro"
></kendo-textbox>
</label> </label>
<div class="row mt-2"> <div class="row mt-2">
@@ -23,72 +17,34 @@
</div> </div>
<div class="col-sm-12 col-md-4 col-lg-2"> <div class="col-sm-12 col-md-4 col-lg-2">
<label> <label>
<input <input type="radio" name="type" value="P" #other formControlName="type" kendoRadioButton />
type="radio"
name="type"
value="P"
#other
formControlName="type"
kendoRadioButton
/>
<span class="in-line">Parceiros</span> <span class="in-line">Parceiros</span>
</label> </label>
</div> </div>
<div class="col-sm-12 col-md-4 col-lg-2"> <div class="col-sm-12 col-md-4 col-lg-2">
<label> <label>
<input <input type="radio" name="type" value="B" #other formControlName="type" kendoRadioButton />
type="radio"
name="type"
value="B"
#other
formControlName="type"
kendoRadioButton
/>
<span class="in-line">Bella Obra</span> <span class="in-line">Bella Obra</span>
</label> </label>
</div> </div>
<div class="col-sm-12 col-md-4 col-lg-3"> <div class="col-sm-12 col-md-4 col-lg-3">
<label> <label>
<input <input type="radio" name="type" value="M" #other formControlName="type" kendoRadioButton />
type="radio" <span class="in-line">Mestre Simplifique</span>
name="type"
value="M"
#other
formControlName="type"
kendoRadioButton
/>
<span class="in-line">Mestre Jurunense</span>
</label> </label>
</div> </div>
<div class="col-sm-12 col-md-4 col-lg-2"> <div class="col-sm-12 col-md-4 col-lg-2">
<label> <label>
<input <input type="radio" name="type" value="T" #other formControlName="type" kendoRadioButton />
type="radio"
name="type"
value="T"
#other
formControlName="type"
kendoRadioButton
/>
<span class="in-line">Todos</span> <span class="in-line">Todos</span>
</label> </label>
</div> </div>
</div> </div>
<div class="mt-3 row-buttons"> <div class="mt-3 row-buttons">
<button <button kendoButton rounded="medium" themeColor="primary" (click)="getPartners()">
kendoButton
rounded="medium"
themeColor="primary"
(click)="getPartners()"
>
Pesquisar Pesquisar
</button> </button>
<button <button kendoButton rounded="medium" themeColor="waring" (click)="open()">
kendoButton
rounded="medium"
themeColor="waring"
(click)="open()"
>
Incluir Incluir
</button> </button>
</div> </div>
@@ -96,15 +52,8 @@
</div> </div>
<main class="flex-fill"> <main class="flex-fill">
<kendo-grid <kendo-grid [kendoGridBinding]="gridView" class="gridPartners" (edit)="editPartner($event)" [sortable]="true"
[kendoGridBinding]="gridView" [reorderable]="true" [resizable]="true" [columnMenu]="{ filter: true }">
class="gridPartners"
(edit)="editPartner($event)"
[sortable]="true"
[reorderable]="true"
[resizable]="true"
[columnMenu]="{ filter: true }"
>
<kendo-grid-column title="Código" field="id" width="80"> <kendo-grid-column title="Código" field="id" width="80">
</kendo-grid-column> </kendo-grid-column>
<kendo-grid-column title="Tipo Parceiro" field="type" width="150"> <kendo-grid-column title="Tipo Parceiro" field="type" width="150">
@@ -115,11 +64,7 @@
</kendo-grid-column> </kendo-grid-column>
<kendo-grid-column title="Nome" field="name" width="250"> <kendo-grid-column title="Nome" field="name" width="250">
</kendo-grid-column> </kendo-grid-column>
<kendo-grid-column <kendo-grid-column title="Telefone" field="phone" width="100"></kendo-grid-column>
title="Telefone"
field="phone"
width="100"
></kendo-grid-column>
<kendo-grid-column title="Data Cadastro" field="createDate" width="100"> <kendo-grid-column title="Data Cadastro" field="createDate" width="100">
<ng-template kendoGridCellTemplate let-dataItem> <ng-template kendoGridCellTemplate let-dataItem>
@@ -163,25 +108,13 @@
</main> </main>
</div> </div>
<kendo-window <kendo-window *ngIf="opened" autoFocusedElement="#cpf" title="CADASTRO DE PROFISSIONAL" (close)="close()"
*ngIf="opened" [minWidth]="250" [width]="650" [height]="650">
autoFocusedElement="#cpf"
title="CADASTRO DE PROFISSIONAL"
(close)="close()"
[minWidth]="250"
[width]="650"
[height]="650"
>
<form class="k-form" [formGroup]="formPartner"> <form class="k-form" [formGroup]="formPartner">
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>CPF</span> <span>CPF</span>
<kendo-textbox <kendo-textbox formControlName="cpf" [clearButton]="true" #cpf (blur)="searchPartner()"></kendo-textbox>
formControlName="cpf"
[clearButton]="true"
#cpf
(blur)="searchPartner()"
></kendo-textbox>
</label> </label>
<kendo-formerror>Error: CPF é obrigatório</kendo-formerror> <kendo-formerror>Error: CPF é obrigatório</kendo-formerror>
</kendo-formfield> </kendo-formfield>
@@ -189,12 +122,7 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Nome</span> <span>Nome</span>
<input <input class="inputText" formControlName="name" #fullName kendoTextBox />
class="inputText"
formControlName="name"
#fullName
kendoTextBox
/>
</label> </label>
<kendo-formerror>Error: Nome é obrigatório</kendo-formerror> <kendo-formerror>Error: Nome é obrigatório</kendo-formerror>
</kendo-formfield> </kendo-formfield>
@@ -204,78 +132,43 @@
<ul class="k-radio-list"> <ul class="k-radio-list">
<li class="k-radio-item"> <li class="k-radio-item">
<label> <label>
<input <input type="radio" #mestre value="B" kendoRadioButton formControlName="type"
type="radio" (change)="filterCategory('B')" />
#mestre
value="B"
kendoRadioButton
formControlName="type"
(change)="filterCategory('B')"
/>
<span> Bella Obra</span> <span> Bella Obra</span>
</label> </label>
</li> </li>
<li class="k-radio-item"> <li class="k-radio-item">
<label> <label>
<input <input type="radio" #mestre value="P" kendoRadioButton formControlName="type"
type="radio" (change)="filterCategory('P')" />
#mestre
value="P"
kendoRadioButton
formControlName="type"
(change)="filterCategory('P')"
/>
<span> Parceiro</span> <span> Parceiro</span>
</label> </label>
</li> </li>
<li class="k-radio-item"> <li class="k-radio-item">
<label> <label>
<input <input type="radio" #parceiro kendoRadioButton value="M" formControlName="type"
type="radio" (change)="filterCategory('M')" />
#parceiro
kendoRadioButton
value="M"
formControlName="type"
(change)="filterCategory('M')"
/>
<span> Mestre</span> <span> Mestre</span>
</label> </label>
</li> </li>
</ul> </ul>
<kendo-formerror *ngIf="formPartner.controls.type.errors?.required" <kendo-formerror *ngIf="formPartner.controls.type.errors?.required">Error: O tipo do parceiro é
>Error: O tipo do parceiro é obrigatório</kendo-formerror obrigatório</kendo-formerror>
>
</kendo-formfield> </kendo-formfield>
<kendo-formfield *ngIf="showCommission" showHints="initial"> <kendo-formfield *ngIf="showCommission" showHints="initial">
<label> <label>
<span class="d-block">Comissão (%)</span> <span class="d-block">Comissão (%)</span>
<input <input *ngIf="!inputPercentPartner()" [readOnly]="!inputPercentPartner()" disabled="!inputPercentPartner()"
*ngIf="!inputPercentPartner()" formControlName="commission" type="number" kendoNumericTextBox />
[readOnly]="!inputPercentPartner()" <input *ngIf="inputPercentPartner()" formControlName="commission" type="number" kendoNumericTextBox />
disabled="!inputPercentPartner()"
formControlName="commission"
type="number"
kendoNumericTextBox
/>
<input
*ngIf="inputPercentPartner()"
formControlName="commission"
type="number"
kendoNumericTextBox
/>
</label> </label>
</kendo-formfield> </kendo-formfield>
<kendo-formfield showHints="initial"> <kendo-formfield showHints="initial">
<label> <label>
<input <input kendoCheckBox id="terms" type="checkbox" formControlName="buyer" />
kendoCheckBox
id="terms"
type="checkbox"
formControlName="buyer"
/>
<span class="ms-2">Parceiro é comprador de cliente PJ?</span> <span class="ms-2">Parceiro é comprador de cliente PJ?</span>
</label> </label>
</kendo-formfield> </kendo-formfield>
@@ -283,17 +176,9 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Cliente</span> <span>Cliente</span>
<kendo-combobox <kendo-combobox textField="name" valueField="customerId" formControlName="customer" [data]="customer$ | async"
textField="name" [loading]="loadingCustomer" [filterable]="true" (filterChange)="handleFilterCustomer($event)"
valueField="customerId" placeholder="Selecione o cliente..." (selectionChange)="selectCustomer($event)">
formControlName="customer"
[data]="customer$ | async"
[loading]="loadingCustomer"
[filterable]="true"
(filterChange)="handleFilterCustomer($event)"
placeholder="Selecione o cliente..."
(selectionChange)="selectCustomer($event)"
>
</kendo-combobox> </kendo-combobox>
</label> </label>
</kendo-formfield> </kendo-formfield>
@@ -304,74 +189,46 @@
<input formControlName="email" class="inputEmail" kendoTextBox #email /> <input formControlName="email" class="inputEmail" kendoTextBox #email />
</label> </label>
<kendo-formerror *ngIf="formPartner.controls.type.errors?.required" <kendo-formerror *ngIf="formPartner.controls.type.errors?.required">Error: Email is required</kendo-formerror>
>Error: Email is required</kendo-formerror <kendo-formerror *ngIf="formPartner.controls.email.errors?.email">Error: Not valid email format</kendo-formerror>
>
<kendo-formerror *ngIf="formPartner.controls.email.errors?.email"
>Error: Not valid email format</kendo-formerror
>
</kendo-formfield> </kendo-formfield>
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>RG</span> <span>RG</span>
<kendo-textbox <kendo-textbox formControlName="rg" [clearButton]="true" #rg></kendo-textbox>
formControlName="rg"
[clearButton]="true"
#rg
></kendo-textbox>
</label> </label>
<kendo-formerror *ngIf="formPartner.controls.rg.errors?.rg" <kendo-formerror *ngIf="formPartner.controls.rg.errors?.rg">Error: RG é obrigaário</kendo-formerror>
>Error: RG é obrigaário</kendo-formerror
>
</kendo-formfield> </kendo-formfield>
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Registro Profissional</span> <span>Registro Profissional</span>
<kendo-textbox <kendo-textbox formControlName="professionalNumber" [clearButton]="true" #professionalnumber></kendo-textbox>
formControlName="professionalNumber"
[clearButton]="true"
#professionalnumber
></kendo-textbox>
</label> </label>
</kendo-formfield> </kendo-formfield>
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Telefone (Whatsapp)</span> <span>Telefone (Whatsapp)</span>
<kendo-textbox <kendo-textbox formControlName="phone" [clearButton]="true" #phone></kendo-textbox>
formControlName="phone"
[clearButton]="true"
#phone
></kendo-textbox>
</label> </label>
</kendo-formfield> </kendo-formfield>
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Chave PIX</span> <span>Chave PIX</span>
<kendo-textbox <kendo-textbox formControlName="pixKey" [clearButton]="true" #pixKey></kendo-textbox>
formControlName="pixKey"
[clearButton]="true"
#pixKey
></kendo-textbox>
</label> </label>
</kendo-formfield> </kendo-formfield>
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Vendedor</span> <span>Vendedor</span>
<kendo-combobox <kendo-combobox textField="name" valueField="sellerId" formControlName="seller" [data]="sellers$ | async"
textField="name" [kendoDropDownFilter]="{ operator: 'contains' }" placeholder="Selecione o vendedor que indicou o parceiro..."
valueField="sellerId" (selectionChange)="selectSeller($event)">
formControlName="seller"
[data]="sellers$ | async"
[kendoDropDownFilter]="{ operator: 'contains' }"
placeholder="Selecione o vendedor que indicou o parceiro..."
(selectionChange)="selectSeller($event)"
>
</kendo-combobox> </kendo-combobox>
</label> </label>
</kendo-formfield> </kendo-formfield>
@@ -379,16 +236,9 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Categoria</span> <span>Categoria</span>
<kendo-combobox <kendo-combobox textField="name" valueField="id" formControlName="category" [data]="filterCategoryPartners"
textField="name" [itemDisabled]="categoryDisabled" [kendoDropDownFilter]="{ operator: 'contains' }"
valueField="id" placeholder="Selecione a categoria do parceiro..." (selectionChange)="selectCategory($event)">
formControlName="category"
[data]="filterCategoryPartners"
[itemDisabled]="categoryDisabled"
[kendoDropDownFilter]="{ operator: 'contains' }"
placeholder="Selecione a categoria do parceiro..."
(selectionChange)="selectCategory($event)"
>
</kendo-combobox> </kendo-combobox>
</label> </label>
</kendo-formfield> </kendo-formfield>
@@ -398,12 +248,7 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Cep</span> <span>Cep</span>
<kendo-textbox <kendo-textbox formControlName="zipCode" [clearButton]="true" #zipCode (blur)="consultaCep()"></kendo-textbox>
formControlName="zipCode"
[clearButton]="true"
#zipCode
(blur)="consultaCep()"
></kendo-textbox>
</label> </label>
</kendo-formfield> </kendo-formfield>
@@ -417,11 +262,7 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Número</span> <span>Número</span>
<kendo-textbox <kendo-textbox formControlName="number" [clearButton]="true" #number></kendo-textbox>
formControlName="number"
[clearButton]="true"
#number
></kendo-textbox>
</label> </label>
</kendo-formfield> </kendo-formfield>
@@ -456,20 +297,12 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Praça</span> <span>Praça</span>
<kendo-combobox <kendo-combobox [data]="places$ | async" formControlName="place"
[data]="places$ | async" [kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
formControlName="place" (selectionChange)="selectPlace($event)" placeholder="Selecione a praça do parceiro...">
[kendoDropDownFilter]="{ operator: 'contains' }"
textField="name"
valueField="id"
(selectionChange)="selectPlace($event)"
placeholder="Selecione a praça do parceiro..."
>
</kendo-combobox> </kendo-combobox>
</label> </label>
<kendo-formerror <kendo-formerror>Erro: É obrigatório informar a praça do cliente</kendo-formerror>
>Erro: É obrigatório informar a praça do cliente</kendo-formerror
>
</kendo-formfield> </kendo-formfield>
<h4 class="my-3">DADOS BANCÁRIOS</h4> <h4 class="my-3">DADOS BANCÁRIOS</h4>
@@ -478,12 +311,7 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Banco</span> <span>Banco</span>
<kendo-textbox <kendo-textbox formControlName="bank" [clearButton]="true" #bank required></kendo-textbox>
formControlName="bank"
[clearButton]="true"
#bank
required
></kendo-textbox>
</label> </label>
</kendo-formfield> </kendo-formfield>
</div> </div>
@@ -491,12 +319,7 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Agencia</span> <span>Agencia</span>
<kendo-textbox <kendo-textbox formControlName="agencia" [clearButton]="true" #agencia required></kendo-textbox>
formControlName="agencia"
[clearButton]="true"
#agencia
required
></kendo-textbox>
</label> </label>
</kendo-formfield> </kendo-formfield>
</div> </div>
@@ -504,12 +327,7 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Conta</span> <span>Conta</span>
<kendo-textbox <kendo-textbox formControlName="conta" [clearButton]="true" #conta required></kendo-textbox>
formControlName="conta"
[clearButton]="true"
#conta
required
></kendo-textbox>
</label> </label>
</kendo-formfield> </kendo-formfield>
</div> </div>
@@ -524,12 +342,7 @@
<input formControlName="observer2" kendoTextBox #observer2 /> <input formControlName="observer2" kendoTextBox #observer2 />
</label> </label>
<div class="k-form-buttons"> <div class="k-form-buttons">
<button <button kendoButton themeColor="primary" (click)="submitForm()" [disabled]="!formPartner.valid">
kendoButton
themeColor="primary"
(click)="submitForm()"
[disabled]="!formPartner.valid"
>
Salvar Salvar
</button> </button>
<button kendoButton (click)="clearForm()">Cancelar</button> <button kendoButton (click)="clearForm()">Cancelar</button>

View File

@@ -849,10 +849,19 @@
<div class="col-12 col-sm-6 p-0 mt-3 mt-sm-0"> <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="row w-100 m-0 p-0 d-flex justify-content-between">
<div class="col-6 p-1"> <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()"> [icon]="loadingIconPreOrder" (click)="showConfirmation()">
<span *ngIf="!isLoadingPreOrder" class="text-btn-order">Fechar orçamento</span> <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> </button>
<kendo-loader *ngIf="isLoadingPreOrder" size="small"></kendo-loader>
</div> </div>
<div class="col-6 p-1"> <div class="col-6 p-1">
<button *ngIf="!isLoadingOrder" kendoButton class="btn-order w-100" <button *ngIf="!isLoadingOrder" kendoButton class="btn-order w-100"

View File

@@ -65,6 +65,7 @@ import { OrderDiscount } from '../store/models/order-discount.model';
import { SaleState } from '../store/models/sale-state.model'; import { SaleState } from '../store/models/sale-state.model';
import { ShoppingItem } from '../store/models/shopping-item'; import { ShoppingItem } from '../store/models/shopping-item';
import { Shopping } from '../store/models/shopping.model'; import { Shopping } from '../store/models/shopping.model';
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
export interface JsonModel { export interface JsonModel {
shippingDate: string; shippingDate: string;
@@ -632,7 +633,7 @@ export class CartSalesComponent
if (billing !== null) { if (billing !== null) {
const savePayment = localStorage.getItem('paymentPlan'); 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.subscritpionPaymentPlan = this.paymentPlan$.subscribe((data) => {
this.paymentPlans = data; this.paymentPlans = data;
if ( if (
@@ -700,6 +701,7 @@ export class CartSalesComponent
} }
async showConfirmation() { async showConfirmation() {
this.isLoadingPreOrder = true;
const dialog: DialogRef = this.dialogService.open({ const dialog: DialogRef = this.dialogService.open({
title: 'Por favor, confirme', title: 'Por favor, confirme',
content: 'Deseja gravar como orçamento ?', content: 'Deseja gravar como orçamento ?',
@@ -715,6 +717,7 @@ export class CartSalesComponent
dialog.result.subscribe((result) => { dialog.result.subscribe((result) => {
if (result instanceof DialogCloseResult) { if (result instanceof DialogCloseResult) {
console.log('close'); console.log('close');
this.isLoadingPreOrder = false;
} else { } else {
const resultConfirmation = JSON.stringify(result); const resultConfirmation = JSON.stringify(result);
console.log('action1', resultConfirmation); console.log('action1', resultConfirmation);
@@ -722,6 +725,7 @@ export class CartSalesComponent
console.log('criando orçamento'); console.log('criando orçamento');
this.createPreOrder(); this.createPreOrder();
} }
this.isLoadingPreOrder = false;
} }
}); });
} }
@@ -798,13 +802,16 @@ export class CartSalesComponent
setBilling(billing: any) { setBilling(billing: any) {
localStorage.setItem('billing', JSON.stringify(billing)); localStorage.setItem('billing', JSON.stringify(billing));
const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
this.idBilling = billing.codcob; this.idBilling = billing.codcob;
console.log(JSON.stringify(billing)); console.log(JSON.stringify(billing));
localStorage.removeItem('paymentPlan'); localStorage.removeItem('paymentPlan');
this.formPayment.patchValue({ this.formPayment.patchValue({
paymentPlan: null, 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$ this.subscritpionPaymentPlan = this.paymentPlan$
.pipe( .pipe(
tap((data) => (this.paymentPlans = data)), tap((data) => (this.paymentPlans = data)),
@@ -2386,7 +2393,7 @@ export class CartSalesComponent
openPrintPreOrder() { openPrintPreOrder() {
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' + // this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
this.urlPrintPreOrder = this.urlPrintPreOrder =
'http://172.35.0.219:8068/Viewer/{action}?order=' + 'https://portainer.simplifiquehc.com.br/Viewer/{action}?order=' +
this.preOrderNumber + this.preOrderNumber +
'&model=' + '&model=' +
this.modelPrintPreOrder; this.modelPrintPreOrder;
@@ -2400,7 +2407,7 @@ export class CartSalesComponent
openPrintOrder() { openPrintOrder() {
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' + // this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
this.urlPrintOrder = this.urlPrintOrder =
'http://172.35.0.219:8068/Viewer/{action}?orderId=' + 'https://portainer.simplifiquehc.com.br/Viewer/{action}?orderId=' +
this.orderNumber + this.orderNumber +
'&model=' + '&model=' +
this.modelPrintOrder; this.modelPrintOrder;

View File

@@ -230,10 +230,10 @@
<kendo-formfield> <kendo-formfield>
<label> <label>
<span>Como conheceu a JURUNENSE?</span> <span>Como conheceu a SIMPPLIFIQUE?</span>
<kendo-combobox [data]="listCommunicate" formControlName="communicate" <kendo-combobox [data]="listCommunicate" formControlName="communicate"
[kendoDropDownFilter]="{ operator: 'contains' }" [kendoDropDownFilter]="{ operator: 'contains' }"
placeholder="Informe como o cliente conheceu a JURUNENSE..."> placeholder="Informe como o cliente conheceu a SIMPLIFIQUE...">
</kendo-combobox> </kendo-combobox>
</label> </label>
</kendo-formfield> </kendo-formfield>

View File

@@ -239,6 +239,8 @@ export class OrdersComponent implements OnInit, OnDestroy {
} }
openPrintOrder() { openPrintOrder() {
//this.urlPrintOrder = 'http://localhost:52986/Viewer/{action}?orderId=' +
//'http://172.35.0.219:8068/Viewer/{action}?orderId=' +
this.urlPrintOrder = 'http://172.35.0.219:8068/Viewer/{action}?orderId=' + this.urlPrintOrder = 'http://172.35.0.219:8068/Viewer/{action}?orderId=' +
this.orderNumber + '&model=' + this.modelPrintOrder; this.orderNumber + '&model=' + this.modelPrintOrder;
this.titleInformation = 'Gravar pedido de venda'; this.titleInformation = 'Gravar pedido de venda';

View File

@@ -25,7 +25,7 @@ export class LookupService {
constructor( constructor(
private http: HttpClient, private http: HttpClient,
private authService: AuthService, private authService: AuthService,
) { } ) { }
getStore(): Observable<StoreERP[]> { getStore(): Observable<StoreERP[]> {
const url = environment.url + `lists/store/user/${this.authService.getUser()}`; const url = environment.url + `lists/store/user/${this.authService.getUser()}`;
@@ -60,8 +60,8 @@ export class LookupService {
} }
} }
getPaymentPlan(billingId: string = '9999'): Observable<PaymentPlan[]> { getPaymentPlan(billingId: string = '9999', customerId: number = 1): Observable<PaymentPlan[]> {
const url = environment.url + `lists/paymentplan/${billingId}`; const url = environment.url + `lists/paymentplan/${billingId}/${customerId}`;
try { try {
const response = this.http.get<PaymentPlan[]>(url); const response = this.http.get<PaymentPlan[]>(url);
return response; return response;