Compare commits

..

38 Commits

Author SHA1 Message Date
Gitea Action
e89895b07b chore: update image tag to c366a55 [skip ci] 2026-04-01 18:19:30 +00:00
Luis Eduardo Estevao
c366a55c15 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 10m16s
2026-04-01 15:08:59 -03:00
Luis Eduardo Estevao
afd6b453d7 feat: create dashboard sales layout with responsive navigation and pre-order modal 2026-04-01 15:08:52 -03:00
Gitea Action
eee589174e chore: update image tag to 47945c9 [skip ci] 2026-03-16 18:02:03 +00:00
Luis Eduardo Estevao
47945c9b54 feat: Add discount order component to manage order discounts with authorization logic.
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 13m59s
2026-03-16 14:47:57 -03:00
Gitea Action
1c5652dae6 chore: update image tag to 1f5ab7b [skip ci] 2026-02-24 23:12:32 +00:00
1f5ab7b133 Merge pull request 'fix: update cart sales print viewer urls' (#1) from develop into main
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 5m45s
Reviewed-on: #1
2026-02-24 18:06:47 -05:00
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
Gitea Action
84a1d84929 chore: update image tag to 161ed4d [skip ci] 2026-02-12 20:11:16 +00:00
161ed4dbe0 fix: correct title spelling in index.html from "Plataforma Smart" to "Plataforma Smarts"
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 6m6s
2026-02-12 17:04:20 -03:00
Gitea Action
e24fd41cce chore: update image tag to fc41c49 [skip ci] 2026-02-12 19:54:12 +00:00
fc41c4929b Atualizar k8s/base/deployment.yaml
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 6m27s
2026-02-12 14:47:44 -05:00
Gitea Action
adcf5a435d chore: update image tag to 3110e0a [skip ci] 2026-02-12 19:36:48 +00:00
3110e0aeb4 chore: change git remote URL protocol from HTTPS to HTTP in deploy workflow
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 11s
2026-02-12 16:34:55 -03:00
8aa310daec chore: improve image tag update logic in deploy workflow and adjust image registry URL format
Some checks failed
Build (develop) / Promote (main) / build-and-push-deploy (push) Failing after 5m28s
2026-02-12 16:18:42 -03:00
e4de5af67a chore: remove HTTP protocol from registry URL in deploy workflow
Some checks failed
Build (develop) / Promote (main) / build-and-push-deploy (push) Failing after 8m11s
2026-02-12 16:06:16 -03:00
18bbf6cd5e chore: update registry URL to use local IP for image and git operations
Some checks failed
Build (develop) / Promote (main) / build-and-push-deploy (push) Failing after 7s
2026-02-12 15:59:31 -03:00
Luis Eduardo Estevao
ce89051e71 Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
Some checks failed
Build (develop) / Promote (main) / build-and-push-deploy (push) Has been cancelled
2026-02-12 11:01:56 -03:00
Luis Eduardo Estevao
921a3a5d53 feat: add sales cart, order, preorder, and partner commission components 2026-02-12 11:01:50 -03:00
Gitea Action
133a87cc00 chore: update image tag to d7edd99 [skip ci] 2026-02-11 18:34:12 +00:00
Luis Eduardo Estevao
d7edd99bd2 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 7m0s
2026-02-11 15:26:16 -03:00
Luis Eduardo Estevao
befaf1872f feat: Implement sales order management, customer and address creation modals, and a login page with new image assets. 2026-02-11 15:26:09 -03:00
Gitea Action
10c7a590f0 chore: update image tag to 32d4a3f [skip ci] 2026-02-11 14:11:55 +00:00
Luis Eduardo Estevao
32d4a3f2b9 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 6m21s
2026-02-11 11:05:31 -03:00
Luis Eduardo Estevao
c58290621a feat: implement shopping cart and sales functionality with new component, service, and environment configuration. 2026-02-11 11:05:23 -03:00
Gitea Action
76048ad64e chore: update image tag to 806ac42 [skip ci] 2026-02-10 14:18:55 +00:00
26 changed files with 352 additions and 940 deletions

View File

@@ -15,7 +15,7 @@ jobs:
- name: Build and Push
run: |
set -euo pipefail
REGISTRY="git.simplifiquehc.com.br"
REGISTRY="172.35.0.216:3000"
IMAGE_NAME="$REGISTRY/simplifique/vendaweb-portal"
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
@@ -45,22 +45,26 @@ jobs:
run: |
set -euo pipefail
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
IMAGE_NAME="git.simplifiquehc.com.br/simplifique/vendaweb-portal"
MANIFEST_FILE="k8s/overlays/prod/deployment-image-digest-patch.yaml"
sed -i -E "s|^([[:space:]]*image: ${IMAGE_NAME}:).*|\\1${SHA_TAG}|g" "$MANIFEST_FILE"
# Match image line for vendaweb-portal and replace tag (works with any registry hostname)
sed -i -E "s|(image: .*vendaweb-portal:).*|\1${SHA_TAG}|" "$MANIFEST_FILE"
if [ -z "${{ secrets.GITEA_TOKEN }}" ]; then
echo "Missing secrets.GITEA_TOKEN (needed to push back to repo)"
exit 1
fi
git remote set-url origin "https://${{ github.actor }}:${{ secrets.GITEA_TOKEN }}@git.simplifiquehc.com.br/simplifique/Vendaweb-portal.git"
git remote set-url origin "http://${{ github.actor }}:${{ secrets.GITEA_TOKEN }}@172.35.0.216:3000/simplifique/Vendaweb-portal.git"
git config user.name "Gitea Action"
git config user.email "actions@simplifiquehc.com.br"
git add "$MANIFEST_FILE"
if git diff --staged --quiet; then
echo "Manifest already has image tag $SHA_TAG, nothing to commit"
else
git commit -m "chore: update image tag to $SHA_TAG [skip ci]"
git push origin main
fi

View File

@@ -27,7 +27,7 @@ spec:
terminationGracePeriodSeconds: 30
containers:
- name: portal
image: git.simplifiquehc.com.br/simplifique/vendaweb-portal:latest
image: 172.35.0.216:3000/simplifique/vendaweb-portal:latest
imagePullPolicy: IfNotPresent
ports:
- name: http

View File

@@ -7,4 +7,4 @@ spec:
spec:
containers:
- name: portal
image: git.simplifiquehc.com.br/simplifique/vendaweb-portal:e14157c
image: 172.35.0.216:3000/simplifique/vendaweb-portal:c366a55

View File

@@ -4,7 +4,7 @@
<div class="col-12 col-sm-8 col-md-6 col-xl-4">
<div class="cs-login">
<div class="text-center">
<span class="ls-saudacao">Bem-vindo(a),</span>
<span class="ls-saudacao">Bem-vindo(a), </span>
<span class="ls-plataforma">SIMPLIFIQUE</span>
</div>
<form class="fs-login" [formGroup]="form" (keydown.enter)="submitForm()">
@@ -29,13 +29,8 @@
<kendo-textbox class="k-textbox is-text" type="password" placeholder="Informe sua senha" #password
formControlName="password">
<ng-template kendoTextBoxSuffixTemplate>
<button
kendoButton
look="clear"
[icon]="passwordVisible ? 'eye-slash' : 'eye'"
(click)="toggleVisibility()"
type="button"
></button>
<button kendoButton look="clear" [icon]="passwordVisible ? 'eye-slash' : 'eye'"
(click)="toggleVisibility()" type="button"></button>
</ng-template>
</kendo-textbox>
</label>

View File

@@ -75,7 +75,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
this.authService.setDataInLocalStorage('user', JSON.stringify(res.data));
this.authService.setDataInLocalStorage('token', res.data.token);
localStorage.removeItem('cart');
this.router.navigate(['/menu']);
this.router.navigate(['/sales/menu']);
} else {
this.loadingIcon = '';
this.showErrorMessage(res.message);

View File

@@ -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>

View File

@@ -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>

View File

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

View File

@@ -68,7 +68,7 @@ export class CommissionComponent implements OnInit {
}
console.log("tipo: " + intType);
this.urlPrintPreOrder =
`http://10.1.1.205:8068/Viewer/{action}?partnerId=${partnerId}&type=${type}&start=${this.range.start.toUTCString()}&end=${this.range.end.toUTCString()}`;
`http://172.35.0.219:8068/Viewer/{action}?partnerId=${partnerId}&type=${type}&start=${this.range.start.toUTCString()}&end=${this.range.end.toUTCString()}`;
// `http://localhost:52986/Viewer/{action}?partnerId=${this.selectedPartner.id}
// &start=${this.range.start.toUTCString()}&end=${this.range.end.toUTCString()}`;

View File

@@ -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"

View File

@@ -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;
@@ -604,6 +605,8 @@ export class CartSalesComponent
this.stores.find((s) => s.id === this.authService.getStore())
);
localStorage.setItem('invoiceStore', saveStoreInvoice);
this.updateCart(this.shoppingService.getCart());
}
this.formPayment.patchValue({
invoiceStore: JSON.parse(saveStoreInvoice),
@@ -630,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 (
@@ -698,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 ?',
@@ -713,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);
@@ -720,6 +725,7 @@ export class CartSalesComponent
console.log('criando orçamento');
this.createPreOrder();
}
this.isLoadingPreOrder = false;
}
});
}
@@ -750,6 +756,7 @@ export class CartSalesComponent
if (localStorage.getItem('paymentPlan') === 'undefined') {
localStorage.setItem('paymentPlan', JSON.stringify(paymentPlan));
this.selectPaymentPlan = paymentPlan;
this.updateCart(this.shoppingService.getCart());
this.confirmChangePaymentPlan(true);
} else {
this.selectPaymentPlan = paymentPlan;
@@ -767,6 +774,7 @@ export class CartSalesComponent
'paymentPlan',
JSON.stringify(this.selectPaymentPlan)
);
this.updateCart(this.shoppingService.getCart());
const billing = JSON.parse(localStorage.getItem('billing')) as Billing;
this.idPaymentPlan = this.selectPaymentPlan.codplpag;
this.subscriptionUpdatePayment = this.shoppingService
@@ -794,19 +802,23 @@ 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)),
tap((planos) => console.log(planos))
)
.subscribe();
this.updateCart(this.shoppingService.getCart());
}
setPartner(partner: any) {
@@ -815,6 +827,7 @@ export class CartSalesComponent
setInvoiceStore(invoiceStore: any) {
localStorage.setItem('invoiceStore', JSON.stringify(invoiceStore));
this.updateCart(this.shoppingService.getCart());
}
isInvoiceStore9Or10() {
@@ -930,14 +943,14 @@ export class CartSalesComponent
const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
if (localStorage.getItem('customer') != undefined) {
if (customer.place.id == 19) {
this.titleInformation = 'Pedido de venda';
this.messageInformation = 'ATENÇÃO! Cliente com praça do E-COMMERCE!';
this.informationDescription =
'Altere a praça do cliente pela opção NOVO CLIENTE para continuar.';
this.showInformation = true;
return;
}
// if (customer.place.id == 19) {
// this.titleInformation = 'Pedido de venda';
// this.messageInformation = 'ATENÇÃO! Cliente com praça do E-COMMERCE!';
// this.informationDescription =
// 'Altere a praça do cliente pela opção NOVO CLIENTE para continuar.';
// this.showInformation = true;
// return;
// }
if (
customer.place.name == 'INATIVO' ||
customer.place.name == 'INATIVA'
@@ -1000,6 +1013,7 @@ export class CartSalesComponent
}
this.updateFormCustomer(result);
localStorage.setItem('customer', JSON.stringify(result));
this.updateCart(this.shoppingService.getCart());
this.updateTaxDelivery();
}
}
@@ -1579,20 +1593,29 @@ export class CartSalesComponent
}
public updateCart(
cartId: string,
customerId: number,
addressId: number,
saleStoreId: string,
paymentPlanId: number,
billingId: string
cartId: string
) {
console.log('Atualizando carrinho: ' + cartId);
this.shoppingService.getShopping(cartId).subscribe((shopping) => {
if (shopping) {
shopping.codcli = customerId;
shopping.codendentcli = addressId;
shopping.saleStore = saleStoreId;
shopping.codplpag = paymentPlanId;
shopping.codcob = billingId;
console.log('Carrinho encontrado: ' + JSON.stringify(shopping));
const invoiceStore = JSON.parse(
localStorage.getItem('invoiceStore')
) as StoreERP;
const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
const address = JSON.parse(
localStorage.getItem('address')
) as CustomerAddress;
const paymentPlan = JSON.parse(
localStorage.getItem('paymentPlan')
) as PaymentPlan;
const billing = JSON.parse(localStorage.getItem('billing')) as Billing;
shopping.codcli = customer ? customer.customerId : 0;
shopping.codendentcli = address ? address.idAddress : 0;
shopping.saleStore = invoiceStore ? invoiceStore.id : this.authService.getStore();
shopping.codplpag = paymentPlan ? paymentPlan.codplpag : 0;
shopping.codcob = billing ? billing.codcob : '';
this.shoppingService.updateShopping(shopping).subscribe(
(response) => {
@@ -1630,6 +1653,7 @@ export class CartSalesComponent
this.showSelectAddress = false;
if (result != null) {
localStorage.setItem('address', JSON.stringify(result));
this.updateCart(this.shoppingService.getCart());
this.updateFormAddress(result);
this.updateTaxDelivery();
}
@@ -2331,6 +2355,7 @@ export class CartSalesComponent
if (action === 'Sim') {
if (this.customer !== undefined && this.customer.customerId !== 1) {
localStorage.setItem('customer', JSON.stringify(this.customer));
this.updateCart(this.shoppingService.getCart());
this.updateFormCustomer(this.customer);
} else {
localStorage.setItem(
@@ -2368,7 +2393,7 @@ export class CartSalesComponent
openPrintPreOrder() {
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
this.urlPrintPreOrder =
'http://10.1.1.205:8068/Viewer/{action}?order=' +
'https://portainer.simplifiquehc.com.br/Viewer/{action}?order=' +
this.preOrderNumber +
'&model=' +
this.modelPrintPreOrder;
@@ -2382,7 +2407,7 @@ export class CartSalesComponent
openPrintOrder() {
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
this.urlPrintOrder =
'http://10.1.1.205:8068/Viewer/{action}?orderId=' +
'https://portainer.simplifiquehc.com.br/Viewer/{action}?orderId=' +
this.orderNumber +
'&model=' +
this.modelPrintOrder;

View File

@@ -1,11 +1,5 @@
<kendo-dialog
*ngIf="openedDialog"
[(width)]="windowWidth"
[(height)]="windowHeight"
(close)="closeDialog()"
title="Novo endereço"
autoFocusedElement="#zipCode"
>
<kendo-dialog *ngIf="openedDialog" [(width)]="windowWidth" [(height)]="windowHeight" (close)="closeDialog()"
title="Novo endereço" autoFocusedElement="#zipCode">
<!--kendo-window-titlebar
style="background-color: rgb(34, 34, 61); color: white"
>
@@ -25,28 +19,17 @@
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Cep</span>
<input
kendoTextBox
id="zipCode"
formControlName="zipCode"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="consultaCep()"
>
<input kendoTextBox id="zipCode" formControlName="zipCode" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="consultaCep()">
</label>
</kendo-formfield>
<kendo-formfield>
<label>
<span>Praça</span>
<kendo-combobox
[data]="places$ | async"
formControlName="place"
[kendoDropDownFilter]="{ operator: 'contains' }"
textField="name"
valueField="id"
placeholder="Selecione a praça do cliente..."
>
<kendo-combobox [data]="places$ | async" formControlName="place"
[kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
placeholder="Selecione a praça do cliente...">
</kendo-combobox>
</label>
@@ -55,80 +38,49 @@
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Endereço</span>
<kendo-textbox
#address
[maxlength]="40"
formControlName="address"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('address')"
></kendo-textbox>
<kendo-textbox #address [maxlength]="40" formControlName="address" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="removeCharacters('address')"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Número</span>
<kendo-textbox
#addressNumber
formControlName="addressNumber"
showSuccessIcon="initial"
<kendo-textbox #addressNumber formControlName="addressNumber" showSuccessIcon="initial"
showErrorIcon="initial"
onkeypress="return event.charCode >= 48 && event.charCode <= 57"
></kendo-textbox>
onkeypress="return event.charCode >= 48 && event.charCode <= 57"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Complemento</span>
<kendo-textbox
#complement
[maxlength]="40"
formControlName="complement"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('complement')"
></kendo-textbox>
<kendo-textbox #complement [maxlength]="40" formControlName="complement" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="removeCharacters('complement')"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Bairro</span>
<kendo-textbox
#neighbourhood
formControlName="neighborhood"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('neighborhood')"
></kendo-textbox>
<kendo-textbox #neighbourhood formControlName="neighborhood" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="removeCharacters('neighborhood')"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Cidade</span>
<kendo-textbox
#city
[maxlength]="15"
formControlName="city"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('city')"
></kendo-textbox>
<kendo-textbox #city [maxlength]="15" formControlName="city" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="removeCharacters('city')"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Estado</span>
<kendo-textbox
#state
formControlName="state"
showSuccessIcon="initial"
showErrorIcon="initial"
></kendo-textbox>
<kendo-textbox #state formControlName="state" showSuccessIcon="initial"
showErrorIcon="initial"></kendo-textbox>
</label>
</kendo-formfield>
@@ -138,37 +90,21 @@
<ul class="k-radio-list k-list-horizontal">
<li class="k-radio-item">
<label>
<input
type="radio"
#addressTypeNormal
value="N"
kendoRadioButton
formControlName="addressType"
/>
<input type="radio" #addressTypeNormal value="N" kendoRadioButton formControlName="addressType" />
<span class="ms-2">Normal</span>
</label>
</li>
<li class="k-radio-item">
<label>
<input
type="radio"
#addressTypePorto
value="P"
kendoRadioButton
formControlName="addressType"
/>
<span class="ms-2">Porto</span>
<input type="radio" #addressTypeShopping value="S" kendoRadioButton
formControlName="addressType" />
<span class="ms-2">Shopping</span>
</label>
</li>
<li class="k-radio-item">
<label>
<input
type="radio"
#addressTypeCondominio
value="C"
kendoRadioButton
formControlName="addressType"
/>
<input type="radio" #addressTypeCondominio value="C" kendoRadioButton
formControlName="addressType" />
<span class="ms-2">Condominio</span>
</label>
</li>
@@ -180,26 +116,16 @@
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Ponto de referencia</span>
<kendo-textbox
#state
formControlName="referencePoint"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('referencePoint')"
></kendo-textbox>
<kendo-textbox #state formControlName="referencePoint" showSuccessIcon="initial" showErrorIcon="initial"
(blur)="removeCharacters('referencePoint')"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Observações</span>
<kendo-textbox
#state
formControlName="note"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('note')"
></kendo-textbox>
<kendo-textbox #state formControlName="note" showSuccessIcon="initial" showErrorIcon="initial"
(blur)="removeCharacters('note')"></kendo-textbox>
</label>
</kendo-formfield>
</fieldset>
@@ -210,11 +136,7 @@
<div class="k-loading-panel">
<div class="k-loading-panel-mask"></div>
<div class="k-loading-panel-wrapper">
<kendo-loader
[type]="'infinite-spinner'"
[themeColor]="'primary'"
[size]="'large'"
>
<kendo-loader [type]="'infinite-spinner'" [themeColor]="'primary'" [size]="'large'">
</kendo-loader>
<div class="k-loading-panel-text">Aguarde...</div>
</div>
@@ -225,53 +147,27 @@
</div>
<kendo-dialog-actions>
<button
(click)="showConfirmation()"
class="btn-fill-blue text-btn-white"
kendoButton
[primary]="true"
[disabled]="!form.valid"
>
<button (click)="showConfirmation()" class="btn-fill-blue text-btn-white" kendoButton [primary]="true"
[disabled]="!form.valid">
Gravar
</button>
<button
class="btn-flat text-btn-flat"
kendoButton
look="flat"
(click)="closeDialog()"
>
<button class="btn-flat text-btn-flat" kendoButton look="flat" (click)="closeDialog()">
Cancelar
</button>
<button
class="btn-flat text-btn-flat"
kendoButton
look="flat"
(click)="googleGeocode()"
>
<button class="btn-flat text-btn-flat" kendoButton look="flat" (click)="googleGeocode()">
Mapa do Endereço
</button>
</kendo-dialog-actions>
<app-confirmation
*ngIf="isShowConfirmation"
opened="isShowConfirmation"
title="{{ titleMessage }}"
message="{{ messageConfirmation }}"
textButtonConfirmation="{{ textButtonConfirmation }}"
textButtonCancel="{{ textButtonCancel }}"
(resultEvent)="returnConfirmationSalve($event)"
></app-confirmation>
<app-confirmation *ngIf="isShowConfirmation" opened="isShowConfirmation" title="{{ titleMessage }}"
message="{{ messageConfirmation }}" textButtonConfirmation="{{ textButtonConfirmation }}"
textButtonCancel="{{ textButtonCancel }}" (resultEvent)="returnConfirmationSalve($event)"></app-confirmation>
</kendo-dialog>
<kendo-dialog
*ngIf="showMap"
[height]="600"
[width]="800"
title="Confirme a localização do endereço"
(close)="MapCep(false)"
>
<kendo-dialog *ngIf="showMap" [height]="600" [width]="800" title="Confirme a localização do endereço"
(close)="MapCep(false)">
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="zoom">
<agm-marker [latitude]="latitude" [longitude]="longitude"></agm-marker>
</agm-map>

View File

@@ -1,11 +1,5 @@
<kendo-dialog
*ngIf="openedDialog"
[(width)]="windowWidth"
[(height)]="windowHeight"
(close)="closeDialog()"
autoFocusedElement="#person"
title="Novo cliente"
>
<kendo-dialog *ngIf="openedDialog" [(width)]="windowWidth" [(height)]="windowHeight" (close)="closeDialog()"
autoFocusedElement="#person" title="Novo cliente">
<!--kendo-window-titlebar
style="background-color: rgb(34, 34, 61); color: white"
>
@@ -27,23 +21,11 @@
<div class="col-12 col-sm-8">
<div class="row">
<div class="col-1">
<input
type="radio"
value="true"
#company
formControlName="company"
kendoRadioButton
/>
<input type="radio" value="true" #company formControlName="company" kendoRadioButton />
</div>
<div class="col-5 text-start p-0">Jurídica</div>
<div class="col-1">
<input
type="radio"
value="false"
id="person"
formControlName="company"
kendoRadioButton
/>
<input type="radio" value="false" id="person" formControlName="company" kendoRadioButton />
</div>
<div class="col-5 text-start p-0">Física</div>
</div>
@@ -51,19 +33,11 @@
</div>
</div>
<kendo-formfield
showErrors="initial"
*ngIf="form.value['company'] == 'false'"
>
<kendo-formfield showErrors="initial" *ngIf="form.value['company'] == 'false'">
<label>
<span>Cpf</span>
<kendo-maskedtextbox
formControlName="cpfCnpj"
[mask]="cpfMask"
id="inputCpf"
(blur)="searchCustomerByDocument()"
required
>
<kendo-maskedtextbox formControlName="cpfCnpj" [mask]="cpfMask" id="inputCpf"
(blur)="searchCustomerByDocument()" required>
</kendo-maskedtextbox>
</label>
@@ -76,37 +50,22 @@
<kendo-formfield *ngIf="form.value['company'] == 'true'">
<label>
<span>Cnpj</span>
<kendo-maskedtextbox
#cnpj
formControlName="cpfCnpj"
[mask]="cnpjMask"
#inputCnpj
(blur)="searchCustomerByDocument()"
required
>
<kendo-maskedtextbox #cnpj formControlName="cpfCnpj" [mask]="cnpjMask" #inputCnpj
(blur)="searchCustomerByDocument()" required>
<kendo-loader *ngIf="loaderVisible" size="small">
</kendo-loader>
</kendo-maskedtextbox>
</label>
<kendo-formerror
>Erro: CNPJ deve ser informado para cliente pessoa
jurídica</kendo-formerror
>
<kendo-formerror>Erro: CNPJ deve ser informado para cliente pessoa
jurídica</kendo-formerror>
</kendo-formfield>
<kendo-formfield showErrors="initial">
<label>
<span>Nome</span>
<kendo-textbox
[maxlength]="40"
formControlName="name"
#firstName
required
showSuccessIcon="initial"
showErrorIcon="initial"
partner="^[a-zA-Z0-9._\b]+$"
(blur)="removeCharacters('name')"
></kendo-textbox>
<kendo-textbox [maxlength]="40" formControlName="name" #firstName required showSuccessIcon="initial"
showErrorIcon="initial" partner="^[a-zA-Z0-9._\b]+$"
(blur)="removeCharacters('name')"></kendo-textbox>
</label>
<kendo-formerror>Erro: Nome é obrigatório</kendo-formerror>
</kendo-formfield>
@@ -116,33 +75,15 @@
<!-- <div class="row d-flex flex-row"> -->
<div class="row w-100">
<div class="col-1">
<input
type="radio"
value="F"
#company
formControlName="gender"
kendoRadioButton
/>
<input type="radio" value="F" #company formControlName="gender" kendoRadioButton />
</div>
<div class="col-3 text-start p-0">Feminino</div>
<div class="col-1">
<input
type="radio"
value="M"
id="gender"
formControlName="gender"
kendoRadioButton
/>
<input type="radio" value="M" id="gender" formControlName="gender" kendoRadioButton />
</div>
<div class="col-3 text-start p-0">Masculino</div>
<div class="col-1">
<input
type="radio"
value="N"
id="gender"
formControlName="gender"
kendoRadioButton
/>
<input type="radio" value="N" id="gender" formControlName="gender" kendoRadioButton />
</div>
<div class="col-3 text-start p-0">Não declarado</div>
</div>
@@ -151,139 +92,80 @@
<kendo-formfield showHints="initial" showErrors="initial">
<label>
<span>Celular</span>
<kendo-maskedtextbox
#phoneNumber
formControlName="cellPhone"
[mask]="phoneNumberMask"
[value]="phoneNumberValue"
showSuccessIcon="initial"
showErrorIcon="initial"
></kendo-maskedtextbox>
<kendo-maskedtextbox #phoneNumber formControlName="cellPhone" [mask]="phoneNumberMask"
[value]="phoneNumberValue" showSuccessIcon="initial" showErrorIcon="initial"></kendo-maskedtextbox>
</label>
</kendo-formfield>
<kendo-formfield
*ngIf="form.value['company'] == 'true'"
showHints="initial"
showErrors="always"
>
<kendo-formfield *ngIf="form.value['company'] == 'true'" showHints="initial" showErrors="always">
<label>
<span>Inscrição Estadual</span>
<kendo-textbox
#numberState
formControlName="numberState"
showSuccessIcon="initial"
showErrorIcon="initial"
></kendo-textbox>
<kendo-textbox #numberState formControlName="numberState" showSuccessIcon="initial"
showErrorIcon="initial"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>EMail</span>
<kendo-textbox
#email
formControlName="email"
showSuccessIcon="initial"
showErrorIcon="initial"
></kendo-textbox>
<kendo-textbox #email formControlName="email" showSuccessIcon="initial"
showErrorIcon="initial"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Cep</span>
<kendo-textbox
#zipCode
maxlength="8"
formControlName="zipCode"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="consultaCep()"
></kendo-textbox>
<kendo-textbox #zipCode maxlength="8" formControlName="zipCode" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="consultaCep()"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Endereço</span>
<kendo-textbox
#address
[maxlength]="40"
formControlName="address"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('address')"
></kendo-textbox>
<kendo-textbox #address [maxlength]="40" formControlName="address" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="removeCharacters('address')"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Número</span>
<kendo-textbox
onkeypress="return event.charCode >= 48 && event.charCode <= 57"
#addressNumber
formControlName="addressNumber"
showSuccessIcon="initial"
showErrorIcon="initial"
></kendo-textbox>
<kendo-textbox onkeypress="return event.charCode >= 48 && event.charCode <= 57" #addressNumber
formControlName="addressNumber" showSuccessIcon="initial" showErrorIcon="initial"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Complemento</span>
<kendo-textbox
#complement
[maxlength]="40"
formControlName="complement"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('complement')"
></kendo-textbox>
<kendo-textbox #complement [maxlength]="40" formControlName="complement" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="removeCharacters('complement')"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Bairro</span>
<kendo-textbox
#neighbourhood
[maxlength]="40"
formControlName="neighborhood"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('neighborhood')"
></kendo-textbox>
<kendo-textbox #neighbourhood [maxlength]="40" formControlName="neighborhood" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="removeCharacters('neighborhood')"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Cidade</span>
<kendo-textbox
#city
[maxlength]="15"
formControlName="city"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('city')"
></kendo-textbox>
<kendo-textbox #city [maxlength]="15" formControlName="city" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="removeCharacters('city')"></kendo-textbox>
</label>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Estado</span>
<kendo-textbox
#state
[maxlength]="2"
formControlName="state"
showSuccessIcon="initial"
showErrorIcon="initial"
(blur)="removeCharacters('state')"
></kendo-textbox>
<kendo-textbox #state [maxlength]="2" formControlName="state" showSuccessIcon="initial"
showErrorIcon="initial" (blur)="removeCharacters('state')"></kendo-textbox>
</label>
</kendo-formfield>
@@ -293,37 +175,21 @@
<ul class="k-radio-list k-list-horizontal">
<li class="k-radio-item">
<label>
<input
type="radio"
#addressTypeNormal
value="N"
kendoRadioButton
formControlName="addressType"
/>
<input type="radio" #addressTypeNormal value="N" kendoRadioButton formControlName="addressType" />
<span class="ms-2">Normal</span>
</label>
</li>
<li class="k-radio-item">
<label>
<input
type="radio"
#addressTypePorto
value="P"
kendoRadioButton
formControlName="addressType"
/>
<span class="ms-2">Porto</span>
<input type="radio" #addressTypeShopping value="S" kendoRadioButton
formControlName="addressType" />
<span class="ms-2">Shopping</span>
</label>
</li>
<li class="k-radio-item">
<label>
<input
type="radio"
#addressTypeCondominio
value="C"
kendoRadioButton
formControlName="addressType"
/>
<input type="radio" #addressTypeCondominio value="C" kendoRadioButton
formControlName="addressType" />
<span class="ms-2">Condominio</span>
</label>
</li>
@@ -335,14 +201,9 @@
<kendo-formfield>
<label>
<span>Ramo de atividade</span>
<kendo-combobox
[data]="ramos$ | async"
formControlName="ramo"
[kendoDropDownFilter]="{ operator: 'contains' }"
textField="name"
valueField="id"
placeholder="Selecione a ramo de atividade do cliente..."
>
<kendo-combobox [data]="ramos$ | async" formControlName="ramo"
[kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
placeholder="Selecione a ramo de atividade do cliente...">
</kendo-combobox>
</label>
</kendo-formfield>
@@ -350,44 +211,29 @@
<kendo-formfield>
<label>
<span>Praça</span>
<kendo-combobox
[data]="places$ | async"
formControlName="place"
[kendoDropDownFilter]="{ operator: 'contains' }"
textField="name"
valueField="id"
placeholder="Selecione a praça do cliente..."
>
<kendo-combobox [data]="places$ | async" formControlName="place"
[kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
placeholder="Selecione a praça do cliente...">
</kendo-combobox>
</label>
<kendo-formerror
>Erro: É obrigatório informar a praça do
cliente</kendo-formerror
>
<kendo-formerror>Erro: É obrigatório informar a praça do
cliente</kendo-formerror>
</kendo-formfield>
<kendo-formfield showHints="initial" showErrors="always">
<label>
<span>Data de nascimento</span>
<kendo-dateinput
#birthdate
[format]="format"
formControlName="birthdate"
showSuccessIcon="initial"
showErrorIcon="initial"
></kendo-dateinput>
<kendo-dateinput #birthdate [format]="format" formControlName="birthdate" showSuccessIcon="initial"
showErrorIcon="initial"></kendo-dateinput>
</label>
</kendo-formfield>
<kendo-formfield>
<label>
<span>Como conheceu a JURUNENSE?</span>
<kendo-combobox
[data]="listCommunicate"
formControlName="communicate"
<span>Como conheceu a SIMPPLIFIQUE?</span>
<kendo-combobox [data]="listCommunicate" formControlName="communicate"
[kendoDropDownFilter]="{ operator: 'contains' }"
placeholder="Informe como o cliente conheceu a JURUNENSE..."
>
placeholder="Informe como o cliente conheceu a SIMPLIFIQUE...">
</kendo-combobox>
</label>
</kendo-formfield>
@@ -395,15 +241,9 @@
<kendo-formfield>
<label>
<span>Categoria</span>
<kendo-combobox
[data]="category$ | async"
formControlName="category"
(valueChange)="filterSubCategoria($event)"
[kendoDropDownFilter]="{ operator: 'contains' }"
textField="name"
valueField="id"
placeholder="Selecione a categoria do cliente..."
>
<kendo-combobox [data]="category$ | async" formControlName="category"
(valueChange)="filterSubCategoria($event)" [kendoDropDownFilter]="{ operator: 'contains' }"
textField="name" valueField="id" placeholder="Selecione a categoria do cliente...">
</kendo-combobox>
</label>
</kendo-formfield>
@@ -411,27 +251,16 @@
<kendo-formfield>
<label>
<span>Sub-Categoria</span>
<kendo-combobox
[data]="subCategories"
formControlName="subCategory"
[kendoDropDownFilter]="{ operator: 'contains' }"
textField="name"
valueField="id"
placeholder="Selecione a sub-categoria do cliente..."
>
<kendo-combobox [data]="subCategories" formControlName="subCategory"
[kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
placeholder="Selecione a sub-categoria do cliente...">
</kendo-combobox>
</label>
</kendo-formfield>
<kendo-formfield>
<kendo-label
[for]="allow"
text="Permite envio de mensagens"
></kendo-label>
<kendo-switch
#allow
formControlName="notifications"
></kendo-switch>
<kendo-label [for]="allow" text="Permite envio de mensagens"></kendo-label>
<kendo-switch #allow formControlName="notifications"></kendo-switch>
</kendo-formfield>
</fieldset>
</form>
@@ -441,11 +270,7 @@
<div class="k-loading-panel">
<div class="k-loading-panel-mask"></div>
<div class="k-loading-panel-wrapper">
<kendo-loader
[type]="'infinite-spinner'"
[themeColor]="'primary'"
[size]="'large'"
>
<kendo-loader [type]="'infinite-spinner'" [themeColor]="'primary'" [size]="'large'">
</kendo-loader>
<div class="k-loading-panel-text">Aguarde...</div>
</div>
@@ -462,42 +287,21 @@
</div> -->
<kendo-dialog-actions>
<button
(click)="showConfirmation()"
class="btn-fill-blue text-btn-white"
kendoButton
[primary]="true"
[disabled]="!form.valid || inProcess"
>
<button (click)="showConfirmation()" class="btn-fill-blue text-btn-white" kendoButton [primary]="true"
[disabled]="!form.valid || inProcess">
Gravar
</button>
<button
class="btn-flat text-btn-flat"
kendoButton
look="flat"
(click)="closeDialog()"
>
<button class="btn-flat text-btn-flat" kendoButton look="flat" (click)="closeDialog()">
Cancelar
</button>
<button
class="btn-flat text-btn-flat"
kendoButton
look="flat"
(click)="googleGeocode()"
>
<button class="btn-flat text-btn-flat" kendoButton look="flat" (click)="googleGeocode()">
Mapa do endereço
</button>
</kendo-dialog-actions>
<app-confirmation
*ngIf="isShowConfirmation"
opened="isShowConfirmation"
title="{{ titleMessage }}"
message="{{ messageConfirmation }}"
textButtonConfirmation="{{ textButtonConfirmation }}"
textButtonCancel="{{ textButtonCancel }}"
(resultEvent)="returnConfirmationSalve($event)"
></app-confirmation>
<app-confirmation *ngIf="isShowConfirmation" opened="isShowConfirmation" title="{{ titleMessage }}"
message="{{ messageConfirmation }}" textButtonConfirmation="{{ textButtonConfirmation }}"
textButtonCancel="{{ textButtonCancel }}" (resultEvent)="returnConfirmationSalve($event)"></app-confirmation>
</kendo-dialog>
<!-- <kendo-dialog

View File

@@ -84,15 +84,9 @@ export class DiscountOrderComponent implements OnInit, OnDestroy {
}
confirmDiscount() {
const domain = '@jurunense.com.br';
let email = this.formDiscount.get('formUser.email').value;
// Remover domínio se já estiver presente
if (email.toLowerCase().endsWith(domain)) {
email = email.substring(0, email.length - domain.length);
}
const emailUpperCase = (email + domain).toUpperCase();
const emailUpperCase = email.toUpperCase();
const passwordUpperCase = this.formDiscount.get('formUser.password').value.toUpperCase();
if (this.discountAuthorization < this.percent) {

View File

@@ -10,18 +10,18 @@
<button kendoButton class="new-order text-button" (click)="openNewOrder()">
Novo pedido
</button>
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openDashTodaysale()">
<!-- <button kendoButton class="button-flat text-button-flat mt-2" (click)="openDashTodaysale()">
Dashboard Venda dia
</button>
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openDashSeller()">
Dashboard Vendedor
</button>
</button> -->
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openOrders()">
Pedidos de venda
</button>
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openProductOrder()">
<!--button kendoButton class="button-flat text-button-flat mt-2" (click)="openProductOrder()">
Produtos Vendidos
</button>
</button> -->
<button kendoButton class="button-flat-blue text-button-flat-blue mt-2" (click)="openClose(true)">
Orçamentos pendentes
</button>
@@ -40,8 +40,8 @@
</button>
<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)="openDashTodaysale()">Dashboard Venda dia</button>
<button class="dropdown-item w-100" (click)="openDashSeller()">Dashboard Vendedor</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)="openOrders()">Pedidos de venda</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>

View File

@@ -9,13 +9,8 @@
<div class="col-md-6 col-sm-12">
<label>
<span>Filial de venda</span>
<kendo-combobox
[data]="store$ | async"
textField="shortName"
valueField="id"
placeholder="Selecione a filial de venda..."
(selectionChange)="selectedStore($event)"
></kendo-combobox>
<kendo-combobox [data]="store$ | async" textField="shortName" valueField="id"
placeholder="Selecione a filial de venda..." (selectionChange)="selectedStore($event)"></kendo-combobox>
</label>
</div>
<div class="col-md-6 col-sm-12 mt-3 mt-md-0">
@@ -33,16 +28,10 @@
<span class="d-block">Data do pedido</span>
<kendo-daterange class="d-flex gap-3 align-items-center">
<kendo-floatinglabel text="Início" id="dtinicio">
<kendo-dateinput
kendoDateRangeStartInput
[(value)]="filterPreOrder.start"
></kendo-dateinput>
<kendo-dateinput kendoDateRangeStartInput [(value)]="filterPreOrder.start"></kendo-dateinput>
</kendo-floatinglabel>
<kendo-floatinglabel text="Término" id="dtfim">
<kendo-dateinput
kendoDateRangeEndInput
[(value)]="filterPreOrder.end"
></kendo-dateinput>
<kendo-dateinput kendoDateRangeEndInput [(value)]="filterPreOrder.end"></kendo-dateinput>
</kendo-floatinglabel>
</kendo-daterange>
</label>
@@ -50,10 +39,7 @@
<div class="col-md-6 col-sm-12 mt-3 mt-md-0">
<label>
<span class="d-block">CPF / CNPJ</span>
<kendo-textbox
formControlName="document"
placeholder="Informe o CPF ou CNPJ do cliente"
></kendo-textbox>
<kendo-textbox formControlName="document" placeholder="Informe o CPF ou CNPJ do cliente"></kendo-textbox>
</label>
</div>
</div>
@@ -63,10 +49,8 @@
<div class="col-12">
<label class="w-100">
<span class="d-block">Nome do cliente</span>
<kendo-textbox
formControlName="nameCustomer"
placeholder="Informe o nome ou razão social do cliente"
></kendo-textbox>
<kendo-textbox formControlName="nameCustomer"
placeholder="Informe o nome ou razão social do cliente"></kendo-textbox>
</label>
</div>
</div>
@@ -80,47 +64,28 @@
<!-- Grid -->
<div class="col-12 mt-4 flex-fill">
<kendo-grid
[kendoGridBinding]="orders"
[sortable]="true"
[loading]="isLoading"
[height]="280"
(edit)="selectedOrder($event)"
(remove)="showItensOrder($event)"
>
<kendo-grid [kendoGridBinding]="orders" [sortable]="true" [loading]="isLoading" [height]="280"
(edit)="selectedOrder($event)" (remove)="showItensOrder($event)">
<kendo-grid-command-column title="Ações" width="190">
<ng-template kendoGridCellTemplate let-dataItem>
<div style="display: flex; align-items: center; gap: 10px;">
<button kendoGridEditCommand icon="edit"></button>
<button kendoGridRemoveCommand icon="binoculars"></button>
<button
kendoButton
icon="printer"
(click)="showItensOrder2(dataItem)"
></button>
<button
<button kendoButton icon="printer" (click)="showItensOrder2(dataItem)"></button>
<!-- <button
kendoButton
class="p-1"
(click)="openReceivePix(true, dataItem)"
>
<div class="logo-pix"></div>
</button>
</button> -->
</div>
</ng-template>
</kendo-grid-command-column>
<kendo-grid-column
*ngFor="let col of columns"
[field]="col.field"
[title]="col.title"
[width]="col.width"
[class]="{ 'text-end': col.textEnd }"
>
<ng-template
*ngIf="col.field == 'orderValue'"
kendoGridCellTemplate
let-dataItem
>
<kendo-grid-column *ngFor="let col of columns" [field]="col.field" [title]="col.title" [width]="col.width"
[class]="{ 'text-end': col.textEnd }">
<ng-template *ngIf="col.field == 'orderValue'" kendoGridCellTemplate let-dataItem>
<span>{{ dataItem.orderValue | currency }}</span>
</ng-template>
</kendo-grid-column>
@@ -129,57 +94,29 @@
</div>
<div *ngIf="showInformation">
<app-message-information
opened="true"
title="Pedido de venda"
[message]="messageInformation"
[information]="informationDescription"
(resultEvent)="closeInformation($event)"
></app-message-information>
<app-message-information opened="true" title="Pedido de venda" [message]="messageInformation"
[information]="informationDescription" (resultEvent)="closeInformation($event)"></app-message-information>
</div>
<div *ngIf="showInformationSeller">
<app-message-information
opened="true"
title="Pedido de venda"
message="Pedido não pode ser alterado!"
<app-message-information opened="true" title="Pedido de venda" message="Pedido não pode ser alterado!"
information="Pedido de outro vendedor, somente o vendedor responsável da venda poderá alterar o pedido."
(resultEvent)="closeInformationSeller($event)"
></app-message-information>
(resultEvent)="closeInformationSeller($event)"></app-message-information>
</div>
<div class="k-loading-panel" *ngIf="loadingPanelVisible">
<div class="k-loading-panel-mask"></div>
<div class="k-loading-panel-wrapper">
<kendo-loader
type="infinite-spinner"
themeColor="primary"
size="large"
></kendo-loader>
<kendo-loader type="infinite-spinner" themeColor="primary" size="large"></kendo-loader>
<div class="k-loading-panel-text">Loading...</div>
</div>
</div>
</div>
<kendo-dialog
title="Itens do pedido"
animation="zoom"
*ngIf="openedItensOrder"
(close)="closeModelItensOrder('Cancelar')"
[minWidth]="250"
[width]="1200"
[height]="450"
>
<kendo-grid
[kendoGridBinding]="orderItens"
style="width: 1150px"
[scrollable]="true"
>
<kendo-grid-column
field="productId"
title="Código"
[width]="70"
></kendo-grid-column>
<kendo-dialog title="Itens do pedido" animation="zoom" *ngIf="openedItensOrder"
(close)="closeModelItensOrder('Cancelar')" [minWidth]="250" [width]="1200" [height]="450">
<kendo-grid [kendoGridBinding]="orderItens" style="width: 1150px" [scrollable]="true">
<kendo-grid-column field="productId" title="Código" [width]="70"></kendo-grid-column>
<kendo-grid-column field="description" title="Descrição" [width]="250">
</kendo-grid-column>
<kendo-grid-column field="package" title="Embalagem" [width]="80">
@@ -188,32 +125,17 @@
</kendo-grid-column>
<kendo-grid-column field="local" title="Ambiente" [width]="100">
</kendo-grid-column>
<kendo-grid-column
[class]="{ 'text-end': true }"
field="price"
title="P.Venda"
[width]="80"
>
<kendo-grid-column [class]="{ 'text-end': true }" field="price" title="P.Venda" [width]="80">
<ng-template kendoGridCellTemplate let-dataItem>
<span>{{ dataItem.price | currency }}</span>
</ng-template>
</kendo-grid-column>
<kendo-grid-column
[class]="{ 'text-end': true }"
field="quantity"
title="Qtde"
[width]="60"
>
<kendo-grid-column [class]="{ 'text-end': true }" field="quantity" title="Qtde" [width]="60">
<ng-template kendoGridCellTemplate let-dataItem>
<span>{{ dataItem.quantity | number : "1.0-3" }}</span>
</ng-template>
</kendo-grid-column>
<kendo-grid-column
[class]="{ 'text-end': true }"
field="subTotal"
title="Valor Total"
[width]="80"
>
<kendo-grid-column [class]="{ 'text-end': true }" field="subTotal" title="Valor Total" [width]="80">
<ng-template kendoGridCellTemplate let-dataItem>
<span>{{ dataItem.subTotal | currency }}</span>
</ng-template>
@@ -221,39 +143,21 @@
</kendo-grid>
</kendo-dialog>
<kendo-dialog
title="Selecione o modelo do pedido"
animation="zoom"
*ngIf="openedModelPrintOrder"
(close)="closeModelPrintOrder('Cancelar')"
[minWidth]="250"
[width]="450"
>
<kendo-dialog title="Selecione o modelo do pedido" animation="zoom" *ngIf="openedModelPrintOrder"
(close)="closeModelPrintOrder('Cancelar')" [minWidth]="250" [width]="450">
<form class="k-form" [formGroup]="formModelOrder">
<kendo-formfield showHints="initial">
<label class="k-label">Selecione o modelo de pedido</label>
<ul class="k-radio-list">
<li class="k-radio-item">
<label>
<input
type="radio"
#bobina
value="B"
kendoRadioButton
formControlName="model"
/>
<input type="radio" #bobina value="B" kendoRadioButton formControlName="model" />
<span class="ms-2">Bobina</span>
</label>
</li>
<li class="k-radio-item">
<label>
<input
type="radio"
#bobina
value="A"
kendoRadioButton
formControlName="model"
/>
<input type="radio" #bobina value="A" kendoRadioButton formControlName="model" />
<span class="ms-2">Formulário A4</span>
</label>
</li>
@@ -262,56 +166,26 @@
</form>
<kendo-dialog-actions>
<button kendoButton (click)="closeModelPrintOrder('Não')">Cancelar</button>
<button
kendoButton
(click)="closeModelPrintOrder('Sim')"
themeColor="primary"
>
<button kendoButton (click)="closeModelPrintOrder('Sim')" themeColor="primary">
Imprimir
</button>
</kendo-dialog-actions>
</kendo-dialog>
<kendo-window
[top]="100"
[left]="50"
title="Pedido de venda"
[(state)]="windowState"
*ngIf="openedPrintOrder"
(close)="openClosePrintOrder(false)"
>
<stimulsoft-viewer-angular
[requestUrl]="urlPrintOrder"
[action]="'InitViewerOrder'"
[width]="'95%'"
[height]="'800px'"
></stimulsoft-viewer-angular>
<kendo-window [top]="100" [left]="50" title="Pedido de venda" [(state)]="windowState" *ngIf="openedPrintOrder"
(close)="openClosePrintOrder(false)">
<stimulsoft-viewer-angular [requestUrl]="urlPrintOrder" [action]="'InitViewerOrder'" [width]="'95%'"
[height]="'800px'"></stimulsoft-viewer-angular>
</kendo-window>
<kendo-window
[top]="100"
[left]="50"
title="Recibo de PIX"
[(state)]="windowState"
*ngIf="openedPrintReceivePix"
(close)="closePrintReceivePix('Não')"
>
<stimulsoft-viewer-angular
[requestUrl]="urlPrintCreditPix"
[action]="'InitViewerComprovantePix'"
[width]="'95%'"
[height]="'800px'"
></stimulsoft-viewer-angular>
<kendo-window [top]="100" [left]="50" title="Recibo de PIX" [(state)]="windowState" *ngIf="openedPrintReceivePix"
(close)="closePrintReceivePix('Não')">
<stimulsoft-viewer-angular [requestUrl]="urlPrintCreditPix" [action]="'InitViewerComprovantePix'" [width]="'95%'"
[height]="'800px'"></stimulsoft-viewer-angular>
</kendo-window>
<kendo-dialog
title="Recebimento via PIX"
animation="zoom"
*ngIf="showReceivePix"
(close)="closeReceivePix('Cancelar')"
[minWidth]="250"
[width]="450"
>
<kendo-dialog title="Recebimento via PIX" animation="zoom" *ngIf="showReceivePix" (close)="closeReceivePix('Cancelar')"
[minWidth]="250" [width]="450">
<div *ngIf="!showQrCode">
<form class="k-form" [formGroup]="formReceivePix">
<kendo-formfield showHints="initial">
@@ -364,11 +238,7 @@
</div>
<div class="row w-100 mb-3">
<div class="col-12">
<kendo-textbox
readonly="true"
[value]="qrCodePix"
[selectOnFocus]="true"
></kendo-textbox>
<kendo-textbox readonly="true" [value]="qrCodePix" [selectOnFocus]="true"></kendo-textbox>
</div>
</div>
<kendo-dialog-actions>

View File

@@ -239,7 +239,9 @@ export class OrdersComponent implements OnInit, OnDestroy {
}
openPrintOrder() {
this.urlPrintOrder = 'http://10.1.1.205:8068/Viewer/{action}?orderId=' +
//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.orderNumber + '&model=' + this.modelPrintOrder;
this.titleInformation = 'Gravar pedido de venda';
this.openedPrintOrder = true;
@@ -258,7 +260,7 @@ export class OrdersComponent implements OnInit, OnDestroy {
}
openPrintReceivePix() {
this.urlPrintCreditPix = 'http://10.1.1.205:8068/Viewer/{action}?order=' +
this.urlPrintCreditPix = 'http://172.35.0.219:8068/Viewer/{action}?order=' +
this.orderNumber;
this.titleInformation = 'Recibo pagamento via PIX';
this.openedPrintReceivePix = true;

View File

@@ -34,7 +34,7 @@ export class PreorderComponent implements OnInit {
formModelPreOrder: FormGroup;
preOrderNumber: number;
openedModelPrintOrder = false;
urlPrintPreOrder = 'http://10.1.1.205:8068/Viewer/{action}?order=';
urlPrintPreOrder = 'http://172.35.0.219:8068/Viewer/{action}?order=';
showInformationCreateOrder = false;
openedPrintPreOrder = false;
public windowState: WindowState = 'maximized';
@@ -207,7 +207,7 @@ export class PreorderComponent implements OnInit {
openPrintPreOrder() {
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
this.urlPrintPreOrder = 'http://10.1.1.205:8068/Viewer/{action}?order=' +
this.urlPrintPreOrder = 'http://172.35.0.219:8068/Viewer/{action}?order=' +
this.preOrderNumber + '&model=' + this.modelPrintPreOrder;
this.openedPrintPreOrder = true;
}

View File

@@ -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;

View File

@@ -28,7 +28,7 @@ export class ShoppingService {
constructor(
private httpClient: HttpClient,
private messageService: MessageService
) {}
) { }
getShoppingItems(idCart: string): Observable<ShoppingItem[]> {
if (idCart == null || idCart === '') {
@@ -72,7 +72,7 @@ export class ShoppingService {
updateShopping(shopping: Shopping) {
const resp = this.httpClient
.put<Shopping>(`${environment.url}shopping/${shopping.id}`, shopping)
.put<Shopping>(`${environment.url}shopping/cart`, shopping)
.pipe(
map((response) => {
console.log('Retorno atualização item: ' + response);

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 921 KiB

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 KiB

View File

@@ -11,8 +11,8 @@ export const environment = {
// url: 'http://10.1.1.210:8065/api/v1/',
// url: 'http://172.35.0.216:8065/api/v1/',
//url: 'http://10.1.1.23:8065/api/v1/',
url: 'https://api.vendaweb.simplifiquehc.com.br/api/v1/',
// url: 'http://10.1.1.124:8065/api/v1/',
//url: 'https://api.vendaweb.simplifiquehc.com.br/api/v1/',
url: 'http://localhost:8067/api/v1/',
// URL_PIX: 'http://10.1.1.205:8078/api/v1/',
URL_PIX: 'http://10.1.1.205:8078/api/v1/',

View File

@@ -38,7 +38,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<script src="assets/env.js"></script>
<title>Plataforma Smart</title>
<title>Plataforma Smarts</title>
</head>
<body>
<app-root></app-root>