Compare commits

...

45 Commits

Author SHA1 Message Date
joelson
769af04587 fix: update cart sales print viewer urls 2026-02-23 09:14:26 -03:00
Gitea Action
7bc186cbe2 chore: update image tag to b8cda80 [skip ci] 2026-02-20 13:11:29 +00:00
Luis Eduardo Estevao
b8cda807ef Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 5m59s
2026-02-20 10:04:51 -03:00
Luis Eduardo Estevao
8bf7331837 feat: implement new shopping cart sales component with responsive Kendo UI grid for item display and management. 2026-02-20 10:04:44 -03:00
Gitea Action
1a26b75cb0 chore: update image tag to de46ca8 [skip ci] 2026-02-19 13:18:38 +00:00
Luis Eduardo Estevao
de46ca882d Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 5m56s
2026-02-19 10:12:40 -03:00
Luis Eduardo Estevao
e464c54c97 feat: add initial header components for sales and admin views, including user info, logout, and a shopping cart for sales. 2026-02-19 10:12:34 -03:00
Gitea Action
6292312e1d chore: update image tag to f300dc0 [skip ci] 2026-02-19 13:09:12 +00:00
Luis Eduardo Estevao
f300dc07d1 Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 6m48s
2026-02-19 10:02:20 -03:00
Luis Eduardo Estevao
1cb849a299 feat: add cart sales component and lookup service for managing sales orders. Add parameter customerId find payment plans. 2026-02-19 10:02:15 -03:00
Gitea Action
f1f76a8a9a chore: update image tag to f04f5f5 [skip ci] 2026-02-18 16:38:13 +00:00
Luis Eduardo Estevao
f04f5f5215 Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 5m33s
2026-02-18 13:32:19 -03:00
Luis Eduardo Estevao
210a26cb82 feat: Implement partner management UI, customer creation modal, and orders page logic. 2026-02-18 13:32:14 -03:00
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
Luis Eduardo Estevao
806ac42eae feat: add cart sales component with Kendo UI grid for displaying shopping items.
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 7m25s
2026-02-10 11:09:26 -03:00
Luis Eduardo Estevao
461b3b01f7 feat: implement cart sales component for managing shopping items, customer details, and order processing. 2026-02-10 11:09:10 -03:00
Gitea Action
3471dba3aa chore: update image tag to e14157c [skip ci] 2026-01-29 23:45:34 +00:00
e14157cb3a chore: restore api base URL to https
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 6m15s
2026-01-29 20:39:17 -03:00
Gitea Action
ce41657398 chore: update image tag to d6249ca [skip ci] 2026-01-29 23:01:35 +00:00
d6249ca40f chore: update branding assets and API URLs
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 6m27s
2026-01-29 19:53:06 -03:00
Gitea Action
fa3b5dc9d2 chore: update image tag to bbc5ca8 [skip ci] 2026-01-29 20:15:52 +00:00
bbc5ca8856 chore: point frontend to api.vendaweb.simplifiquehc.com.br
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 7m12s
2026-01-29 17:08:38 -03:00
Gitea Action
d64a53774d chore: update image tag to 76095c1 [skip ci] 2026-01-29 20:04:27 +00:00
76095c15d0 chore: drop legacy browsers and speed up docker builds
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 6m40s
2026-01-29 16:57:40 -03:00
750645fdb0 chore: reduce portal replicas to 2
Some checks failed
Build (develop) / Promote (main) / build-and-push-deploy (push) Has been cancelled
2026-01-29 16:47:02 -03:00
Gitea Action
cc1ab1b6a6 chore: update image tag to 510bf7a [skip ci] 2026-01-29 19:21:20 +00:00
510bf7a530 fix: non-interactive registry login in gitea workflow
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 13m11s
2026-01-29 16:02:58 -03:00
0fd088a222 chore: add k8s manifests and deploy workflow for portal
Some checks failed
Build (develop) / Promote (main) / build-and-push-deploy (push) Failing after 8s
2026-01-29 16:00:14 -03:00
39 changed files with 895 additions and 1959 deletions

