Compare commits
20 Commits
84a1d84929
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e89895b07b | ||
|
|
c366a55c15 | ||
|
|
afd6b453d7 | ||
|
|
eee589174e | ||
|
|
47945c9b54 | ||
|
|
1c5652dae6 | ||
| 1f5ab7b133 | |||
|
|
769af04587 | ||
|
|
7bc186cbe2 | ||
|
|
b8cda807ef | ||
|
|
8bf7331837 | ||
|
|
1a26b75cb0 | ||
|
|
de46ca882d | ||
|
|
e464c54c97 | ||
|
|
6292312e1d | ||
|
|
f300dc07d1 | ||
|
|
1cb849a299 | ||
|
|
f1f76a8a9a | ||
|
|
f04f5f5215 | ||
|
|
210a26cb82 |
@@ -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:c366a55
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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,15 +342,10 @@
|
|||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</kendo-window>
|
</kendo-window>
|
||||||
@@ -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"
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -84,15 +84,9 @@ export class DiscountOrderComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
confirmDiscount() {
|
confirmDiscount() {
|
||||||
const domain = '@jurunense.com.br';
|
|
||||||
let email = this.formDiscount.get('formUser.email').value;
|
let email = this.formDiscount.get('formUser.email').value;
|
||||||
|
|
||||||
// Remover domínio se já estiver presente
|
const emailUpperCase = email.toUpperCase();
|
||||||
if (email.toLowerCase().endsWith(domain)) {
|
|
||||||
email = email.substring(0, email.length - domain.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
const emailUpperCase = (email + domain).toUpperCase();
|
|
||||||
const passwordUpperCase = this.formDiscount.get('formUser.password').value.toUpperCase();
|
const passwordUpperCase = this.formDiscount.get('formUser.password').value.toUpperCase();
|
||||||
|
|
||||||
if (this.discountAuthorization < this.percent) {
|
if (this.discountAuthorization < this.percent) {
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
</button>
|
</button>
|
||||||
<div *ngIf="isMobileMenuOpen" class="mobile-menu-items shadow-sm">
|
<div *ngIf="isMobileMenuOpen" class="mobile-menu-items shadow-sm">
|
||||||
<button class="dropdown-item w-100" (click)="openNewOrder()">Novo pedido</button>
|
<button class="dropdown-item w-100" (click)="openNewOrder()">Novo pedido</button>
|
||||||
<button class="dropdown-item w-100" (click)="openDashTodaysale()">Dashboard Venda dia</button>
|
<!-- <button class="dropdown-item w-100" (click)="openDashTodaysale()">Dashboard Venda dia</button>
|
||||||
<button class="dropdown-item w-100" (click)="openDashSeller()">Dashboard Vendedor</button>
|
<button class="dropdown-item w-100" (click)="openDashSeller()">Dashboard Vendedor</button>-->
|
||||||
<button class="dropdown-item w-100" (click)="openOrders()">Pedidos de venda</button>
|
<button class="dropdown-item w-100" (click)="openOrders()">Pedidos de venda</button>
|
||||||
<button class="dropdown-item w-100" (click)="openProductOrder()">Produtos Vendidos</button>
|
<button class="dropdown-item w-100" (click)="openProductOrder()">Produtos Vendidos</button>
|
||||||
<button class="dropdown-item w-100" (click)="openClose(true)">Orçamentos pendentes</button>
|
<button class="dropdown-item w-100" (click)="openClose(true)">Orçamentos pendentes</button>
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user