14
.dockerignore Normal file
View File

@@ -0,0 +1,14 @@
.git
.gitea
node_modules
dist
coverage
.angular
.cache
npm-debug.log
yarn-debug.log
yarn-error.log
Dockerfile*
docker-compose*.yml
README*
*.md

View File

@@ -1,25 +1,70 @@
on: [push] name: Build (develop) / Promote (main)
on:
push:
branches: [main]
jobs: jobs:
build-push: build-and-push-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login Harbor - name: Build and Push
run: echo "${{ secrets.HARBOR_PASSWORD }}" | docker login 172.35.0.216 -u ${{ secrets.HARBOR_USERNAME }} --password-stdin
- name: Build/Push with Tagging
run: | run: |
REPO="172.35.0.216/library/vendaweb-portal" set -euo pipefail
VERSION="v${{ gitea.run_number }}" REGISTRY="172.35.0.216:3000"
IMAGE_NAME="$REGISTRY/simplifique/vendaweb-portal"
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
echo "Iniciando build da versão: $VERSION" REGISTRY_USERNAME="${{ secrets.REGISTRY_USERNAME }}"
if [ -z "$REGISTRY_USERNAME" ]; then
REGISTRY_USERNAME="${{ github.actor }}"
fi
docker build -t $REPO:$VERSION -t $REPO:latest . REGISTRY_PASSWORD="${{ secrets.REGISTRY_PASSWORD }}"
if [ -z "$REGISTRY_PASSWORD" ]; then
REGISTRY_PASSWORD="${{ secrets.K8S }}"
fi
docker push $REPO:$VERSION if [ -z "$REGISTRY_USERNAME" ] || [ -z "$REGISTRY_PASSWORD" ]; then
docker push $REPO:latest echo "Missing registry credentials. Set secrets.REGISTRY_USERNAME + secrets.REGISTRY_PASSWORD (recommended)"
echo "(fallback supported: secrets.K8S as password)"
exit 1
fi
- name: Webhook Portainer printf '%s' "$REGISTRY_PASSWORD" | docker login "$REGISTRY" -u "$REGISTRY_USERNAME" --password-stdin
run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_FRONT }}"
docker build -t "$IMAGE_NAME:$SHA_TAG" -t "$IMAGE_NAME:latest" .
docker push "$IMAGE_NAME:$SHA_TAG"
docker push "$IMAGE_NAME:latest"
- name: Update Manifest and Push to Git
run: |
set -euo pipefail
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
MANIFEST_FILE="k8s/overlays/prod/deployment-image-digest-patch.yaml"
# 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 "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

@@ -5,8 +5,10 @@
# You can see what browsers were selected by your queries by running: # You can see what browsers were selected by your queries by running:
# npx browserslist # npx browserslist
> 0.5% last 2 Chrome versions
last 2 versions last 2 Edge versions
Firefox ESR last 2 Firefox versions
last 2 Safari versions
not dead not dead
not IE 9-11 # For IE 9-11 support, remove 'not'. not op_mini all
not IE 9-11

View File

@@ -0,0 +1,27 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: vendaweb-portal-prod
namespace: argocd
spec:
project: default
source:
repoURL: https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal.git
targetRevision: main
path: k8s/overlays/prod
destination:
server: https://kubernetes.default.svc
namespace: vendawebfront-prod
syncPolicy:
automated:
selfHeal: true
prune: true
retry:
limit: 2
backoff:
duration: 5s
factor: 2
maxDuration: 3m
syncOptions:
- CreateNamespace=true
- PruneLast=true

7
k8s/base/configmap.yaml Normal file
View File

@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: vendaweb-portal-config
data:
API_URL: "https://vendaweb-api.example.com"
URL_PIX: "https://pix.example.com"

69
k8s/base/deployment.yaml Normal file
View File

@@ -0,0 +1,69 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vendaweb-portal
labels:
app: vendaweb-portal
spec:
replicas: 3
revisionHistoryLimit: 5
minReadySeconds: 10
progressDeadlineSeconds: 600
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: vendaweb-portal
template:
metadata:
labels:
app: vendaweb-portal
spec:
imagePullSecrets:
- name: gitea-auth
terminationGracePeriodSeconds: 30
containers:
- name: portal
image: 172.35.0.216:3000/simplifique/vendaweb-portal:latest
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
envFrom:
- configMapRef:
name: vendaweb-portal-config
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 20
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 6
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 6
startupProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 24
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi

View File

@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
- configmap.yaml

15
k8s/base/service.yaml Normal file
View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: vendaweb-portal
labels:
app: vendaweb-portal
spec:
type: ClusterIP
selector:
app: vendaweb-portal
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP

View File

@@ -0,0 +1,10 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vendaweb-portal
spec:
template:
spec:
containers:
- name: portal
image: 172.35.0.216:3000/simplifique/vendaweb-portal:b8cda80

View File

@@ -0,0 +1,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vendaweb-portal
spec:
replicas: 2

View File

@@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: vendawebfront-prod
resources:
- ../../base
patches:
- path: service-patch.yaml
- path: deployment-prod-patch.yaml
- path: deployment-image-digest-patch.yaml

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: vendaweb-portal
spec:
type: NodePort
ports:
- name: http
port: 80
targetPort: 80
nodePort: 30002

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -65,6 +65,7 @@ import { OrderDiscount } from '../store/models/order-discount.model';
import { SaleState } from '../store/models/sale-state.model'; import { SaleState } from '../store/models/sale-state.model';
import { ShoppingItem } from '../store/models/shopping-item'; import { ShoppingItem } from '../store/models/shopping-item';
import { Shopping } from '../store/models/shopping.model'; import { Shopping } from '../store/models/shopping.model';
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
export interface JsonModel { export interface JsonModel {
shippingDate: string; shippingDate: string;
@@ -79,8 +80,7 @@ export interface JsonModel {
], ],
}) })
export class CartSalesComponent export class CartSalesComponent
implements OnInit, AfterViewInit, OnDestroy, OnChanges implements OnInit, AfterViewInit, OnDestroy, OnChanges {
{
public containerRef: ViewContainerRef; public containerRef: ViewContainerRef;
public resultQuestion; public resultQuestion;
@@ -275,13 +275,13 @@ export class CartSalesComponent
private readonly messageService: MessageService, private readonly messageService: MessageService,
private readonly productService: ProductService, private readonly productService: ProductService,
private readonly customerService: CustomerService private readonly customerService: CustomerService
) {} ) { }
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {
this.loadShopping(); this.loadShopping();
} }
ngAfterViewInit(): void {} ngAfterViewInit(): void { }
ngOnDestroy(): void { ngOnDestroy(): void {
if (this.shoppingSubscription) { if (this.shoppingSubscription) {
@@ -605,6 +605,8 @@ export class CartSalesComponent
this.stores.find((s) => s.id === this.authService.getStore()) this.stores.find((s) => s.id === this.authService.getStore())
); );
localStorage.setItem('invoiceStore', saveStoreInvoice); localStorage.setItem('invoiceStore', saveStoreInvoice);
this.updateCart(this.shoppingService.getCart());
} }
this.formPayment.patchValue({ this.formPayment.patchValue({
invoiceStore: JSON.parse(saveStoreInvoice), invoiceStore: JSON.parse(saveStoreInvoice),
@@ -631,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 (
@@ -699,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 ?',
@@ -714,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);
@@ -721,6 +725,7 @@ export class CartSalesComponent
console.log('criando orçamento'); console.log('criando orçamento');
this.createPreOrder(); this.createPreOrder();
} }
this.isLoadingPreOrder = false;
} }
}); });
} }
@@ -751,6 +756,7 @@ export class CartSalesComponent
if (localStorage.getItem('paymentPlan') === 'undefined') { if (localStorage.getItem('paymentPlan') === 'undefined') {
localStorage.setItem('paymentPlan', JSON.stringify(paymentPlan)); localStorage.setItem('paymentPlan', JSON.stringify(paymentPlan));
this.selectPaymentPlan = paymentPlan; this.selectPaymentPlan = paymentPlan;
this.updateCart(this.shoppingService.getCart());
this.confirmChangePaymentPlan(true); this.confirmChangePaymentPlan(true);
} else { } else {
this.selectPaymentPlan = paymentPlan; this.selectPaymentPlan = paymentPlan;
@@ -768,6 +774,7 @@ export class CartSalesComponent
'paymentPlan', 'paymentPlan',
JSON.stringify(this.selectPaymentPlan) JSON.stringify(this.selectPaymentPlan)
); );
this.updateCart(this.shoppingService.getCart());
const billing = JSON.parse(localStorage.getItem('billing')) as Billing; const billing = JSON.parse(localStorage.getItem('billing')) as Billing;
this.idPaymentPlan = this.selectPaymentPlan.codplpag; this.idPaymentPlan = this.selectPaymentPlan.codplpag;
this.subscriptionUpdatePayment = this.shoppingService this.subscriptionUpdatePayment = this.shoppingService
@@ -795,19 +802,23 @@ 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)),
tap((planos) => console.log(planos)) tap((planos) => console.log(planos))
) )
.subscribe(); .subscribe();
this.updateCart(this.shoppingService.getCart());
} }
setPartner(partner: any) { setPartner(partner: any) {
@@ -816,6 +827,7 @@ export class CartSalesComponent
setInvoiceStore(invoiceStore: any) { setInvoiceStore(invoiceStore: any) {
localStorage.setItem('invoiceStore', JSON.stringify(invoiceStore)); localStorage.setItem('invoiceStore', JSON.stringify(invoiceStore));
this.updateCart(this.shoppingService.getCart());
} }
isInvoiceStore9Or10() { isInvoiceStore9Or10() {
@@ -931,14 +943,14 @@ export class CartSalesComponent
const customer = JSON.parse(localStorage.getItem('customer')) as Customer; const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
if (localStorage.getItem('customer') != undefined) { if (localStorage.getItem('customer') != undefined) {
if (customer.place.id == 19) { // if (customer.place.id == 19) {
this.titleInformation = 'Pedido de venda'; // this.titleInformation = 'Pedido de venda';
this.messageInformation = 'ATENÇÃO! Cliente com praça do E-COMMERCE!'; // this.messageInformation = 'ATENÇÃO! Cliente com praça do E-COMMERCE!';
this.informationDescription = // this.informationDescription =
'Altere a praça do cliente pela opção NOVO CLIENTE para continuar.'; // 'Altere a praça do cliente pela opção NOVO CLIENTE para continuar.';
this.showInformation = true; // this.showInformation = true;
return; // return;
} // }
if ( if (
customer.place.name == 'INATIVO' || customer.place.name == 'INATIVO' ||
customer.place.name == 'INATIVA' customer.place.name == 'INATIVA'
@@ -1001,6 +1013,7 @@ export class CartSalesComponent
} }
this.updateFormCustomer(result); this.updateFormCustomer(result);
localStorage.setItem('customer', JSON.stringify(result)); localStorage.setItem('customer', JSON.stringify(result));
this.updateCart(this.shoppingService.getCart());
this.updateTaxDelivery(); this.updateTaxDelivery();
} }
} }
@@ -1579,6 +1592,49 @@ export class CartSalesComponent
} }
} }
public updateCart(
cartId: string
) {
console.log('Atualizando carrinho: ' + cartId);
this.shoppingService.getShopping(cartId).subscribe((shopping) => {
if (shopping) {
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) => {
console.log('Cart updated successfully:', response);
this.store.dispatch(
new LoadShoppingAction(this.shoppingService.getCart())
);
this.loadFormOrder();
},
(error) => {
console.error('Error updating cart:', error);
}
);
} else {
console.error('Shopping cart not found for ID:', cartId);
}
});
}
showDialogSelectAddress() { showDialogSelectAddress() {
if (this.customer == null) { if (this.customer == null) {
this.titleInformation = 'Selecionar endereço de entrega'; this.titleInformation = 'Selecionar endereço de entrega';
@@ -1597,6 +1653,7 @@ export class CartSalesComponent
this.showSelectAddress = false; this.showSelectAddress = false;
if (result != null) { if (result != null) {
localStorage.setItem('address', JSON.stringify(result)); localStorage.setItem('address', JSON.stringify(result));
this.updateCart(this.shoppingService.getCart());
this.updateFormAddress(result); this.updateFormAddress(result);
this.updateTaxDelivery(); this.updateTaxDelivery();
} }
@@ -1654,8 +1711,7 @@ export class CartSalesComponent
this.informationDelivery = `Pedido com data de entrega para o dia this.informationDelivery = `Pedido com data de entrega para o dia
${dataTexto} ${dataTexto}
- Tipo de entrega: ${ - Tipo de entrega: ${dataDelivery.scheduleDelivery ? 'PROGRAMADA' : 'NORMAL'
dataDelivery.scheduleDelivery ? 'PROGRAMADA' : 'NORMAL'
}`; }`;
} }
@@ -2299,6 +2355,7 @@ export class CartSalesComponent
if (action === 'Sim') { if (action === 'Sim') {
if (this.customer !== undefined && this.customer.customerId !== 1) { if (this.customer !== undefined && this.customer.customerId !== 1) {
localStorage.setItem('customer', JSON.stringify(this.customer)); localStorage.setItem('customer', JSON.stringify(this.customer));
this.updateCart(this.shoppingService.getCart());
this.updateFormCustomer(this.customer); this.updateFormCustomer(this.customer);
} else { } else {
localStorage.setItem( localStorage.setItem(
@@ -2336,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://10.1.1.205:8068/Viewer/{action}?order=' + 'https://portainer.simplifiquehc.com.br/Viewer/{action}?order=' +
this.preOrderNumber + this.preOrderNumber +
'&model=' + '&model=' +
this.modelPrintPreOrder; this.modelPrintPreOrder;
@@ -2350,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://10.1.1.205:8068/Viewer/{action}?orderId=' + 'https://portainer.simplifiquehc.com.br/Viewer/{action}?orderId=' +
this.orderNumber + this.orderNumber +
'&model=' + '&model=' +
this.modelPrintOrder; this.modelPrintOrder;

View File

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

View File

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

View File

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

View File

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

View File

@@ -239,7 +239,9 @@ export class OrdersComponent implements OnInit, OnDestroy {
} }
openPrintOrder() { 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.orderNumber + '&model=' + this.modelPrintOrder;
this.titleInformation = 'Gravar pedido de venda'; this.titleInformation = 'Gravar pedido de venda';
this.openedPrintOrder = true; this.openedPrintOrder = true;
@@ -258,7 +260,7 @@ export class OrdersComponent implements OnInit, OnDestroy {
} }
openPrintReceivePix() { 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.orderNumber;
this.titleInformation = 'Recibo pagamento via PIX'; this.titleInformation = 'Recibo pagamento via PIX';
this.openedPrintReceivePix = true; this.openedPrintReceivePix = true;

View File

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

View File

@@ -16,5 +16,6 @@ export class Shopping {
public totpeso: number; public totpeso: number;
public codfornecfrete: number; public codfornecfrete: number;
public codtabelafrete: number; public codtabelafrete: number;
public saleStore: string;
} }

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -1,7 +1,7 @@
export const environment = { export const environment = {
production: true, production: true,
// url: 'http://10.1.1.124:8065/api/v1/', // url: 'http://10.1.1.124:8065/api/v1/',
url: 'http://172.35.0.216:8065/api/v1/', url: 'https://api.vendaweb.simplifiquehc.com.br/api/v1/',
// url: 'http://vendaweb.jurunense.com.br/api/v1/', // url: 'http://vendaweb.jurunense.com.br/api/v1/',
URL_PIX: 'http://10.1.1.205:8078/api/v1/', URL_PIX: 'http://10.1.1.205:8078/api/v1/',
firebase: { firebase: {

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
src/favicon_juru.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

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