oxpi-nglib 1.0.2 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/cadastros/produtos/produto-add-dialog/produto-add-dialog.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos/produto-busca-filtros-dialog/produto-busca-filtros-dialog.component.mjs +3 -3
- package/esm2020/lib/cadastros/produtos/produto-edit-dialog/produto-edit-dialog.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos/produto-form/produto-form.component.mjs +3 -3
- package/esm2020/lib/cadastros/produtos/produtos/produtos.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-add-dialog/produto-categoria-cardapio-add-dialog.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-edit-dialog/produto-categoria-cardapio-edit-dialog.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-selecao-dialog/produto-categoria-cardapio-selecao-dialog.component.mjs +3 -3
- package/esm2020/lib/cadastros/produtos-categoria-cardapio/produtos-categorias-cardapio/produtos-categorias-cardapio.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos-grupos/mover-grupo-dialog/mover-grupo-dialog.component.mjs +3 -3
- package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-add-dialog/produto-grupo-add-dialog.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-edit-dialog/produto-grupo-edit-dialog.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-form/produto-grupo-form.component.mjs +3 -3
- package/esm2020/lib/cadastros/produtos-grupos/produto-grupo-selecao-dialog/produto-grupo-selecao-dialog.component.mjs +3 -3
- package/esm2020/lib/cadastros/produtos-grupos/produtos-grupos/produtos-grupos.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos-ncm-dialog/produtos-ncm-dialog.component.mjs +3 -3
- package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-add-dialog/produto-subgrupo-add-dialog.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-edit-dialog/produto-subgrupo-edit-dialog.component.mjs +5 -5
- package/esm2020/lib/cadastros/produtos-subgrupos/produto-subgrupo-selecao-dialog/produto-subgrupo-selecao-dialog.component.mjs +3 -3
- package/esm2020/lib/cadastros/produtos-subgrupos/produtos-subgrupos/produtos-subgrupos.component.mjs +5 -5
- package/esm2020/lib/models/entidades/produto-grupo.mjs +2 -2
- package/esm2020/lib/models/entidades/produto.mjs +2 -2
- package/esm2020/public-api.mjs +26 -1
- package/fesm2015/oxpi-nglib.mjs +1468 -1468
- package/fesm2015/oxpi-nglib.mjs.map +1 -1
- package/fesm2020/oxpi-nglib.mjs +1111 -1111
- package/fesm2020/oxpi-nglib.mjs.map +1 -1
- package/lib/cadastros/produtos/produto-add-dialog/produto-add-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos/produto-busca-filtros-dialog/produto-busca-filtros-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos/produto-edit-dialog/produto-edit-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos/produto-form/produto-form.component.d.ts +1 -1
- package/lib/cadastros/produtos/produtos/produtos.component.d.ts +1 -1
- package/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-add-dialog/produto-categoria-cardapio-add-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-edit-dialog/produto-categoria-cardapio-edit-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-categoria-cardapio/produto-categoria-cardapio-selecao-dialog/produto-categoria-cardapio-selecao-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-categoria-cardapio/produtos-categorias-cardapio/produtos-categorias-cardapio.component.d.ts +1 -1
- package/lib/cadastros/produtos-grupos/mover-grupo-dialog/mover-grupo-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-grupos/produto-grupo-add-dialog/produto-grupo-add-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-grupos/produto-grupo-edit-dialog/produto-grupo-edit-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-grupos/produto-grupo-form/produto-grupo-form.component.d.ts +1 -1
- package/lib/cadastros/produtos-grupos/produto-grupo-selecao-dialog/produto-grupo-selecao-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-grupos/produtos-grupos/produtos-grupos.component.d.ts +1 -1
- package/lib/cadastros/produtos-ncm-dialog/produtos-ncm-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-subgrupos/produto-subgrupo-add-dialog/produto-subgrupo-add-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-subgrupos/produto-subgrupo-edit-dialog/produto-subgrupo-edit-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-subgrupos/produto-subgrupo-selecao-dialog/produto-subgrupo-selecao-dialog.component.d.ts +1 -1
- package/lib/cadastros/produtos-subgrupos/produtos-subgrupos/produtos-subgrupos.component.d.ts +1 -1
- package/lib/models/entidades/produto-grupo.d.ts +1 -1
- package/lib/models/entidades/produto.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +25 -0
package/fesm2020/oxpi-nglib.mjs
CHANGED
|
@@ -17,11 +17,11 @@ import * as i4 from '@angular/material/select';
|
|
|
17
17
|
import { MatSelectModule } from '@angular/material/select';
|
|
18
18
|
import * as i5 from '@angular/material/core';
|
|
19
19
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
20
|
+
import * as i12 from '@angular/material/autocomplete';
|
|
21
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
20
22
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
21
23
|
import * as i1$2 from '@angular/platform-browser';
|
|
22
24
|
import { BrowserModule } from '@angular/platform-browser';
|
|
23
|
-
import * as i12 from '@angular/material/autocomplete';
|
|
24
|
-
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
25
25
|
import * as FileSaver from 'file-saver';
|
|
26
26
|
|
|
27
27
|
function valTextEmpty(v) {
|
|
@@ -43,7 +43,7 @@ function valNumberMin(v, min) {
|
|
|
43
43
|
return v <= min;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
function valida
|
|
46
|
+
function valida(item, focus) {
|
|
47
47
|
if (valTextEmpty(item.nome)) {
|
|
48
48
|
focus.set('nome');
|
|
49
49
|
return 'Digite um nome válido.';
|
|
@@ -538,7 +538,7 @@ class FuncionarioAddDialogComponent {
|
|
|
538
538
|
salvar() {
|
|
539
539
|
if (this.model)
|
|
540
540
|
return;
|
|
541
|
-
const valMsg = valida
|
|
541
|
+
const valMsg = valida(this.model, this.focus);
|
|
542
542
|
if (valMsg) {
|
|
543
543
|
this.notification.showMsgError(valMsg);
|
|
544
544
|
return;
|
|
@@ -592,7 +592,7 @@ class FuncionarioEditDialogComponent {
|
|
|
592
592
|
salvar() {
|
|
593
593
|
if (!this.model)
|
|
594
594
|
return;
|
|
595
|
-
const valMsg = valida
|
|
595
|
+
const valMsg = valida(this.model, this.focus);
|
|
596
596
|
if (valMsg) {
|
|
597
597
|
this.notification.showMsgError(valMsg);
|
|
598
598
|
return;
|
|
@@ -1136,7 +1136,7 @@ class FuncionariosComponent {
|
|
|
1136
1136
|
const item = this.selectedItem;
|
|
1137
1137
|
if (!item)
|
|
1138
1138
|
return;
|
|
1139
|
-
const valMsg = valida
|
|
1139
|
+
const valMsg = valida(item, this.focus);
|
|
1140
1140
|
if (valMsg) {
|
|
1141
1141
|
this.notification.showMsgError(valMsg);
|
|
1142
1142
|
return;
|
|
@@ -1159,794 +1159,345 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
1159
1159
|
args: [{ selector: 'ox-funcionarios', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Funcion\u00E1rios</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um funcion\u00E1rio no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-funcionario-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-funcionario-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"] }]
|
|
1160
1160
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
1161
1161
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1162
|
+
var ModalidadeBaseICMS;
|
|
1163
|
+
(function (ModalidadeBaseICMS) {
|
|
1164
|
+
ModalidadeBaseICMS[ModalidadeBaseICMS["MargemValorAgregado"] = 0] = "MargemValorAgregado";
|
|
1165
|
+
ModalidadeBaseICMS[ModalidadeBaseICMS["PautaValor"] = 1] = "PautaValor";
|
|
1166
|
+
ModalidadeBaseICMS[ModalidadeBaseICMS["Pre\u00E7oTabeladoMax"] = 2] = "Pre\u00E7oTabeladoMax";
|
|
1167
|
+
ModalidadeBaseICMS[ModalidadeBaseICMS["ValorDaOpera\u00E7\u00E3o"] = 3] = "ValorDaOpera\u00E7\u00E3o";
|
|
1168
|
+
})(ModalidadeBaseICMS || (ModalidadeBaseICMS = {}));
|
|
1169
|
+
function createProduct() {
|
|
1170
|
+
return {
|
|
1171
|
+
id: 0,
|
|
1172
|
+
nome: '',
|
|
1173
|
+
unidade: 'UN',
|
|
1174
|
+
precoCusto: 0,
|
|
1175
|
+
precoVenda: 0,
|
|
1176
|
+
precoFuncionario: 0,
|
|
1177
|
+
estoqueMinimo: 0,
|
|
1178
|
+
referencia: '',
|
|
1179
|
+
aliquotaICMS: null,
|
|
1180
|
+
ncm: null,
|
|
1181
|
+
grupoId: 0,
|
|
1182
|
+
grupoNome: null,
|
|
1183
|
+
subgrupoId: 0,
|
|
1184
|
+
subgrupoNome: null,
|
|
1185
|
+
quantidadeSuite: 0,
|
|
1186
|
+
estoqueControlado: true,
|
|
1187
|
+
imprimiCozinha: true,
|
|
1188
|
+
imprimeCorredor: false,
|
|
1189
|
+
verNaRecepcao: true,
|
|
1190
|
+
prato: false,
|
|
1191
|
+
isAtivo: true,
|
|
1192
|
+
isComposto: true,
|
|
1193
|
+
isIngrediente: true,
|
|
1194
|
+
omiteCliente: false,
|
|
1195
|
+
estoqueRecepcao: false,
|
|
1196
|
+
estoqueRecepcaoQuantidade: 0,
|
|
1197
|
+
gtin: null,
|
|
1198
|
+
cfop: null,
|
|
1199
|
+
csT_icms: null,
|
|
1200
|
+
modBC_icms: 0,
|
|
1201
|
+
pICMS_icms: null,
|
|
1202
|
+
pRedBC_icms: null,
|
|
1203
|
+
pfcP_icms: null,
|
|
1204
|
+
vbcfcP_icms: null,
|
|
1205
|
+
pfcpsT_icms: null,
|
|
1206
|
+
pRedBCEfet_icms: null,
|
|
1207
|
+
vbcEfet_icms: null,
|
|
1208
|
+
picmsEfet_icms: null,
|
|
1209
|
+
vicmsEfet_icms: null,
|
|
1210
|
+
csT_pis: null,
|
|
1211
|
+
vbC_pis: null,
|
|
1212
|
+
ppiS_pis: null,
|
|
1213
|
+
csT_cofins: null,
|
|
1214
|
+
vbC_cofins: null,
|
|
1215
|
+
pcofinS_cofins: null,
|
|
1216
|
+
psT_icms: null,
|
|
1217
|
+
vbcstRet_icms: null,
|
|
1218
|
+
vicmsSubstituto_icms: null,
|
|
1219
|
+
vicmsstRet_icms: null,
|
|
1220
|
+
emiteNFCe: false,
|
|
1221
|
+
cest: null,
|
|
1222
|
+
vbcfcpsT_icms: null,
|
|
1223
|
+
vbcfcpstRet_icms: null,
|
|
1224
|
+
pfcpstRet_icms: null,
|
|
1225
|
+
sitTrib: null,
|
|
1226
|
+
setorSubEstoqueId: null,
|
|
1227
|
+
setorSubEstoqueNome: null,
|
|
1228
|
+
setorPrincipalId: null,
|
|
1229
|
+
setorPrincipalNome: null,
|
|
1230
|
+
qtdMinSubEstoque: null,
|
|
1231
|
+
disponivelCardapio: false,
|
|
1232
|
+
categoriaCardapioId: null,
|
|
1233
|
+
categoriaCardapioNome: null,
|
|
1234
|
+
descricao: null,
|
|
1235
|
+
enviadoPC: false,
|
|
1236
|
+
qbcProd_cofins: null,
|
|
1237
|
+
vAliqProd_cofins: null
|
|
1238
|
+
};
|
|
1239
|
+
}
|
|
1240
|
+
;
|
|
1241
|
+
function validaProduto(item, focus) {
|
|
1242
|
+
if (valTextEmpty(item.nome)) {
|
|
1243
|
+
focus.set('nome');
|
|
1244
|
+
return 'Digite um nome válido.';
|
|
1168
1245
|
}
|
|
1169
|
-
|
|
1246
|
+
if (valNumberEmpty(item.grupoId)) {
|
|
1247
|
+
return 'Escolha um grupo de produto.';
|
|
1170
1248
|
}
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
this.checked = !this.checked;
|
|
1174
|
-
this.changed.emit(this.checked);
|
|
1249
|
+
if (valNumberEmpty(item.subgrupoId)) {
|
|
1250
|
+
return 'Escolha um subgrupo de produto.';
|
|
1175
1251
|
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: CheckButtonComponent, decorators: [{
|
|
1180
|
-
type: Component,
|
|
1181
|
-
args: [{ selector: 'ox-check-button', host: {
|
|
1182
|
-
'[class.checked]': "checked",
|
|
1183
|
-
}, template: "<ng-content></ng-content>", styles: [":host{padding:4px 8px;cursor:pointer;white-space:nowrap;color:#666;font-size:small;text-transform:uppercase;background-color:#ececec}:host:hover{background:rgba(0,0,0,.1)}:host(.checked){background:var(--app-tool-accent-color, black);color:#fff;box-shadow:0 8px 16px #0000001a}\n"] }]
|
|
1184
|
-
}], ctorParameters: function () { return []; }, propDecorators: { checked: [{
|
|
1185
|
-
type: Input
|
|
1186
|
-
}], radioBehavior: [{
|
|
1187
|
-
type: Input
|
|
1188
|
-
}], changed: [{
|
|
1189
|
-
type: Output
|
|
1190
|
-
}], onClick: [{
|
|
1191
|
-
type: HostListener,
|
|
1192
|
-
args: ['click', ['$event']]
|
|
1193
|
-
}] } });
|
|
1194
|
-
|
|
1195
|
-
class ImageViewerComponent {
|
|
1196
|
-
constructor() {
|
|
1197
|
-
this.infos = [];
|
|
1198
|
-
this._isOpen = false;
|
|
1199
|
-
this.paginaAtual = 0;
|
|
1200
|
-
this.disableBack = false;
|
|
1201
|
-
this.disableNext = false;
|
|
1202
|
-
this.isOpenChange = new EventEmitter();
|
|
1252
|
+
if (valTextEmpty(item.unidade)) {
|
|
1253
|
+
focus.set('unidade');
|
|
1254
|
+
return 'Digite uma unidade.';
|
|
1203
1255
|
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1256
|
+
if (item.disponivelCardapio) {
|
|
1257
|
+
if (valNumberEmpty(item.categoriaCardapioId))
|
|
1258
|
+
return 'Escolha uma categoria do cardápio digital.';
|
|
1259
|
+
if (valTextEmpty(item.descricao)) {
|
|
1260
|
+
focus.set('descricao');
|
|
1261
|
+
return 'Digite uma descrição para o cardápio digital.';
|
|
1262
|
+
}
|
|
1206
1263
|
}
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1264
|
+
return null;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
class NumberParser {
|
|
1268
|
+
constructor(setPropFunc, getPropFunc, min, max, triggerMilliseconds = 1500) {
|
|
1269
|
+
this.setPropFunc = setPropFunc;
|
|
1270
|
+
this.getPropFunc = getPropFunc;
|
|
1271
|
+
this.min = min;
|
|
1272
|
+
this.max = max;
|
|
1273
|
+
this.parsed = false;
|
|
1274
|
+
this._parseTrigger = new LazyTrigger(() => this.parseValor(), triggerMilliseconds);
|
|
1210
1275
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1276
|
+
parse(vlr) {
|
|
1277
|
+
this.valor = vlr;
|
|
1278
|
+
this.parsed = false;
|
|
1279
|
+
this._parseTrigger.fire();
|
|
1213
1280
|
}
|
|
1214
|
-
|
|
1281
|
+
store(vlr) {
|
|
1282
|
+
this.valor = vlr;
|
|
1283
|
+
this.parsed = false;
|
|
1215
1284
|
}
|
|
1216
|
-
|
|
1217
|
-
if (
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1285
|
+
checkout() {
|
|
1286
|
+
if (this.parsed || !this.valor)
|
|
1287
|
+
return;
|
|
1288
|
+
this.parseValor();
|
|
1289
|
+
}
|
|
1290
|
+
parseValor() {
|
|
1291
|
+
if (this.valor === undefined)
|
|
1292
|
+
return;
|
|
1293
|
+
this.parsed = true;
|
|
1294
|
+
const vlrTxt = this.valor.split(",").join(".");
|
|
1295
|
+
;
|
|
1296
|
+
const spTxt = vlrTxt.split(".");
|
|
1297
|
+
let toParseTxt = "";
|
|
1298
|
+
if (spTxt.length > 2) {
|
|
1299
|
+
const chars = vlrTxt.split("");
|
|
1300
|
+
const lastIndex = vlrTxt.lastIndexOf(".");
|
|
1301
|
+
for (let i = 0; i < chars.length; i++) {
|
|
1302
|
+
const c = chars[i];
|
|
1303
|
+
if (c === "." && i != lastIndex)
|
|
1304
|
+
continue;
|
|
1305
|
+
toParseTxt = toParseTxt.concat(c);
|
|
1223
1306
|
}
|
|
1224
1307
|
}
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1308
|
+
else {
|
|
1309
|
+
toParseTxt = vlrTxt;
|
|
1310
|
+
}
|
|
1311
|
+
const vlr = parseFloat(toParseTxt);
|
|
1312
|
+
if (isNaN(vlr) || !this.validaMinMax(vlr)) {
|
|
1313
|
+
const original = this.getPropFunc();
|
|
1314
|
+
this.setPropFunc(0);
|
|
1315
|
+
setTimeout(() => this.setPropFunc(original));
|
|
1316
|
+
}
|
|
1317
|
+
else {
|
|
1318
|
+
this.setPropFunc(vlr);
|
|
1319
|
+
}
|
|
1229
1320
|
}
|
|
1230
|
-
|
|
1231
|
-
this.
|
|
1232
|
-
|
|
1233
|
-
this.
|
|
1321
|
+
validaMinMax(value) {
|
|
1322
|
+
if ((this.min === undefined) && this.max === undefined)
|
|
1323
|
+
return true;
|
|
1324
|
+
if (!(this.min === undefined) && value < this.min)
|
|
1325
|
+
return false;
|
|
1326
|
+
if (!(this.max === undefined) && value > this.max)
|
|
1327
|
+
return false;
|
|
1328
|
+
return true;
|
|
1234
1329
|
}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
function validaProdutoGrupo(item, focus) {
|
|
1333
|
+
if (valTextEmpty(item.nome)) {
|
|
1334
|
+
focus.set('nome');
|
|
1335
|
+
return 'Digite um nome válido.';
|
|
1239
1336
|
}
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1337
|
+
return null;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
class ProdutoGrupoFormComponent {
|
|
1341
|
+
constructor() { }
|
|
1342
|
+
ngOnInit() {
|
|
1243
1343
|
}
|
|
1244
1344
|
}
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
1345
|
+
ProdutoGrupoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1346
|
+
ProdutoGrupoFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"form-group\" *ngIf=\"model\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" cdkFocusInitial tabindex=\"1\">\n</div>", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, decorators: [{
|
|
1248
1348
|
type: Component,
|
|
1249
|
-
args: [{ selector: 'ox-
|
|
1250
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
1251
|
-
type: Input
|
|
1252
|
-
}], infos: [{
|
|
1253
|
-
type: Input
|
|
1254
|
-
}], isOpenChange: [{
|
|
1255
|
-
type: Output
|
|
1256
|
-
}], isOpen: [{
|
|
1349
|
+
args: [{ selector: 'ox-produto-grupo-form', template: "<div class=\"form-group\" *ngIf=\"model\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" cdkFocusInitial tabindex=\"1\">\n</div>", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
1350
|
+
}], ctorParameters: function () { return []; }, propDecorators: { model: [{
|
|
1257
1351
|
type: Input
|
|
1258
|
-
}], onClick: [{
|
|
1259
|
-
type: HostListener,
|
|
1260
|
-
args: ['click', ['$event']]
|
|
1261
1352
|
}] } });
|
|
1262
1353
|
|
|
1263
|
-
class
|
|
1264
|
-
constructor() {
|
|
1265
|
-
this.
|
|
1266
|
-
this.
|
|
1267
|
-
this.
|
|
1268
|
-
this.
|
|
1269
|
-
this.
|
|
1270
|
-
this.
|
|
1271
|
-
this.
|
|
1272
|
-
this.
|
|
1273
|
-
this.
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1354
|
+
class ProdutoCategoriaCardapioAddDialogComponent {
|
|
1355
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1356
|
+
this.ws = ws;
|
|
1357
|
+
this.notification = notification;
|
|
1358
|
+
this.dataDialog = dataDialog;
|
|
1359
|
+
this.dialog = dialog;
|
|
1360
|
+
this.elRef = elRef;
|
|
1361
|
+
this.dialogRef = dialogRef;
|
|
1362
|
+
this.screenHelper = screenHelper;
|
|
1363
|
+
this.isBusy = false;
|
|
1364
|
+
this.focus = new FocusService();
|
|
1365
|
+
this.model = {
|
|
1366
|
+
id: 0,
|
|
1367
|
+
nome: '',
|
|
1368
|
+
isAtivo: true,
|
|
1369
|
+
enviadoPC: false
|
|
1370
|
+
};
|
|
1371
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1372
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1280
1373
|
}
|
|
1281
|
-
|
|
1282
|
-
this.
|
|
1283
|
-
if (!this._init)
|
|
1284
|
-
return;
|
|
1285
|
-
this.updateText();
|
|
1286
|
-
this.raiseOnSelectionChanged();
|
|
1374
|
+
ngOnInit() {
|
|
1375
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
1287
1376
|
}
|
|
1288
|
-
|
|
1289
|
-
|
|
1377
|
+
ngOnDestroy() {
|
|
1378
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1290
1379
|
}
|
|
1291
|
-
|
|
1292
|
-
this.
|
|
1293
|
-
if (
|
|
1380
|
+
salvar() {
|
|
1381
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
1382
|
+
if (valMsg) {
|
|
1383
|
+
this.notification.showMsgError(valMsg);
|
|
1294
1384
|
return;
|
|
1295
|
-
|
|
1296
|
-
this.
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1385
|
+
}
|
|
1386
|
+
this.isBusy = true;
|
|
1387
|
+
this.ws.addProdutoCategoriaCardapio(this.model)
|
|
1388
|
+
.subscribe(r => {
|
|
1389
|
+
this.isBusy = false;
|
|
1390
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1391
|
+
if (this.dialogRef)
|
|
1392
|
+
this.dialogRef.close(true);
|
|
1393
|
+
}, err => {
|
|
1394
|
+
this.isBusy = false;
|
|
1395
|
+
this.notification.showMsg(err.error);
|
|
1396
|
+
});
|
|
1300
1397
|
}
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1398
|
+
}
|
|
1399
|
+
ProdutoCategoriaCardapioAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1400
|
+
ProdutoCategoriaCardapioAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioAddDialogComponent, selector: "ox-produto-categoria-cardapio-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Nova Categoria</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: ["model"] }] });
|
|
1401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, decorators: [{
|
|
1402
|
+
type: Component,
|
|
1403
|
+
args: [{ selector: 'ox-produto-categoria-cardapio-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Nova Categoria</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
1404
|
+
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1405
|
+
type: Inject,
|
|
1406
|
+
args: [MAT_DIALOG_DATA]
|
|
1407
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
|
|
1408
|
+
|
|
1409
|
+
class ProdutoCategoriaCardapioEditDialogComponent {
|
|
1410
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1411
|
+
this.ws = ws;
|
|
1412
|
+
this.notification = notification;
|
|
1413
|
+
this.dataDialog = dataDialog;
|
|
1414
|
+
this.dialog = dialog;
|
|
1415
|
+
this.elRef = elRef;
|
|
1416
|
+
this.dialogRef = dialogRef;
|
|
1417
|
+
this.screenHelper = screenHelper;
|
|
1418
|
+
this.isBusy = false;
|
|
1419
|
+
this.focus = new FocusService();
|
|
1420
|
+
if (dataDialog) {
|
|
1421
|
+
this.model = dataDialog;
|
|
1422
|
+
}
|
|
1423
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1424
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1307
1425
|
}
|
|
1308
1426
|
ngOnInit() {
|
|
1309
|
-
this.
|
|
1310
|
-
this._init = true;
|
|
1311
|
-
}
|
|
1312
|
-
goBack() {
|
|
1313
|
-
if (this.modoAnual) {
|
|
1314
|
-
this.ano -= 1;
|
|
1315
|
-
}
|
|
1316
|
-
else {
|
|
1317
|
-
this.mes--;
|
|
1318
|
-
if (this.mes < 1) {
|
|
1319
|
-
this.ano -= 1;
|
|
1320
|
-
this.mes = 12;
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
this.updateText();
|
|
1324
|
-
this.raiseOnSelectionChanged();
|
|
1427
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
1325
1428
|
}
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
if (this.modoAnual) {
|
|
1329
|
-
this.ano += 1;
|
|
1330
|
-
}
|
|
1331
|
-
else {
|
|
1332
|
-
this.mes++;
|
|
1333
|
-
if (this.mes > 12) {
|
|
1334
|
-
this.ano += 1;
|
|
1335
|
-
this.mes = 1;
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
this.updateText();
|
|
1339
|
-
this.raiseOnSelectionChanged();
|
|
1429
|
+
ngOnDestroy() {
|
|
1430
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1340
1431
|
}
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
if (this.modoAnual)
|
|
1344
|
-
this.text = '' + this._ano;
|
|
1345
|
-
else
|
|
1346
|
-
this.text = this._meses[this._mes - 1] + " DE " + this._ano;
|
|
1347
|
-
if (!this.blockFuture)
|
|
1432
|
+
salvar() {
|
|
1433
|
+
if (!this.model)
|
|
1348
1434
|
return;
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1435
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
1436
|
+
if (valMsg) {
|
|
1437
|
+
this.notification.showMsgError(valMsg);
|
|
1438
|
+
return;
|
|
1439
|
+
}
|
|
1440
|
+
this.isBusy = true;
|
|
1441
|
+
this.ws.saveProdutoCategoriaCardapio(this.model)
|
|
1442
|
+
.subscribe(r => {
|
|
1443
|
+
this.isBusy = false;
|
|
1444
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1445
|
+
if (this.dialogRef)
|
|
1446
|
+
this.dialogRef.close(true);
|
|
1447
|
+
}, err => {
|
|
1448
|
+
this.isBusy = false;
|
|
1449
|
+
this.notification.showMsg(err.error);
|
|
1450
|
+
});
|
|
1361
1451
|
}
|
|
1362
1452
|
}
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
1453
|
+
ProdutoCategoriaCardapioEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1454
|
+
ProdutoCategoriaCardapioEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioEditDialogComponent, selector: "ox-produto-categoria-cardapio-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Categoria do Card\u00E1pio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: ["model"] }] });
|
|
1455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, decorators: [{
|
|
1366
1456
|
type: Component,
|
|
1367
|
-
args: [{ selector: 'ox-
|
|
1368
|
-
}], ctorParameters: function () { return [
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
type:
|
|
1372
|
-
}], changed: [{
|
|
1373
|
-
type: Output
|
|
1374
|
-
}], blockFuture: [{
|
|
1375
|
-
type: Input
|
|
1376
|
-
}], modoAnual: [{
|
|
1377
|
-
type: Input
|
|
1378
|
-
}], ano: [{
|
|
1379
|
-
type: Input
|
|
1380
|
-
}], mes: [{
|
|
1381
|
-
type: Input
|
|
1382
|
-
}] } });
|
|
1457
|
+
args: [{ selector: 'ox-produto-categoria-cardapio-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Categoria do Card\u00E1pio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
1458
|
+
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1459
|
+
type: Inject,
|
|
1460
|
+
args: [MAT_DIALOG_DATA]
|
|
1461
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
|
|
1383
1462
|
|
|
1384
|
-
class
|
|
1385
|
-
constructor() {
|
|
1386
|
-
this.
|
|
1387
|
-
this.
|
|
1388
|
-
this.
|
|
1389
|
-
this.
|
|
1390
|
-
this.
|
|
1391
|
-
this.
|
|
1392
|
-
this.
|
|
1393
|
-
this.
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1463
|
+
class ProdutoCategoriaCardapioSelecaoDialogComponent {
|
|
1464
|
+
constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
|
|
1465
|
+
this.dialogRef = dialogRef;
|
|
1466
|
+
this.dialog = dialog;
|
|
1467
|
+
this.ws = ws;
|
|
1468
|
+
this.notification = notification;
|
|
1469
|
+
this.screenHelper = screenHelper;
|
|
1470
|
+
this.items = [];
|
|
1471
|
+
this.selectedItem = null;
|
|
1472
|
+
this.isBusy = false;
|
|
1473
|
+
this.setting = new SearchSetting();
|
|
1474
|
+
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
1475
|
+
this.nav = new NavegacaoSelecaoDialogUtil(this);
|
|
1476
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1477
|
+
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
1478
|
+
this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
|
|
1397
1479
|
}
|
|
1398
|
-
|
|
1399
|
-
this.
|
|
1400
|
-
this.
|
|
1401
|
-
this.refreshUI();
|
|
1480
|
+
ngOnInit() {
|
|
1481
|
+
this.setting.ordem = "nome";
|
|
1482
|
+
this.atualiza();
|
|
1402
1483
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1484
|
+
atualiza() {
|
|
1485
|
+
this.isBusy = true;
|
|
1486
|
+
this.ws.buscaProdutoCategoriaCardapio(this.setting)
|
|
1487
|
+
.subscribe(r => {
|
|
1488
|
+
this.isBusy = false;
|
|
1489
|
+
this.items = r;
|
|
1490
|
+
console.info(r);
|
|
1491
|
+
}, err => {
|
|
1492
|
+
this.isBusy = false;
|
|
1493
|
+
this.notification.showHttpError(err);
|
|
1494
|
+
});
|
|
1405
1495
|
}
|
|
1406
|
-
|
|
1407
|
-
this.
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
return this._min;
|
|
1412
|
-
}
|
|
1413
|
-
set min(val) {
|
|
1414
|
-
this._min = Number(val);
|
|
1415
|
-
this.refreshUI();
|
|
1416
|
-
}
|
|
1417
|
-
ngOnInit() {
|
|
1418
|
-
}
|
|
1419
|
-
onTextEdit(ev) {
|
|
1420
|
-
console.info(ev);
|
|
1421
|
-
const i = Number(ev.target.value);
|
|
1422
|
-
if (!this.valida(i))
|
|
1423
|
-
this.text = '' + this.value;
|
|
1424
|
-
else {
|
|
1425
|
-
this.value = i;
|
|
1426
|
-
this.raiseChange();
|
|
1427
|
-
this.refreshUI();
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
goBack() {
|
|
1431
|
-
const newVal = this.value - 1;
|
|
1432
|
-
if (!this.valida(newVal))
|
|
1433
|
-
return;
|
|
1434
|
-
this.value = newVal;
|
|
1435
|
-
this.raiseChange();
|
|
1436
|
-
}
|
|
1437
|
-
;
|
|
1438
|
-
goNext() {
|
|
1439
|
-
const newVal = this.value + 1;
|
|
1440
|
-
if (!this.valida(newVal))
|
|
1441
|
-
return;
|
|
1442
|
-
this.value = newVal;
|
|
1443
|
-
this.raiseChange();
|
|
1444
|
-
}
|
|
1445
|
-
;
|
|
1446
|
-
refreshUI() {
|
|
1447
|
-
this.text = this.value === undefined ? '--' : '' + this.value;
|
|
1448
|
-
this.disableNext = this.max !== undefined && this.value === this.max;
|
|
1449
|
-
this.disableBack = this.min !== undefined && this.value === this.min;
|
|
1450
|
-
}
|
|
1451
|
-
valida(val) {
|
|
1452
|
-
if (isNaN(val))
|
|
1453
|
-
return false;
|
|
1454
|
-
if (this.max !== undefined && val > this.max)
|
|
1455
|
-
return false;
|
|
1456
|
-
if (this.min !== undefined && val < this.min)
|
|
1457
|
-
return false;
|
|
1458
|
-
return true;
|
|
1459
|
-
}
|
|
1460
|
-
raiseChange() {
|
|
1461
|
-
this.change.emit(this.value);
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
NumericPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1465
|
-
NumericPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: NumericPickerComponent, selector: "ox-numeric-picker", inputs: { value: "value", max: "max", min: "min" }, outputs: { valueChange: "valueChange", change: "change" }, ngImport: i0, template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\n"], dependencies: [{ kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, decorators: [{
|
|
1467
|
-
type: Component,
|
|
1468
|
-
args: [{ selector: 'ox-numeric-picker', template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\n"] }]
|
|
1469
|
-
}], ctorParameters: function () { return []; }, propDecorators: { valueChange: [{
|
|
1470
|
-
type: Output
|
|
1471
|
-
}], change: [{
|
|
1472
|
-
type: Output
|
|
1473
|
-
}], value: [{
|
|
1474
|
-
type: Input
|
|
1475
|
-
}], max: [{
|
|
1476
|
-
type: Input
|
|
1477
|
-
}], min: [{
|
|
1478
|
-
type: Input
|
|
1479
|
-
}] } });
|
|
1480
|
-
|
|
1481
|
-
class PaginatorComponent {
|
|
1482
|
-
constructor() {
|
|
1483
|
-
this.paginaAtualChange = new EventEmitter();
|
|
1484
|
-
this.totalPaginasChange = new EventEmitter();
|
|
1485
|
-
this.change = new EventEmitter();
|
|
1486
|
-
this._paginaAtual = 1;
|
|
1487
|
-
this._totalPaginas = 1;
|
|
1488
|
-
this.inicio = true;
|
|
1489
|
-
this.fim = true;
|
|
1490
|
-
this.pageSize = 0;
|
|
1491
|
-
}
|
|
1492
|
-
get paginaAtual() {
|
|
1493
|
-
return this._paginaAtual;
|
|
1494
|
-
}
|
|
1495
|
-
set paginaAtual(val) {
|
|
1496
|
-
this._paginaAtual = val;
|
|
1497
|
-
this.paginaAtualChange.emit(val);
|
|
1498
|
-
this.refreshUI();
|
|
1499
|
-
}
|
|
1500
|
-
get totalPaginas() {
|
|
1501
|
-
return this._totalPaginas;
|
|
1502
|
-
}
|
|
1503
|
-
set totalPaginas(val) {
|
|
1504
|
-
this._totalPaginas = val;
|
|
1505
|
-
this.totalPaginasChange.emit(val);
|
|
1506
|
-
this.refreshUI();
|
|
1507
|
-
}
|
|
1508
|
-
ngOnInit() {
|
|
1509
|
-
}
|
|
1510
|
-
trocaPagina(pagina) {
|
|
1511
|
-
if (pagina > this.totalPaginas || pagina < 1)
|
|
1512
|
-
return;
|
|
1513
|
-
this.paginaAtual = pagina;
|
|
1514
|
-
this.refreshUI();
|
|
1515
|
-
this.change.emit(this.paginaAtual);
|
|
1516
|
-
}
|
|
1517
|
-
refreshUI() {
|
|
1518
|
-
this.inicio = this.paginaAtual == 1;
|
|
1519
|
-
this.fim = this.paginaAtual == this.totalPaginas;
|
|
1520
|
-
}
|
|
1521
|
-
goBack() {
|
|
1522
|
-
this.trocaPagina(this.paginaAtual - 1);
|
|
1523
|
-
}
|
|
1524
|
-
goNext() {
|
|
1525
|
-
this.trocaPagina(this.paginaAtual + 1);
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1529
|
-
PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: PaginatorComponent, selector: "ox-paginator", inputs: { pageSize: "pageSize", paginaAtual: "paginaAtual", totalPaginas: "totalPaginas" }, outputs: { paginaAtualChange: "paginaAtualChange", totalPaginasChange: "totalPaginasChange", change: "change" }, ngImport: i0, template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"], dependencies: [{ kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
1531
|
-
type: Component,
|
|
1532
|
-
args: [{ selector: 'ox-paginator', template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"] }]
|
|
1533
|
-
}], ctorParameters: function () { return []; }, propDecorators: { paginaAtualChange: [{
|
|
1534
|
-
type: Output
|
|
1535
|
-
}], totalPaginasChange: [{
|
|
1536
|
-
type: Output
|
|
1537
|
-
}], change: [{
|
|
1538
|
-
type: Output
|
|
1539
|
-
}], pageSize: [{
|
|
1540
|
-
type: Input
|
|
1541
|
-
}], paginaAtual: [{
|
|
1542
|
-
type: Input
|
|
1543
|
-
}], totalPaginas: [{
|
|
1544
|
-
type: Input
|
|
1545
|
-
}] } });
|
|
1546
|
-
|
|
1547
|
-
class RadioButtonGroupComponent {
|
|
1548
|
-
constructor() {
|
|
1549
|
-
this.change = new EventEmitter();
|
|
1550
|
-
this._items = [];
|
|
1551
|
-
//_init : boolean = false;
|
|
1552
|
-
this.selectedItem = null;
|
|
1553
|
-
}
|
|
1554
|
-
get items() {
|
|
1555
|
-
return this._items;
|
|
1556
|
-
}
|
|
1557
|
-
set items(val) {
|
|
1558
|
-
this._items = val;
|
|
1559
|
-
this.selectedItem = this.items.filter(x => x.default === true).firstOrNull();
|
|
1560
|
-
if (this.selectedItem === null)
|
|
1561
|
-
this.selectedItem = this.items.firstOrNull();
|
|
1562
|
-
}
|
|
1563
|
-
ngOnInit() {
|
|
1564
|
-
}
|
|
1565
|
-
raiseChange(item) {
|
|
1566
|
-
this.selectedItem = item;
|
|
1567
|
-
this.change.emit(this.selectedItem);
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
RadioButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1571
|
-
RadioButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: { selectedItem: "selectedItem", items: "items" }, outputs: { change: "change" }, ngImport: i0, template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CheckButtonComponent, selector: "ox-check-button", inputs: ["checked", "radioBehavior"], outputs: ["changed"] }] });
|
|
1572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, decorators: [{
|
|
1573
|
-
type: Component,
|
|
1574
|
-
args: [{ selector: 'ox-radio-button-group', template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"] }]
|
|
1575
|
-
}], ctorParameters: function () { return []; }, propDecorators: { change: [{
|
|
1576
|
-
type: Output
|
|
1577
|
-
}], selectedItem: [{
|
|
1578
|
-
type: Input
|
|
1579
|
-
}], items: [{
|
|
1580
|
-
type: Input
|
|
1581
|
-
}] } });
|
|
1582
|
-
|
|
1583
|
-
class SafeHtmlPipe {
|
|
1584
|
-
constructor(sanitizer) {
|
|
1585
|
-
this.sanitizer = sanitizer;
|
|
1586
|
-
}
|
|
1587
|
-
transform(html) {
|
|
1588
|
-
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1592
|
-
SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
|
|
1593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
1594
|
-
type: Pipe,
|
|
1595
|
-
args: [{
|
|
1596
|
-
name: 'safeHtml'
|
|
1597
|
-
}]
|
|
1598
|
-
}], ctorParameters: function () { return [{ type: i1$2.DomSanitizer }]; } });
|
|
1599
|
-
|
|
1600
|
-
var ModalidadeBaseICMS;
|
|
1601
|
-
(function (ModalidadeBaseICMS) {
|
|
1602
|
-
ModalidadeBaseICMS[ModalidadeBaseICMS["MargemValorAgregado"] = 0] = "MargemValorAgregado";
|
|
1603
|
-
ModalidadeBaseICMS[ModalidadeBaseICMS["PautaValor"] = 1] = "PautaValor";
|
|
1604
|
-
ModalidadeBaseICMS[ModalidadeBaseICMS["Pre\u00E7oTabeladoMax"] = 2] = "Pre\u00E7oTabeladoMax";
|
|
1605
|
-
ModalidadeBaseICMS[ModalidadeBaseICMS["ValorDaOpera\u00E7\u00E3o"] = 3] = "ValorDaOpera\u00E7\u00E3o";
|
|
1606
|
-
})(ModalidadeBaseICMS || (ModalidadeBaseICMS = {}));
|
|
1607
|
-
function createProduct() {
|
|
1608
|
-
return {
|
|
1609
|
-
id: 0,
|
|
1610
|
-
nome: '',
|
|
1611
|
-
unidade: 'UN',
|
|
1612
|
-
precoCusto: 0,
|
|
1613
|
-
precoVenda: 0,
|
|
1614
|
-
precoFuncionario: 0,
|
|
1615
|
-
estoqueMinimo: 0,
|
|
1616
|
-
referencia: '',
|
|
1617
|
-
aliquotaICMS: null,
|
|
1618
|
-
ncm: null,
|
|
1619
|
-
grupoId: 0,
|
|
1620
|
-
grupoNome: null,
|
|
1621
|
-
subgrupoId: 0,
|
|
1622
|
-
subgrupoNome: null,
|
|
1623
|
-
quantidadeSuite: 0,
|
|
1624
|
-
estoqueControlado: true,
|
|
1625
|
-
imprimiCozinha: true,
|
|
1626
|
-
imprimeCorredor: false,
|
|
1627
|
-
verNaRecepcao: true,
|
|
1628
|
-
prato: false,
|
|
1629
|
-
isAtivo: true,
|
|
1630
|
-
isComposto: true,
|
|
1631
|
-
isIngrediente: true,
|
|
1632
|
-
omiteCliente: false,
|
|
1633
|
-
estoqueRecepcao: false,
|
|
1634
|
-
estoqueRecepcaoQuantidade: 0,
|
|
1635
|
-
gtin: null,
|
|
1636
|
-
cfop: null,
|
|
1637
|
-
csT_icms: null,
|
|
1638
|
-
modBC_icms: 0,
|
|
1639
|
-
pICMS_icms: null,
|
|
1640
|
-
pRedBC_icms: null,
|
|
1641
|
-
pfcP_icms: null,
|
|
1642
|
-
vbcfcP_icms: null,
|
|
1643
|
-
pfcpsT_icms: null,
|
|
1644
|
-
pRedBCEfet_icms: null,
|
|
1645
|
-
vbcEfet_icms: null,
|
|
1646
|
-
picmsEfet_icms: null,
|
|
1647
|
-
vicmsEfet_icms: null,
|
|
1648
|
-
csT_pis: null,
|
|
1649
|
-
vbC_pis: null,
|
|
1650
|
-
ppiS_pis: null,
|
|
1651
|
-
csT_cofins: null,
|
|
1652
|
-
vbC_cofins: null,
|
|
1653
|
-
pcofinS_cofins: null,
|
|
1654
|
-
psT_icms: null,
|
|
1655
|
-
vbcstRet_icms: null,
|
|
1656
|
-
vicmsSubstituto_icms: null,
|
|
1657
|
-
vicmsstRet_icms: null,
|
|
1658
|
-
emiteNFCe: false,
|
|
1659
|
-
cest: null,
|
|
1660
|
-
vbcfcpsT_icms: null,
|
|
1661
|
-
vbcfcpstRet_icms: null,
|
|
1662
|
-
pfcpstRet_icms: null,
|
|
1663
|
-
sitTrib: null,
|
|
1664
|
-
setorSubEstoqueId: null,
|
|
1665
|
-
setorSubEstoqueNome: null,
|
|
1666
|
-
setorPrincipalId: null,
|
|
1667
|
-
setorPrincipalNome: null,
|
|
1668
|
-
qtdMinSubEstoque: null,
|
|
1669
|
-
disponivelCardapio: false,
|
|
1670
|
-
categoriaCardapioId: null,
|
|
1671
|
-
categoriaCardapioNome: null,
|
|
1672
|
-
descricao: null,
|
|
1673
|
-
enviadoPC: false,
|
|
1674
|
-
qbcProd_cofins: null,
|
|
1675
|
-
vAliqProd_cofins: null
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
;
|
|
1679
|
-
function valida$1(item, focus) {
|
|
1680
|
-
if (valTextEmpty(item.nome)) {
|
|
1681
|
-
focus.set('nome');
|
|
1682
|
-
return 'Digite um nome válido.';
|
|
1683
|
-
}
|
|
1684
|
-
if (valNumberEmpty(item.grupoId)) {
|
|
1685
|
-
return 'Escolha um grupo de produto.';
|
|
1686
|
-
}
|
|
1687
|
-
if (valNumberEmpty(item.subgrupoId)) {
|
|
1688
|
-
return 'Escolha um subgrupo de produto.';
|
|
1689
|
-
}
|
|
1690
|
-
if (valTextEmpty(item.unidade)) {
|
|
1691
|
-
focus.set('unidade');
|
|
1692
|
-
return 'Digite uma unidade.';
|
|
1693
|
-
}
|
|
1694
|
-
if (item.disponivelCardapio) {
|
|
1695
|
-
if (valNumberEmpty(item.categoriaCardapioId))
|
|
1696
|
-
return 'Escolha uma categoria do cardápio digital.';
|
|
1697
|
-
if (valTextEmpty(item.descricao)) {
|
|
1698
|
-
focus.set('descricao');
|
|
1699
|
-
return 'Digite uma descrição para o cardápio digital.';
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
return null;
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
class ProdutoSearchSetting extends SearchSetting {
|
|
1706
|
-
constructor() {
|
|
1707
|
-
super();
|
|
1708
|
-
this.exibeNaoControladoEstoque = true;
|
|
1709
|
-
this.exibeApenasMostraRecepcao = false;
|
|
1710
|
-
this.exibeInativo = false;
|
|
1711
|
-
this.exibeImprimiCozinha = false;
|
|
1712
|
-
this.exibeHePrato = false;
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
class NumberParser {
|
|
1717
|
-
constructor(setPropFunc, getPropFunc, min, max, triggerMilliseconds = 1500) {
|
|
1718
|
-
this.setPropFunc = setPropFunc;
|
|
1719
|
-
this.getPropFunc = getPropFunc;
|
|
1720
|
-
this.min = min;
|
|
1721
|
-
this.max = max;
|
|
1722
|
-
this.parsed = false;
|
|
1723
|
-
this._parseTrigger = new LazyTrigger(() => this.parseValor(), triggerMilliseconds);
|
|
1724
|
-
}
|
|
1725
|
-
parse(vlr) {
|
|
1726
|
-
this.valor = vlr;
|
|
1727
|
-
this.parsed = false;
|
|
1728
|
-
this._parseTrigger.fire();
|
|
1729
|
-
}
|
|
1730
|
-
store(vlr) {
|
|
1731
|
-
this.valor = vlr;
|
|
1732
|
-
this.parsed = false;
|
|
1733
|
-
}
|
|
1734
|
-
checkout() {
|
|
1735
|
-
if (this.parsed || !this.valor)
|
|
1736
|
-
return;
|
|
1737
|
-
this.parseValor();
|
|
1738
|
-
}
|
|
1739
|
-
parseValor() {
|
|
1740
|
-
if (this.valor === undefined)
|
|
1741
|
-
return;
|
|
1742
|
-
this.parsed = true;
|
|
1743
|
-
const vlrTxt = this.valor.split(",").join(".");
|
|
1744
|
-
;
|
|
1745
|
-
const spTxt = vlrTxt.split(".");
|
|
1746
|
-
let toParseTxt = "";
|
|
1747
|
-
if (spTxt.length > 2) {
|
|
1748
|
-
const chars = vlrTxt.split("");
|
|
1749
|
-
const lastIndex = vlrTxt.lastIndexOf(".");
|
|
1750
|
-
for (let i = 0; i < chars.length; i++) {
|
|
1751
|
-
const c = chars[i];
|
|
1752
|
-
if (c === "." && i != lastIndex)
|
|
1753
|
-
continue;
|
|
1754
|
-
toParseTxt = toParseTxt.concat(c);
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
else {
|
|
1758
|
-
toParseTxt = vlrTxt;
|
|
1759
|
-
}
|
|
1760
|
-
const vlr = parseFloat(toParseTxt);
|
|
1761
|
-
if (isNaN(vlr) || !this.validaMinMax(vlr)) {
|
|
1762
|
-
const original = this.getPropFunc();
|
|
1763
|
-
this.setPropFunc(0);
|
|
1764
|
-
setTimeout(() => this.setPropFunc(original));
|
|
1765
|
-
}
|
|
1766
|
-
else {
|
|
1767
|
-
this.setPropFunc(vlr);
|
|
1768
|
-
}
|
|
1769
|
-
}
|
|
1770
|
-
validaMinMax(value) {
|
|
1771
|
-
if ((this.min === undefined) && this.max === undefined)
|
|
1772
|
-
return true;
|
|
1773
|
-
if (!(this.min === undefined) && value < this.min)
|
|
1774
|
-
return false;
|
|
1775
|
-
if (!(this.max === undefined) && value > this.max)
|
|
1776
|
-
return false;
|
|
1777
|
-
return true;
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
function valida(item, focus) {
|
|
1782
|
-
if (valTextEmpty(item.nome)) {
|
|
1783
|
-
focus.set('nome');
|
|
1784
|
-
return 'Digite um nome válido.';
|
|
1785
|
-
}
|
|
1786
|
-
return null;
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
class ProdutoGrupoFormComponent {
|
|
1790
|
-
constructor() { }
|
|
1791
|
-
ngOnInit() {
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
ProdutoGrupoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1795
|
-
ProdutoGrupoFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"form-group\" *ngIf=\"model\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" cdkFocusInitial tabindex=\"1\">\n</div>", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, decorators: [{
|
|
1797
|
-
type: Component,
|
|
1798
|
-
args: [{ selector: 'app-produto-grupo-form', template: "<div class=\"form-group\" *ngIf=\"model\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" required class=\"form-control input-300\" cdkFocusInitial tabindex=\"1\">\n</div>", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
1799
|
-
}], ctorParameters: function () { return []; }, propDecorators: { model: [{
|
|
1800
|
-
type: Input
|
|
1801
|
-
}] } });
|
|
1802
|
-
|
|
1803
|
-
class ProdutoCategoriaCardapioAddDialogComponent {
|
|
1804
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1805
|
-
this.ws = ws;
|
|
1806
|
-
this.notification = notification;
|
|
1807
|
-
this.dataDialog = dataDialog;
|
|
1808
|
-
this.dialog = dialog;
|
|
1809
|
-
this.elRef = elRef;
|
|
1810
|
-
this.dialogRef = dialogRef;
|
|
1811
|
-
this.screenHelper = screenHelper;
|
|
1812
|
-
this.isBusy = false;
|
|
1813
|
-
this.focus = new FocusService();
|
|
1814
|
-
this.model = {
|
|
1815
|
-
id: 0,
|
|
1816
|
-
nome: '',
|
|
1817
|
-
isAtivo: true,
|
|
1818
|
-
enviadoPC: false
|
|
1819
|
-
};
|
|
1820
|
-
this.mobile = this.screenHelper.isMedium;
|
|
1821
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1822
|
-
}
|
|
1823
|
-
ngOnInit() {
|
|
1824
|
-
this.focus.registerElement(this.elRef.nativeElement);
|
|
1825
|
-
}
|
|
1826
|
-
ngOnDestroy() {
|
|
1827
|
-
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1828
|
-
}
|
|
1829
|
-
salvar() {
|
|
1830
|
-
const valMsg = valida(this.model, this.focus);
|
|
1831
|
-
if (valMsg) {
|
|
1832
|
-
this.notification.showMsgError(valMsg);
|
|
1833
|
-
return;
|
|
1834
|
-
}
|
|
1835
|
-
this.isBusy = true;
|
|
1836
|
-
this.ws.addProdutoCategoriaCardapio(this.model)
|
|
1837
|
-
.subscribe(r => {
|
|
1838
|
-
this.isBusy = false;
|
|
1839
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
1840
|
-
if (this.dialogRef)
|
|
1841
|
-
this.dialogRef.close(true);
|
|
1842
|
-
}, err => {
|
|
1843
|
-
this.isBusy = false;
|
|
1844
|
-
this.notification.showMsg(err.error);
|
|
1845
|
-
});
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
ProdutoCategoriaCardapioAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1849
|
-
ProdutoCategoriaCardapioAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioAddDialogComponent, selector: "app-produto-categoria-cardapio-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Nova Categoria</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
|
|
1850
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, decorators: [{
|
|
1851
|
-
type: Component,
|
|
1852
|
-
args: [{ selector: 'app-produto-categoria-cardapio-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Nova Categoria</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
1853
|
-
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1854
|
-
type: Inject,
|
|
1855
|
-
args: [MAT_DIALOG_DATA]
|
|
1856
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
|
|
1857
|
-
|
|
1858
|
-
class ProdutoCategoriaCardapioEditDialogComponent {
|
|
1859
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1860
|
-
this.ws = ws;
|
|
1861
|
-
this.notification = notification;
|
|
1862
|
-
this.dataDialog = dataDialog;
|
|
1863
|
-
this.dialog = dialog;
|
|
1864
|
-
this.elRef = elRef;
|
|
1865
|
-
this.dialogRef = dialogRef;
|
|
1866
|
-
this.screenHelper = screenHelper;
|
|
1867
|
-
this.isBusy = false;
|
|
1868
|
-
this.focus = new FocusService();
|
|
1869
|
-
if (dataDialog) {
|
|
1870
|
-
this.model = dataDialog;
|
|
1871
|
-
}
|
|
1872
|
-
this.mobile = this.screenHelper.isMedium;
|
|
1873
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1874
|
-
}
|
|
1875
|
-
ngOnInit() {
|
|
1876
|
-
this.focus.registerElement(this.elRef.nativeElement);
|
|
1877
|
-
}
|
|
1878
|
-
ngOnDestroy() {
|
|
1879
|
-
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1880
|
-
}
|
|
1881
|
-
salvar() {
|
|
1882
|
-
if (!this.model)
|
|
1883
|
-
return;
|
|
1884
|
-
const valMsg = valida(this.model, this.focus);
|
|
1885
|
-
if (valMsg) {
|
|
1886
|
-
this.notification.showMsgError(valMsg);
|
|
1887
|
-
return;
|
|
1888
|
-
}
|
|
1889
|
-
this.isBusy = true;
|
|
1890
|
-
this.ws.saveProdutoCategoriaCardapio(this.model)
|
|
1891
|
-
.subscribe(r => {
|
|
1892
|
-
this.isBusy = false;
|
|
1893
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
1894
|
-
if (this.dialogRef)
|
|
1895
|
-
this.dialogRef.close(true);
|
|
1896
|
-
}, err => {
|
|
1897
|
-
this.isBusy = false;
|
|
1898
|
-
this.notification.showMsg(err.error);
|
|
1899
|
-
});
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
ProdutoCategoriaCardapioEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1903
|
-
ProdutoCategoriaCardapioEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioEditDialogComponent, selector: "app-produto-categoria-cardapio-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Categoria do Card\u00E1pio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "app-produto-grupo-form", inputs: ["model"] }] });
|
|
1904
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, decorators: [{
|
|
1905
|
-
type: Component,
|
|
1906
|
-
args: [{ selector: 'app-produto-categoria-cardapio-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Categoria do Card\u00E1pio</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></app-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
1907
|
-
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1908
|
-
type: Inject,
|
|
1909
|
-
args: [MAT_DIALOG_DATA]
|
|
1910
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
|
|
1911
|
-
|
|
1912
|
-
class ProdutoCategoriaCardapioSelecaoDialogComponent {
|
|
1913
|
-
constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
|
|
1914
|
-
this.dialogRef = dialogRef;
|
|
1915
|
-
this.dialog = dialog;
|
|
1916
|
-
this.ws = ws;
|
|
1917
|
-
this.notification = notification;
|
|
1918
|
-
this.screenHelper = screenHelper;
|
|
1919
|
-
this.items = [];
|
|
1920
|
-
this.selectedItem = null;
|
|
1921
|
-
this.isBusy = false;
|
|
1922
|
-
this.setting = new SearchSetting();
|
|
1923
|
-
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
1924
|
-
this.nav = new NavegacaoSelecaoDialogUtil(this);
|
|
1925
|
-
this.mobile = this.screenHelper.isMedium;
|
|
1926
|
-
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
1927
|
-
this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
|
|
1928
|
-
}
|
|
1929
|
-
ngOnInit() {
|
|
1930
|
-
this.setting.ordem = "nome";
|
|
1931
|
-
this.atualiza();
|
|
1932
|
-
}
|
|
1933
|
-
atualiza() {
|
|
1934
|
-
this.isBusy = true;
|
|
1935
|
-
this.ws.buscaProdutoCategoriaCardapio(this.setting)
|
|
1936
|
-
.subscribe(r => {
|
|
1937
|
-
this.isBusy = false;
|
|
1938
|
-
this.items = r;
|
|
1939
|
-
console.info(r);
|
|
1940
|
-
}, err => {
|
|
1941
|
-
this.isBusy = false;
|
|
1942
|
-
this.notification.showHttpError(err);
|
|
1943
|
-
});
|
|
1944
|
-
}
|
|
1945
|
-
selectItem(i) {
|
|
1946
|
-
if (this.selectedItem === i) {
|
|
1947
|
-
this.dialogRef.close(i);
|
|
1948
|
-
}
|
|
1949
|
-
this.selectedItem = i;
|
|
1496
|
+
selectItem(i) {
|
|
1497
|
+
if (this.selectedItem === i) {
|
|
1498
|
+
this.dialogRef.close(i);
|
|
1499
|
+
}
|
|
1500
|
+
this.selectedItem = i;
|
|
1950
1501
|
}
|
|
1951
1502
|
novo() {
|
|
1952
1503
|
let height = (window.innerHeight * 0.90) + 'px';
|
|
@@ -1991,10 +1542,10 @@ class ProdutoCategoriaCardapioSelecaoDialogComponent {
|
|
|
1991
1542
|
}
|
|
1992
1543
|
}
|
|
1993
1544
|
ProdutoCategoriaCardapioSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1994
|
-
ProdutoCategoriaCardapioSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioSelecaoDialogComponent, selector: "
|
|
1545
|
+
ProdutoCategoriaCardapioSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioSelecaoDialogComponent, selector: "ox-produto-categoria-cardapio-selecao-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n<!--\n <div (click)=\"selectItem(i)\" [ngClass]=\"{selected: selectedItem === i}\" class=\"list-item\" *ngFor=\"let i of items\">\n <span>{{i.nome}}</span>\n </div>\n-->\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
|
|
1995
1546
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioSelecaoDialogComponent, decorators: [{
|
|
1996
1547
|
type: Component,
|
|
1997
|
-
args: [{ selector: '
|
|
1548
|
+
args: [{ selector: 'ox-produto-categoria-cardapio-selecao-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n<!--\n <div (click)=\"selectItem(i)\" [ngClass]=\"{selected: selectedItem === i}\" class=\"list-item\" *ngFor=\"let i of items\">\n <span>{{i.nome}}</span>\n </div>\n-->\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
1998
1549
|
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
1999
1550
|
|
|
2000
1551
|
class ProdutoGrupoAddDialogComponent {
|
|
@@ -2024,7 +1575,7 @@ class ProdutoGrupoAddDialogComponent {
|
|
|
2024
1575
|
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
2025
1576
|
}
|
|
2026
1577
|
salvar() {
|
|
2027
|
-
const valMsg =
|
|
1578
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
2028
1579
|
if (valMsg) {
|
|
2029
1580
|
this.notification.showMsgError(valMsg);
|
|
2030
1581
|
return;
|
|
@@ -2043,10 +1594,10 @@ class ProdutoGrupoAddDialogComponent {
|
|
|
2043
1594
|
}
|
|
2044
1595
|
}
|
|
2045
1596
|
ProdutoGrupoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2046
|
-
ProdutoGrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoAddDialogComponent, selector: "
|
|
1597
|
+
ProdutoGrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoAddDialogComponent, selector: "ox-produto-grupo-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: ["model"] }] });
|
|
2047
1598
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoAddDialogComponent, decorators: [{
|
|
2048
1599
|
type: Component,
|
|
2049
|
-
args: [{ selector: '
|
|
1600
|
+
args: [{ selector: 'ox-produto-grupo-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
2050
1601
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2051
1602
|
type: Inject,
|
|
2052
1603
|
args: [MAT_DIALOG_DATA]
|
|
@@ -2078,7 +1629,7 @@ class ProdutoGrupoEditDialogComponent {
|
|
|
2078
1629
|
salvar() {
|
|
2079
1630
|
if (!this.model)
|
|
2080
1631
|
return;
|
|
2081
|
-
const valMsg =
|
|
1632
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
2082
1633
|
if (valMsg) {
|
|
2083
1634
|
this.notification.showMsgError(valMsg);
|
|
2084
1635
|
return;
|
|
@@ -2097,10 +1648,10 @@ class ProdutoGrupoEditDialogComponent {
|
|
|
2097
1648
|
}
|
|
2098
1649
|
}
|
|
2099
1650
|
ProdutoGrupoEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2100
|
-
ProdutoGrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoEditDialogComponent, selector: "
|
|
1651
|
+
ProdutoGrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoEditDialogComponent, selector: "ox-produto-grupo-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: ["model"] }] });
|
|
2101
1652
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoEditDialogComponent, decorators: [{
|
|
2102
1653
|
type: Component,
|
|
2103
|
-
args: [{ selector: '
|
|
1654
|
+
args: [{ selector: 'ox-produto-grupo-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
2104
1655
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2105
1656
|
type: Inject,
|
|
2106
1657
|
args: [MAT_DIALOG_DATA]
|
|
@@ -2188,10 +1739,10 @@ class ProdutoGrupoSelecaoDialogComponent {
|
|
|
2188
1739
|
}
|
|
2189
1740
|
}
|
|
2190
1741
|
ProdutoGrupoSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2191
|
-
ProdutoGrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoSelecaoDialogComponent, selector: "
|
|
1742
|
+
ProdutoGrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoSelecaoDialogComponent, selector: "ox-produto-grupo-selecao-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
|
|
2192
1743
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoSelecaoDialogComponent, decorators: [{
|
|
2193
1744
|
type: Component,
|
|
2194
|
-
args: [{ selector: '
|
|
1745
|
+
args: [{ selector: 'ox-produto-grupo-selecao-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
2195
1746
|
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
2196
1747
|
|
|
2197
1748
|
class ProdutosNcmDialogComponent {
|
|
@@ -2232,10 +1783,10 @@ class ProdutosNcmDialogComponent {
|
|
|
2232
1783
|
}
|
|
2233
1784
|
}
|
|
2234
1785
|
ProdutosNcmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosNcmDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2235
|
-
ProdutosNcmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosNcmDialogComponent, selector: "
|
|
1786
|
+
ProdutosNcmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosNcmDialogComponent, selector: "ox-produtos-ncm-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [codigo]=\"i.codigo\" [nome]=\"i.descricao\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
|
|
2236
1787
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosNcmDialogComponent, decorators: [{
|
|
2237
1788
|
type: Component,
|
|
2238
|
-
args: [{ selector: '
|
|
1789
|
+
args: [{ selector: 'ox-produtos-ncm-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Grupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [codigo]=\"i.codigo\" [nome]=\"i.descricao\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
2239
1790
|
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: ScreenHelperService }]; } });
|
|
2240
1791
|
|
|
2241
1792
|
class ProdutoSubgrupoAddDialogComponent {
|
|
@@ -2267,7 +1818,7 @@ class ProdutoSubgrupoAddDialogComponent {
|
|
|
2267
1818
|
salvar() {
|
|
2268
1819
|
if (!this.model)
|
|
2269
1820
|
return;
|
|
2270
|
-
const valMsg =
|
|
1821
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
2271
1822
|
if (valMsg) {
|
|
2272
1823
|
this.notification.showMsgError(valMsg);
|
|
2273
1824
|
return;
|
|
@@ -2286,10 +1837,10 @@ class ProdutoSubgrupoAddDialogComponent {
|
|
|
2286
1837
|
}
|
|
2287
1838
|
}
|
|
2288
1839
|
ProdutoSubgrupoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2289
|
-
ProdutoSubgrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoAddDialogComponent, selector: "
|
|
1840
|
+
ProdutoSubgrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoAddDialogComponent, selector: "ox-produto-subgrupo-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: ["model"] }] });
|
|
2290
1841
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoAddDialogComponent, decorators: [{
|
|
2291
1842
|
type: Component,
|
|
2292
|
-
args: [{ selector: '
|
|
1843
|
+
args: [{ selector: 'ox-produto-subgrupo-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
2293
1844
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2294
1845
|
type: Inject,
|
|
2295
1846
|
args: [MAT_DIALOG_DATA]
|
|
@@ -2321,7 +1872,7 @@ class ProdutoSubgrupoEditDialogComponent {
|
|
|
2321
1872
|
salvar() {
|
|
2322
1873
|
if (!this.model)
|
|
2323
1874
|
return;
|
|
2324
|
-
const valMsg =
|
|
1875
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
2325
1876
|
if (valMsg) {
|
|
2326
1877
|
this.notification.showMsgError(valMsg);
|
|
2327
1878
|
return;
|
|
@@ -2340,10 +1891,10 @@ class ProdutoSubgrupoEditDialogComponent {
|
|
|
2340
1891
|
}
|
|
2341
1892
|
}
|
|
2342
1893
|
ProdutoSubgrupoEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2343
|
-
ProdutoSubgrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoEditDialogComponent, selector: "
|
|
1894
|
+
ProdutoSubgrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoEditDialogComponent, selector: "ox-produto-subgrupo-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: ["model"] }] });
|
|
2344
1895
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoEditDialogComponent, decorators: [{
|
|
2345
1896
|
type: Component,
|
|
2346
|
-
args: [{ selector: '
|
|
1897
|
+
args: [{ selector: 'ox-produto-subgrupo-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Subgrupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-grupo-form [model]=\"model\" *ngIf=\"model\"></ox-produto-grupo-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
2347
1898
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2348
1899
|
type: Inject,
|
|
2349
1900
|
args: [MAT_DIALOG_DATA]
|
|
@@ -2430,12 +1981,81 @@ class ProdutoSubgrupoSelecaoDialogComponent {
|
|
|
2430
1981
|
});
|
|
2431
1982
|
}
|
|
2432
1983
|
}
|
|
2433
|
-
ProdutoSubgrupoSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2434
|
-
ProdutoSubgrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoSelecaoDialogComponent, selector: "
|
|
2435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, decorators: [{
|
|
1984
|
+
ProdutoSubgrupoSelecaoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, deps: [{ token: i3.MatDialogRef }, { token: i3.MatDialog }, { token: CommonWebService }, { token: NotificationService }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1985
|
+
ProdutoSubgrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoSelecaoDialogComponent, selector: "ox-produto-subgrupo-selecao-dialog", ngImport: i0, template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Subgrupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }] });
|
|
1986
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, decorators: [{
|
|
1987
|
+
type: Component,
|
|
1988
|
+
args: [{ selector: 'ox-produto-subgrupo-selecao-dialog', template: "<div class=\"dialog-header\">\n <h2>Sele\u00E7\u00E3o de Subgrupos</h2>\n </div>\n <div class=\"tool-panel\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input (keydown)=\"nav.onKeyDown($event)\" cdkFocusInitial [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"editar()\" *ngIf=\"selectedItem && allowEdit\">\n <mat-icon aria-label=\"editar\">edit</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ox-item-card [nome]=\"i.nome\" (click)=\"selectItem(i)\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"></ox-item-card>\n </div>\n <div class=\"dialog-footer\">\n <button mat-button [disabled]=\"selectedItem == undefined\" color=\"primary\" [mat-dialog-close]=\"selectedItem\">CONFIRMAR</button>\n <button mat-button [mat-dialog-close]=\"undefined\">VOLTAR</button>\n </div>\n <ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n ", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
1989
|
+
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
1990
|
+
|
|
1991
|
+
class CheckButtonComponent {
|
|
1992
|
+
constructor() {
|
|
1993
|
+
this.checked = false;
|
|
1994
|
+
this.radioBehavior = false;
|
|
1995
|
+
this.changed = new EventEmitter();
|
|
1996
|
+
this.checked = true;
|
|
1997
|
+
}
|
|
1998
|
+
ngOnInit() {
|
|
1999
|
+
}
|
|
2000
|
+
onClick(e) {
|
|
2001
|
+
if (!this.radioBehavior)
|
|
2002
|
+
this.checked = !this.checked;
|
|
2003
|
+
this.changed.emit(this.checked);
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
CheckButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: CheckButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2007
|
+
CheckButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: CheckButtonComponent, selector: "ox-check-button", inputs: { checked: "checked", radioBehavior: "radioBehavior" }, outputs: { changed: "changed" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.checked": "checked" } }, ngImport: i0, template: "<ng-content></ng-content>", styles: [":host{padding:4px 8px;cursor:pointer;white-space:nowrap;color:#666;font-size:small;text-transform:uppercase;background-color:#ececec}:host:hover{background:rgba(0,0,0,.1)}:host(.checked){background:var(--app-tool-accent-color, black);color:#fff;box-shadow:0 8px 16px #0000001a}\n"] });
|
|
2008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: CheckButtonComponent, decorators: [{
|
|
2009
|
+
type: Component,
|
|
2010
|
+
args: [{ selector: 'ox-check-button', host: {
|
|
2011
|
+
'[class.checked]': "checked",
|
|
2012
|
+
}, template: "<ng-content></ng-content>", styles: [":host{padding:4px 8px;cursor:pointer;white-space:nowrap;color:#666;font-size:small;text-transform:uppercase;background-color:#ececec}:host:hover{background:rgba(0,0,0,.1)}:host(.checked){background:var(--app-tool-accent-color, black);color:#fff;box-shadow:0 8px 16px #0000001a}\n"] }]
|
|
2013
|
+
}], ctorParameters: function () { return []; }, propDecorators: { checked: [{
|
|
2014
|
+
type: Input
|
|
2015
|
+
}], radioBehavior: [{
|
|
2016
|
+
type: Input
|
|
2017
|
+
}], changed: [{
|
|
2018
|
+
type: Output
|
|
2019
|
+
}], onClick: [{
|
|
2020
|
+
type: HostListener,
|
|
2021
|
+
args: ['click', ['$event']]
|
|
2022
|
+
}] } });
|
|
2023
|
+
|
|
2024
|
+
class RadioButtonGroupComponent {
|
|
2025
|
+
constructor() {
|
|
2026
|
+
this.change = new EventEmitter();
|
|
2027
|
+
this._items = [];
|
|
2028
|
+
//_init : boolean = false;
|
|
2029
|
+
this.selectedItem = null;
|
|
2030
|
+
}
|
|
2031
|
+
get items() {
|
|
2032
|
+
return this._items;
|
|
2033
|
+
}
|
|
2034
|
+
set items(val) {
|
|
2035
|
+
this._items = val;
|
|
2036
|
+
this.selectedItem = this.items.filter(x => x.default === true).firstOrNull();
|
|
2037
|
+
if (this.selectedItem === null)
|
|
2038
|
+
this.selectedItem = this.items.firstOrNull();
|
|
2039
|
+
}
|
|
2040
|
+
ngOnInit() {
|
|
2041
|
+
}
|
|
2042
|
+
raiseChange(item) {
|
|
2043
|
+
this.selectedItem = item;
|
|
2044
|
+
this.change.emit(this.selectedItem);
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
RadioButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2048
|
+
RadioButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: { selectedItem: "selectedItem", items: "items" }, outputs: { change: "change" }, ngImport: i0, template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CheckButtonComponent, selector: "ox-check-button", inputs: ["checked", "radioBehavior"], outputs: ["changed"] }] });
|
|
2049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, decorators: [{
|
|
2436
2050
|
type: Component,
|
|
2437
|
-
args: [{ selector: '
|
|
2438
|
-
}], ctorParameters: function () { return [
|
|
2051
|
+
args: [{ selector: 'ox-radio-button-group', template: "<ox-check-button [radioBehavior]=\"true\" (changed)=\"raiseChange(item)\" [checked]=\"item == selectedItem\" *ngFor=\"let item of items\">\n {{item.name}}\n</ox-check-button>", styles: [":host>:first-child{border-radius:4px 0 0 4px}:host>:last-child{border-radius:0 4px 4px 0}\n"] }]
|
|
2052
|
+
}], ctorParameters: function () { return []; }, propDecorators: { change: [{
|
|
2053
|
+
type: Output
|
|
2054
|
+
}], selectedItem: [{
|
|
2055
|
+
type: Input
|
|
2056
|
+
}], items: [{
|
|
2057
|
+
type: Input
|
|
2058
|
+
}] } });
|
|
2439
2059
|
|
|
2440
2060
|
const lateralAnimation = trigger('menuLateral', [
|
|
2441
2061
|
transition(':enter', [
|
|
@@ -2743,102 +2363,327 @@ class ProdutoFormComponent {
|
|
|
2743
2363
|
});
|
|
2744
2364
|
}
|
|
2745
2365
|
}
|
|
2746
|
-
ProdutoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoFormComponent, deps: [{ token: i3.MatDialog }, { token: CommonWebService }, { token: i1.HttpClient }, { token: AuthDataService }, { token: NotificationService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2747
|
-
ProdutoFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoFormComponent, selector: "app-produto-form", inputs: { editMode: "editMode", model: "model" }, outputs: { nextIdClick: "nextIdClick" }, ngImport: i0, template: "<div style=\"margin-bottom: 16px\">\n <ox-radio-button-group (change)=\"changeModo($event)\" [items]=\"tabs\" class=\"tool-item-container\">\n </ox-radio-button-group>\n</div>\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 0\">\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>C\u00F3digo</label>\n <div class=\"hbox\">\n <input id=\"id\" [attr.readonly]=\"editMode\" [(ngModel)]=\"model.id\" class=\"form-control input-120\"\n tabindex=\"2\">\n <button (click)=\"nextIdClick.emit()\" *ngIf=\"!editMode\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n lightbulb\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Refer\u00EAncia</label>\n <input id=\"referencia\" [(ngModel)]=\"model.referencia\" class=\"form-control input-120\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" cdkFocusInitial class=\"form-control input-300\" tabindex=\"2\">\n </div>\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>Pre\u00E7o de Venda</label>\n <input id=\"precoVenda\" [ngModel]=\"model.precoVenda | number:'1.2-2'\"\n (ngModelChange)=\"precoVendaParser.parse($event)\" (focusout)=\"precoVendaParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o p/ Func.</label>\n <input id=\"precoFuncionario\" [ngModel]=\"model.precoFuncionario | number:'1.2-2'\"\n (ngModelChange)=\"precoFuncParser.parse($event)\" (focusout)=\"precoFuncParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o de Custo</label>\n <input id=\"precoCusto\" [ngModel]=\"model.precoCusto | number:'1.2-2'\"\n (ngModelChange)=\"precoCustoParser.parse($event)\" (focusout)=\"precoCustoParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Grupo</label>\n <div class=\"hbox\">\n <div id=\"grupo\" (click)=\"editarGrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.grupoNome}} </div>\n <button (click)=\"editarGrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group\">\n <label>Subgrupo</label>\n <div class=\"hbox\">\n <div id=\"subgrupo\" (click)=\"editarSubgrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.subgrupoNome}} </div>\n <button (click)=\"editarSubgrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Unidade</label>\n <input id=\"unidade\" [(ngModel)]=\"model.unidade\" class=\"form-control input-120\">\n </div>\n <div class=\"form-group\">\n <label>Estoque Min.</label>\n <input id=\"estoqueMinimo\" [(ngModel)]=\"model.estoqueMinimo\" class=\"form-control input-120\">\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>C\u00F3digo Patrim\u00F4nio</label>\n <input id=\"codigoPatrimonio\" [(ngModel)]=\"model.codigoPatrimonio\" class=\"form-control input-120\"\n maxlength=\"36\">\n </div>\n <div class=\"form-group\">\n <label>Obs.</label>\n <input id=\"obs\" [(ngModel)]=\"model.obs\" class=\"form-control input-300\" maxlength=\"300\">\n </div>\n </div>\n \n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Setor Subestoque</label>\n <mat-select [(value)]=\"model.setorSubEstoqueId\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of setores\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Qtd. Subestoque</label>\n <input id=\"qtdMinSubEstoque\" [(ngModel)]=\"model.qtdMinSubEstoque\" class=\"form-control input-120 text-right\">\n </div>\n </div>\n <div class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.estoqueControlado\" tabindex=-1>Controlado no Estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimiCozinha\" tabindex=-1>Imprime Cozinha</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimeCorredor\" tabindex=-1>Imprime Corredor</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.verNaRecepcao\" tabindex=-1>Ver na Recep\u00E7\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.omiteCliente\" tabindex=-1>N\u00E3o Exibe para o Cliente na Sa\u00EDda\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.isAtivo\" tabindex=-1>Ativado</mat-slide-toggle>\n </div>\n\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 1\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.emiteNFCe\" tabindex=-1>Emite Fiscal\n </mat-slide-toggle>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>GTIN</label>\n <input id=\"gtin\" [(ngModel)]=\"model.gtin\" class=\"form-control input-120\" placeholder=\"SEM GTIN\"\n maxlength=\"14\">\n </div>\n <div class=\"form-group\">\n <label>CFOP</label>\n <input id=\"cfop\" [(ngModel)]=\"model.cfop\" [matAutocomplete]=\"auto\" matInput class=\"form-control input-100\"\n maxlength=\"4\">\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of cfopList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"form-group\">\n <label>NCM</label>\n <div class=\"hbox\">\n <input id=\"ncm\" (input)=\"lazyTriggerNcm.fire()\" [(ngModel)]=\"model.ncm\" class=\"form-control input-100\"\n maxlength=\"8\">\n <button (click)=\"editarNCM()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n <span class=\"badge buscando\" *ngIf=\"isBusy\">Buscando...</span>\n <span class=\"badge encontrado\" *ngIf=\"ncmEncontrado\">Encontrado</span>\n <span class=\"badge nao-encontrado\" *ngIf=\"ncmNaoEncontrado\">N\u00E3o encontrado</span>\n </div>\n </div>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CEST</label>\n <input id=\"cest\" [(ngModel)]=\"model.cest\" autocomplete=\"off\" class=\"form-control input-120\" maxlength=\"7\">\n </div>\n <div class=\"form-group\">\n <label>ICMS (ECF/SAT)</label>\n <input id=\"aliquotaICMS\" [(ngModel)]=\"model.aliquotaICMS\" autocomplete=\"off\" class=\"form-control input-100 text-right\"\n maxlength=\"5\">\n </div>\n <div class=\"form-group\">\n <label>S. T. (ECF/SAT)</label>\n <input id=\"sitTrib\" [(ngModel)]=\"model.sitTrib\" autocomplete=\"off\" [matAutocomplete]=\"autoST\" matInput\n class=\"form-control input-120\" maxlength=\"5\">\n <mat-autocomplete #autoST=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of stList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n </div>\n <h4>Campos da NFC-e</h4>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/CSOSN</label>\n <mat-select [(value)]=\"model.csT_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of cstICMSList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. ICMS (%)</label>\n <input id=\"pICMS_icms\" [ngModel]=\"model.pICMS_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pICMS_icmsParser.parse($event)\" (focusout)=\"pICMS_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>Modalidade BC</label>\n <mat-select [(value)]=\"model.modBC_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of modBaseICMS\" [value]=\"i.item1\">\n {{i.item1}} <small>{{i.item2}}</small>\n </mat-option>\n </mat-select>\n </div>\n </div>\n <h6>ICMS Efetivo CST60/CSOSN500</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pRedBCEfet (%)</label>\n <input id=\"pRedBCEfet_icms\" [ngModel]=\"model.pRedBCEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pRedBCEfet_icmsParser.parse($event)\" (focusout)=\"pRedBCEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pICMSEfet (%)</label>\n <input id=\"picmsEfet_icms\" [ngModel]=\"model.picmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"picmsEfet_icmsParser.parse($event)\" (focusout)=\"picmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCEfet (R$)</label>\n <input id=\"vbcEfet_icms\" [ngModel]=\"model.vbcEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcEfet_icmsParser.parse($event)\" (focusout)=\"vbcEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSEfet (R$)</label>\n <input id=\"vicmsEfet_icms\" [ngModel]=\"model.vicmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsEfet_icmsParser.parse($event)\" (focusout)=\"vicmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Substitui\u00E7\u00E3o Tribut\u00E1ria (ST)</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pST (%)</label>\n <input id=\"psT_icms\" [ngModel]=\"model.psT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"psT_icmsParser.parse($event)\" (focusout)=\"psT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCSTRet (R$)</label>\n <input id=\"vbcstRet_icms\" [ngModel]=\"model.vbcstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcstRet_icmsParser.parse($event)\" (focusout)=\"vbcstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSubs (R$)</label>\n <input id=\"vicmsSubstituto_icms\" [ngModel]=\"model.vicmsSubstituto_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsSubstituto_icmsParser.parse($event)\"\n (focusout)=\"vicmsSubstituto_icmsParser.checkout()\" class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSTRet (R$)</label>\n <input id=\"vicmsstRet_icms\" [ngModel]=\"model.vicmsstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsstRet_icmsParser.parse($event)\" (focusout)=\"vicmsstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Fundo de Combate a Pobresa</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pFCP (%)</label>\n <input id=\"pfcP_icms\" [ngModel]=\"model.pfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcP_icmsParser.parse($event)\" (focusout)=\"pfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCP (R$)</label>\n <input id=\"vbcfcP_icms\" [ngModel]=\"model.vbcfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcP_icmsParser.parse($event)\" (focusout)=\"vbcfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPST (%)</label>\n <input id=\"pfcpsT_icms\" [ngModel]=\"model.pfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpsT_icmsParser.parse($event)\" (focusout)=\"pfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPST (R$)</label>\n <input id=\"vbcfcpsT_icms\" [ngModel]=\"model.vbcfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpsT_icmsParser.parse($event)\" (focusout)=\"vbcfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPSTRet (%)</label>\n <input id=\"pfcpstRet_icms\" [ngModel]=\"model.pfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpstRet_icmsParser.parse($event)\" (focusout)=\"pfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPSTRet (R$)</label>\n <input id=\"vbcfcpstRet_icms\" [ngModel]=\"model.vbcfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpstRet_icmsParser.parse($event)\" (focusout)=\"vbcfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>PIS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/PIS</label>\n <mat-select [(value)]=\"model.csT_pis\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliquota PIS (%)</label>\n <input id=\"ppiS_pis\" [ngModel]=\"model.ppiS_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"ppiS_pisParser.parse($event)\" (focusout)=\"ppiS_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>PIS BC %</label>\n <input id=\"vbC_pis\" [ngModel]=\"model.vbC_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_pisParser.parse($event)\" (focusout)=\"vbC_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n \n <h6>COFINS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/COFINS</label>\n <mat-select [(value)]=\"model.csT_cofins\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. COFINS (%)</label>\n <input id=\"pcofinS_cofins\" [ngModel]=\"model.pcofinS_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pcofinS_cofinsParser.parse($event)\" (focusout)=\"pcofinS_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>COFINS BC %</label>\n <input id=\"vbC_cofins\" [ngModel]=\"model.vbC_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_cofinsParser.parse($event)\" (focusout)=\"vbC_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 2\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.disponivelCardapio\" tabindex=-1>Dispon\u00EDvel no Card\u00E1pio Digital\n </mat-slide-toggle>\n </div>\n <div class=\"form-group\">\n <label>Descri\u00E7\u00E3o</label>\n <textarea id=\"descricao\" [(ngModel)]=\"model.descricao\" cols=\"40\" rows=\"5\" class=\"form-control input-300\"\n tabindex=\"2\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Categoria</label>\n <div class=\"hbox\">\n <div id=\"categoriaCardapio\" (click)=\"editarCategoriaCardapio()\"\n class=\"form-control grow-1 input-selecao input-300\">\n {{model.categoriaCardapioNome}} </div>\n <button (click)=\"editarCategoriaCardapio()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"imagem-container\" *ngIf=\"editMode\">\n <img [src]=\"imgUrl\" class=\"img-fluid\" *ngIf=\"imgUrl\" />\n\n <input type=\"file\" #file placeholder=\"Choose file\" (change)=\"uploadFile(file.files)\" accept=\".jpg,.png\"\n style=\"display: none;\">\n\n <button mat-button color=\"primary\" type=\"button\" (click)=\"file.click()\">Escolher Imagem</button>\n\n <span class=\"upload\" *ngIf=\"progress > 0\">\n {{progress}}%\n </span>\n <span class=\"upload\" *ngIf=\"message\">\n {{message}}\n </span>\n </div>\n\n</div>", styles: [".imagem-container{border:1px solid #ced4da;display:flex;flex-direction:column;border-radius:9px;max-width:460px}small{font-size:xx-small}.badge{color:#fff;font-size:xx-small;display:flex;align-items:center;padding:4px;border-radius:13px;margin-left:2px}.badge.encontrado{background:#05a301;border:1px solid #28d112}.badge.nao-encontrado{background:#a30101;border:1px solid #d17812}.badge.buscando{background:#929292;border:1px solid #a3a3a3}h6{margin:8px 0;color:#666}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i12.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i12.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: ["selectedItem", "items"], outputs: ["change"] }, { kind: "pipe", type: i6.DecimalPipe, name: "number" }], animations: [lateralAnimation] });
|
|
2748
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoFormComponent, decorators: [{
|
|
2366
|
+
ProdutoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoFormComponent, deps: [{ token: i3.MatDialog }, { token: CommonWebService }, { token: i1.HttpClient }, { token: AuthDataService }, { token: NotificationService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2367
|
+
ProdutoFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoFormComponent, selector: "ox-produto-form", inputs: { editMode: "editMode", model: "model" }, outputs: { nextIdClick: "nextIdClick" }, ngImport: i0, template: "<div style=\"margin-bottom: 16px\">\n <ox-radio-button-group (change)=\"changeModo($event)\" [items]=\"tabs\" class=\"tool-item-container\">\n </ox-radio-button-group>\n</div>\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 0\">\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>C\u00F3digo</label>\n <div class=\"hbox\">\n <input id=\"id\" [attr.readonly]=\"editMode\" [(ngModel)]=\"model.id\" class=\"form-control input-120\"\n tabindex=\"2\">\n <button (click)=\"nextIdClick.emit()\" *ngIf=\"!editMode\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n lightbulb\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Refer\u00EAncia</label>\n <input id=\"referencia\" [(ngModel)]=\"model.referencia\" class=\"form-control input-120\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" cdkFocusInitial class=\"form-control input-300\" tabindex=\"2\">\n </div>\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>Pre\u00E7o de Venda</label>\n <input id=\"precoVenda\" [ngModel]=\"model.precoVenda | number:'1.2-2'\"\n (ngModelChange)=\"precoVendaParser.parse($event)\" (focusout)=\"precoVendaParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o p/ Func.</label>\n <input id=\"precoFuncionario\" [ngModel]=\"model.precoFuncionario | number:'1.2-2'\"\n (ngModelChange)=\"precoFuncParser.parse($event)\" (focusout)=\"precoFuncParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o de Custo</label>\n <input id=\"precoCusto\" [ngModel]=\"model.precoCusto | number:'1.2-2'\"\n (ngModelChange)=\"precoCustoParser.parse($event)\" (focusout)=\"precoCustoParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Grupo</label>\n <div class=\"hbox\">\n <div id=\"grupo\" (click)=\"editarGrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.grupoNome}} </div>\n <button (click)=\"editarGrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group\">\n <label>Subgrupo</label>\n <div class=\"hbox\">\n <div id=\"subgrupo\" (click)=\"editarSubgrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.subgrupoNome}} </div>\n <button (click)=\"editarSubgrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Unidade</label>\n <input id=\"unidade\" [(ngModel)]=\"model.unidade\" class=\"form-control input-120\">\n </div>\n <div class=\"form-group\">\n <label>Estoque Min.</label>\n <input id=\"estoqueMinimo\" [(ngModel)]=\"model.estoqueMinimo\" class=\"form-control input-120\">\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>C\u00F3digo Patrim\u00F4nio</label>\n <input id=\"codigoPatrimonio\" [(ngModel)]=\"model.codigoPatrimonio\" class=\"form-control input-120\"\n maxlength=\"36\">\n </div>\n <div class=\"form-group\">\n <label>Obs.</label>\n <input id=\"obs\" [(ngModel)]=\"model.obs\" class=\"form-control input-300\" maxlength=\"300\">\n </div>\n </div>\n \n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Setor Subestoque</label>\n <mat-select [(value)]=\"model.setorSubEstoqueId\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of setores\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Qtd. Subestoque</label>\n <input id=\"qtdMinSubEstoque\" [(ngModel)]=\"model.qtdMinSubEstoque\" class=\"form-control input-120 text-right\">\n </div>\n </div>\n <div class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.estoqueControlado\" tabindex=-1>Controlado no Estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimiCozinha\" tabindex=-1>Imprime Cozinha</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimeCorredor\" tabindex=-1>Imprime Corredor</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.verNaRecepcao\" tabindex=-1>Ver na Recep\u00E7\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.omiteCliente\" tabindex=-1>N\u00E3o Exibe para o Cliente na Sa\u00EDda\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.isAtivo\" tabindex=-1>Ativado</mat-slide-toggle>\n </div>\n\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 1\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.emiteNFCe\" tabindex=-1>Emite Fiscal\n </mat-slide-toggle>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>GTIN</label>\n <input id=\"gtin\" [(ngModel)]=\"model.gtin\" class=\"form-control input-120\" placeholder=\"SEM GTIN\"\n maxlength=\"14\">\n </div>\n <div class=\"form-group\">\n <label>CFOP</label>\n <input id=\"cfop\" [(ngModel)]=\"model.cfop\" [matAutocomplete]=\"auto\" matInput class=\"form-control input-100\"\n maxlength=\"4\">\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of cfopList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"form-group\">\n <label>NCM</label>\n <div class=\"hbox\">\n <input id=\"ncm\" (input)=\"lazyTriggerNcm.fire()\" [(ngModel)]=\"model.ncm\" class=\"form-control input-100\"\n maxlength=\"8\">\n <button (click)=\"editarNCM()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n <span class=\"badge buscando\" *ngIf=\"isBusy\">Buscando...</span>\n <span class=\"badge encontrado\" *ngIf=\"ncmEncontrado\">Encontrado</span>\n <span class=\"badge nao-encontrado\" *ngIf=\"ncmNaoEncontrado\">N\u00E3o encontrado</span>\n </div>\n </div>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CEST</label>\n <input id=\"cest\" [(ngModel)]=\"model.cest\" autocomplete=\"off\" class=\"form-control input-120\" maxlength=\"7\">\n </div>\n <div class=\"form-group\">\n <label>ICMS (ECF/SAT)</label>\n <input id=\"aliquotaICMS\" [(ngModel)]=\"model.aliquotaICMS\" autocomplete=\"off\" class=\"form-control input-100 text-right\"\n maxlength=\"5\">\n </div>\n <div class=\"form-group\">\n <label>S. T. (ECF/SAT)</label>\n <input id=\"sitTrib\" [(ngModel)]=\"model.sitTrib\" autocomplete=\"off\" [matAutocomplete]=\"autoST\" matInput\n class=\"form-control input-120\" maxlength=\"5\">\n <mat-autocomplete #autoST=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of stList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n </div>\n <h4>Campos da NFC-e</h4>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/CSOSN</label>\n <mat-select [(value)]=\"model.csT_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of cstICMSList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. ICMS (%)</label>\n <input id=\"pICMS_icms\" [ngModel]=\"model.pICMS_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pICMS_icmsParser.parse($event)\" (focusout)=\"pICMS_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>Modalidade BC</label>\n <mat-select [(value)]=\"model.modBC_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of modBaseICMS\" [value]=\"i.item1\">\n {{i.item1}} <small>{{i.item2}}</small>\n </mat-option>\n </mat-select>\n </div>\n </div>\n <h6>ICMS Efetivo CST60/CSOSN500</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pRedBCEfet (%)</label>\n <input id=\"pRedBCEfet_icms\" [ngModel]=\"model.pRedBCEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pRedBCEfet_icmsParser.parse($event)\" (focusout)=\"pRedBCEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pICMSEfet (%)</label>\n <input id=\"picmsEfet_icms\" [ngModel]=\"model.picmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"picmsEfet_icmsParser.parse($event)\" (focusout)=\"picmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCEfet (R$)</label>\n <input id=\"vbcEfet_icms\" [ngModel]=\"model.vbcEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcEfet_icmsParser.parse($event)\" (focusout)=\"vbcEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSEfet (R$)</label>\n <input id=\"vicmsEfet_icms\" [ngModel]=\"model.vicmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsEfet_icmsParser.parse($event)\" (focusout)=\"vicmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Substitui\u00E7\u00E3o Tribut\u00E1ria (ST)</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pST (%)</label>\n <input id=\"psT_icms\" [ngModel]=\"model.psT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"psT_icmsParser.parse($event)\" (focusout)=\"psT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCSTRet (R$)</label>\n <input id=\"vbcstRet_icms\" [ngModel]=\"model.vbcstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcstRet_icmsParser.parse($event)\" (focusout)=\"vbcstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSubs (R$)</label>\n <input id=\"vicmsSubstituto_icms\" [ngModel]=\"model.vicmsSubstituto_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsSubstituto_icmsParser.parse($event)\"\n (focusout)=\"vicmsSubstituto_icmsParser.checkout()\" class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSTRet (R$)</label>\n <input id=\"vicmsstRet_icms\" [ngModel]=\"model.vicmsstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsstRet_icmsParser.parse($event)\" (focusout)=\"vicmsstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Fundo de Combate a Pobresa</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pFCP (%)</label>\n <input id=\"pfcP_icms\" [ngModel]=\"model.pfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcP_icmsParser.parse($event)\" (focusout)=\"pfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCP (R$)</label>\n <input id=\"vbcfcP_icms\" [ngModel]=\"model.vbcfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcP_icmsParser.parse($event)\" (focusout)=\"vbcfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPST (%)</label>\n <input id=\"pfcpsT_icms\" [ngModel]=\"model.pfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpsT_icmsParser.parse($event)\" (focusout)=\"pfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPST (R$)</label>\n <input id=\"vbcfcpsT_icms\" [ngModel]=\"model.vbcfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpsT_icmsParser.parse($event)\" (focusout)=\"vbcfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPSTRet (%)</label>\n <input id=\"pfcpstRet_icms\" [ngModel]=\"model.pfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpstRet_icmsParser.parse($event)\" (focusout)=\"pfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPSTRet (R$)</label>\n <input id=\"vbcfcpstRet_icms\" [ngModel]=\"model.vbcfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpstRet_icmsParser.parse($event)\" (focusout)=\"vbcfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>PIS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/PIS</label>\n <mat-select [(value)]=\"model.csT_pis\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliquota PIS (%)</label>\n <input id=\"ppiS_pis\" [ngModel]=\"model.ppiS_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"ppiS_pisParser.parse($event)\" (focusout)=\"ppiS_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>PIS BC %</label>\n <input id=\"vbC_pis\" [ngModel]=\"model.vbC_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_pisParser.parse($event)\" (focusout)=\"vbC_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n \n <h6>COFINS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/COFINS</label>\n <mat-select [(value)]=\"model.csT_cofins\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. COFINS (%)</label>\n <input id=\"pcofinS_cofins\" [ngModel]=\"model.pcofinS_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pcofinS_cofinsParser.parse($event)\" (focusout)=\"pcofinS_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>COFINS BC %</label>\n <input id=\"vbC_cofins\" [ngModel]=\"model.vbC_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_cofinsParser.parse($event)\" (focusout)=\"vbC_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 2\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.disponivelCardapio\" tabindex=-1>Dispon\u00EDvel no Card\u00E1pio Digital\n </mat-slide-toggle>\n </div>\n <div class=\"form-group\">\n <label>Descri\u00E7\u00E3o</label>\n <textarea id=\"descricao\" [(ngModel)]=\"model.descricao\" cols=\"40\" rows=\"5\" class=\"form-control input-300\"\n tabindex=\"2\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Categoria</label>\n <div class=\"hbox\">\n <div id=\"categoriaCardapio\" (click)=\"editarCategoriaCardapio()\"\n class=\"form-control grow-1 input-selecao input-300\">\n {{model.categoriaCardapioNome}} </div>\n <button (click)=\"editarCategoriaCardapio()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"imagem-container\" *ngIf=\"editMode\">\n <img [src]=\"imgUrl\" class=\"img-fluid\" *ngIf=\"imgUrl\" />\n\n <input type=\"file\" #file placeholder=\"Choose file\" (change)=\"uploadFile(file.files)\" accept=\".jpg,.png\"\n style=\"display: none;\">\n\n <button mat-button color=\"primary\" type=\"button\" (click)=\"file.click()\">Escolher Imagem</button>\n\n <span class=\"upload\" *ngIf=\"progress > 0\">\n {{progress}}%\n </span>\n <span class=\"upload\" *ngIf=\"message\">\n {{message}}\n </span>\n </div>\n\n</div>", styles: [".imagem-container{border:1px solid #ced4da;display:flex;flex-direction:column;border-radius:9px;max-width:460px}small{font-size:xx-small}.badge{color:#fff;font-size:xx-small;display:flex;align-items:center;padding:4px;border-radius:13px;margin-left:2px}.badge.encontrado{background:#05a301;border:1px solid #28d112}.badge.nao-encontrado{background:#a30101;border:1px solid #d17812}.badge.buscando{background:#929292;border:1px solid #a3a3a3}h6{margin:8px 0;color:#666}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i12.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i12.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: RadioButtonGroupComponent, selector: "ox-radio-button-group", inputs: ["selectedItem", "items"], outputs: ["change"] }, { kind: "pipe", type: i6.DecimalPipe, name: "number" }], animations: [lateralAnimation] });
|
|
2368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoFormComponent, decorators: [{
|
|
2369
|
+
type: Component,
|
|
2370
|
+
args: [{ selector: 'ox-produto-form', animations: [lateralAnimation], template: "<div style=\"margin-bottom: 16px\">\n <ox-radio-button-group (change)=\"changeModo($event)\" [items]=\"tabs\" class=\"tool-item-container\">\n </ox-radio-button-group>\n</div>\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 0\">\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>C\u00F3digo</label>\n <div class=\"hbox\">\n <input id=\"id\" [attr.readonly]=\"editMode\" [(ngModel)]=\"model.id\" class=\"form-control input-120\"\n tabindex=\"2\">\n <button (click)=\"nextIdClick.emit()\" *ngIf=\"!editMode\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n lightbulb\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Refer\u00EAncia</label>\n <input id=\"referencia\" [(ngModel)]=\"model.referencia\" class=\"form-control input-120\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" cdkFocusInitial class=\"form-control input-300\" tabindex=\"2\">\n </div>\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>Pre\u00E7o de Venda</label>\n <input id=\"precoVenda\" [ngModel]=\"model.precoVenda | number:'1.2-2'\"\n (ngModelChange)=\"precoVendaParser.parse($event)\" (focusout)=\"precoVendaParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o p/ Func.</label>\n <input id=\"precoFuncionario\" [ngModel]=\"model.precoFuncionario | number:'1.2-2'\"\n (ngModelChange)=\"precoFuncParser.parse($event)\" (focusout)=\"precoFuncParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o de Custo</label>\n <input id=\"precoCusto\" [ngModel]=\"model.precoCusto | number:'1.2-2'\"\n (ngModelChange)=\"precoCustoParser.parse($event)\" (focusout)=\"precoCustoParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Grupo</label>\n <div class=\"hbox\">\n <div id=\"grupo\" (click)=\"editarGrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.grupoNome}} </div>\n <button (click)=\"editarGrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group\">\n <label>Subgrupo</label>\n <div class=\"hbox\">\n <div id=\"subgrupo\" (click)=\"editarSubgrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.subgrupoNome}} </div>\n <button (click)=\"editarSubgrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Unidade</label>\n <input id=\"unidade\" [(ngModel)]=\"model.unidade\" class=\"form-control input-120\">\n </div>\n <div class=\"form-group\">\n <label>Estoque Min.</label>\n <input id=\"estoqueMinimo\" [(ngModel)]=\"model.estoqueMinimo\" class=\"form-control input-120\">\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>C\u00F3digo Patrim\u00F4nio</label>\n <input id=\"codigoPatrimonio\" [(ngModel)]=\"model.codigoPatrimonio\" class=\"form-control input-120\"\n maxlength=\"36\">\n </div>\n <div class=\"form-group\">\n <label>Obs.</label>\n <input id=\"obs\" [(ngModel)]=\"model.obs\" class=\"form-control input-300\" maxlength=\"300\">\n </div>\n </div>\n \n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Setor Subestoque</label>\n <mat-select [(value)]=\"model.setorSubEstoqueId\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of setores\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Qtd. Subestoque</label>\n <input id=\"qtdMinSubEstoque\" [(ngModel)]=\"model.qtdMinSubEstoque\" class=\"form-control input-120 text-right\">\n </div>\n </div>\n <div class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.estoqueControlado\" tabindex=-1>Controlado no Estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimiCozinha\" tabindex=-1>Imprime Cozinha</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimeCorredor\" tabindex=-1>Imprime Corredor</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.verNaRecepcao\" tabindex=-1>Ver na Recep\u00E7\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.omiteCliente\" tabindex=-1>N\u00E3o Exibe para o Cliente na Sa\u00EDda\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.isAtivo\" tabindex=-1>Ativado</mat-slide-toggle>\n </div>\n\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 1\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.emiteNFCe\" tabindex=-1>Emite Fiscal\n </mat-slide-toggle>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>GTIN</label>\n <input id=\"gtin\" [(ngModel)]=\"model.gtin\" class=\"form-control input-120\" placeholder=\"SEM GTIN\"\n maxlength=\"14\">\n </div>\n <div class=\"form-group\">\n <label>CFOP</label>\n <input id=\"cfop\" [(ngModel)]=\"model.cfop\" [matAutocomplete]=\"auto\" matInput class=\"form-control input-100\"\n maxlength=\"4\">\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of cfopList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"form-group\">\n <label>NCM</label>\n <div class=\"hbox\">\n <input id=\"ncm\" (input)=\"lazyTriggerNcm.fire()\" [(ngModel)]=\"model.ncm\" class=\"form-control input-100\"\n maxlength=\"8\">\n <button (click)=\"editarNCM()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n <span class=\"badge buscando\" *ngIf=\"isBusy\">Buscando...</span>\n <span class=\"badge encontrado\" *ngIf=\"ncmEncontrado\">Encontrado</span>\n <span class=\"badge nao-encontrado\" *ngIf=\"ncmNaoEncontrado\">N\u00E3o encontrado</span>\n </div>\n </div>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CEST</label>\n <input id=\"cest\" [(ngModel)]=\"model.cest\" autocomplete=\"off\" class=\"form-control input-120\" maxlength=\"7\">\n </div>\n <div class=\"form-group\">\n <label>ICMS (ECF/SAT)</label>\n <input id=\"aliquotaICMS\" [(ngModel)]=\"model.aliquotaICMS\" autocomplete=\"off\" class=\"form-control input-100 text-right\"\n maxlength=\"5\">\n </div>\n <div class=\"form-group\">\n <label>S. T. (ECF/SAT)</label>\n <input id=\"sitTrib\" [(ngModel)]=\"model.sitTrib\" autocomplete=\"off\" [matAutocomplete]=\"autoST\" matInput\n class=\"form-control input-120\" maxlength=\"5\">\n <mat-autocomplete #autoST=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of stList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n </div>\n <h4>Campos da NFC-e</h4>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/CSOSN</label>\n <mat-select [(value)]=\"model.csT_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of cstICMSList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. ICMS (%)</label>\n <input id=\"pICMS_icms\" [ngModel]=\"model.pICMS_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pICMS_icmsParser.parse($event)\" (focusout)=\"pICMS_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>Modalidade BC</label>\n <mat-select [(value)]=\"model.modBC_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of modBaseICMS\" [value]=\"i.item1\">\n {{i.item1}} <small>{{i.item2}}</small>\n </mat-option>\n </mat-select>\n </div>\n </div>\n <h6>ICMS Efetivo CST60/CSOSN500</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pRedBCEfet (%)</label>\n <input id=\"pRedBCEfet_icms\" [ngModel]=\"model.pRedBCEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pRedBCEfet_icmsParser.parse($event)\" (focusout)=\"pRedBCEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pICMSEfet (%)</label>\n <input id=\"picmsEfet_icms\" [ngModel]=\"model.picmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"picmsEfet_icmsParser.parse($event)\" (focusout)=\"picmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCEfet (R$)</label>\n <input id=\"vbcEfet_icms\" [ngModel]=\"model.vbcEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcEfet_icmsParser.parse($event)\" (focusout)=\"vbcEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSEfet (R$)</label>\n <input id=\"vicmsEfet_icms\" [ngModel]=\"model.vicmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsEfet_icmsParser.parse($event)\" (focusout)=\"vicmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Substitui\u00E7\u00E3o Tribut\u00E1ria (ST)</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pST (%)</label>\n <input id=\"psT_icms\" [ngModel]=\"model.psT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"psT_icmsParser.parse($event)\" (focusout)=\"psT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCSTRet (R$)</label>\n <input id=\"vbcstRet_icms\" [ngModel]=\"model.vbcstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcstRet_icmsParser.parse($event)\" (focusout)=\"vbcstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSubs (R$)</label>\n <input id=\"vicmsSubstituto_icms\" [ngModel]=\"model.vicmsSubstituto_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsSubstituto_icmsParser.parse($event)\"\n (focusout)=\"vicmsSubstituto_icmsParser.checkout()\" class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSTRet (R$)</label>\n <input id=\"vicmsstRet_icms\" [ngModel]=\"model.vicmsstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsstRet_icmsParser.parse($event)\" (focusout)=\"vicmsstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Fundo de Combate a Pobresa</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pFCP (%)</label>\n <input id=\"pfcP_icms\" [ngModel]=\"model.pfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcP_icmsParser.parse($event)\" (focusout)=\"pfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCP (R$)</label>\n <input id=\"vbcfcP_icms\" [ngModel]=\"model.vbcfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcP_icmsParser.parse($event)\" (focusout)=\"vbcfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPST (%)</label>\n <input id=\"pfcpsT_icms\" [ngModel]=\"model.pfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpsT_icmsParser.parse($event)\" (focusout)=\"pfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPST (R$)</label>\n <input id=\"vbcfcpsT_icms\" [ngModel]=\"model.vbcfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpsT_icmsParser.parse($event)\" (focusout)=\"vbcfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPSTRet (%)</label>\n <input id=\"pfcpstRet_icms\" [ngModel]=\"model.pfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpstRet_icmsParser.parse($event)\" (focusout)=\"pfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPSTRet (R$)</label>\n <input id=\"vbcfcpstRet_icms\" [ngModel]=\"model.vbcfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpstRet_icmsParser.parse($event)\" (focusout)=\"vbcfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>PIS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/PIS</label>\n <mat-select [(value)]=\"model.csT_pis\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliquota PIS (%)</label>\n <input id=\"ppiS_pis\" [ngModel]=\"model.ppiS_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"ppiS_pisParser.parse($event)\" (focusout)=\"ppiS_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>PIS BC %</label>\n <input id=\"vbC_pis\" [ngModel]=\"model.vbC_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_pisParser.parse($event)\" (focusout)=\"vbC_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n \n <h6>COFINS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/COFINS</label>\n <mat-select [(value)]=\"model.csT_cofins\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. COFINS (%)</label>\n <input id=\"pcofinS_cofins\" [ngModel]=\"model.pcofinS_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pcofinS_cofinsParser.parse($event)\" (focusout)=\"pcofinS_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>COFINS BC %</label>\n <input id=\"vbC_cofins\" [ngModel]=\"model.vbC_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_cofinsParser.parse($event)\" (focusout)=\"vbC_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 2\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.disponivelCardapio\" tabindex=-1>Dispon\u00EDvel no Card\u00E1pio Digital\n </mat-slide-toggle>\n </div>\n <div class=\"form-group\">\n <label>Descri\u00E7\u00E3o</label>\n <textarea id=\"descricao\" [(ngModel)]=\"model.descricao\" cols=\"40\" rows=\"5\" class=\"form-control input-300\"\n tabindex=\"2\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Categoria</label>\n <div class=\"hbox\">\n <div id=\"categoriaCardapio\" (click)=\"editarCategoriaCardapio()\"\n class=\"form-control grow-1 input-selecao input-300\">\n {{model.categoriaCardapioNome}} </div>\n <button (click)=\"editarCategoriaCardapio()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"imagem-container\" *ngIf=\"editMode\">\n <img [src]=\"imgUrl\" class=\"img-fluid\" *ngIf=\"imgUrl\" />\n\n <input type=\"file\" #file placeholder=\"Choose file\" (change)=\"uploadFile(file.files)\" accept=\".jpg,.png\"\n style=\"display: none;\">\n\n <button mat-button color=\"primary\" type=\"button\" (click)=\"file.click()\">Escolher Imagem</button>\n\n <span class=\"upload\" *ngIf=\"progress > 0\">\n {{progress}}%\n </span>\n <span class=\"upload\" *ngIf=\"message\">\n {{message}}\n </span>\n </div>\n\n</div>", styles: [".imagem-container{border:1px solid #ced4da;display:flex;flex-direction:column;border-radius:9px;max-width:460px}small{font-size:xx-small}.badge{color:#fff;font-size:xx-small;display:flex;align-items:center;padding:4px;border-radius:13px;margin-left:2px}.badge.encontrado{background:#05a301;border:1px solid #28d112}.badge.nao-encontrado{background:#a30101;border:1px solid #d17812}.badge.buscando{background:#929292;border:1px solid #a3a3a3}h6{margin:8px 0;color:#666}\n"] }]
|
|
2371
|
+
}], ctorParameters: function () { return [{ type: i3.MatDialog }, { type: CommonWebService }, { type: i1.HttpClient }, { type: AuthDataService }, { type: NotificationService }, { type: ScreenHelperService }]; }, propDecorators: { editMode: [{
|
|
2372
|
+
type: Input
|
|
2373
|
+
}], nextIdClick: [{
|
|
2374
|
+
type: Output
|
|
2375
|
+
}], model: [{
|
|
2376
|
+
type: Input
|
|
2377
|
+
}] } });
|
|
2378
|
+
|
|
2379
|
+
class ProdutoAddDialogComponent {
|
|
2380
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2381
|
+
this.ws = ws;
|
|
2382
|
+
this.notification = notification;
|
|
2383
|
+
this.dataDialog = dataDialog;
|
|
2384
|
+
this.dialog = dialog;
|
|
2385
|
+
this.elRef = elRef;
|
|
2386
|
+
this.dialogRef = dialogRef;
|
|
2387
|
+
this.screenHelper = screenHelper;
|
|
2388
|
+
this.isBusy = false;
|
|
2389
|
+
this.focus = new FocusService();
|
|
2390
|
+
this.model = createProduct();
|
|
2391
|
+
this.mobile = this.screenHelper.isMedium;
|
|
2392
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2393
|
+
}
|
|
2394
|
+
ngOnInit() {
|
|
2395
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
2396
|
+
this.getNextId();
|
|
2397
|
+
}
|
|
2398
|
+
ngOnDestroy() {
|
|
2399
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
2400
|
+
}
|
|
2401
|
+
salvar() {
|
|
2402
|
+
if (!this.model)
|
|
2403
|
+
return;
|
|
2404
|
+
const valMsg = validaProduto(this.model, this.focus);
|
|
2405
|
+
if (valMsg) {
|
|
2406
|
+
this.notification.showMsgError(valMsg);
|
|
2407
|
+
return;
|
|
2408
|
+
}
|
|
2409
|
+
this.isBusy = true;
|
|
2410
|
+
this.ws.addProduto(this.model)
|
|
2411
|
+
.subscribe(r => {
|
|
2412
|
+
this.isBusy = false;
|
|
2413
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
2414
|
+
if (this.dialogRef)
|
|
2415
|
+
this.dialogRef.close(true);
|
|
2416
|
+
}, err => {
|
|
2417
|
+
this.isBusy = false;
|
|
2418
|
+
this.notification.showMsg(err.error);
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
getNextId() {
|
|
2422
|
+
this.isBusy = true;
|
|
2423
|
+
this.ws.getNextIdProduto()
|
|
2424
|
+
.subscribe(r => {
|
|
2425
|
+
this.model.id = r;
|
|
2426
|
+
this.model.referencia = '' + r;
|
|
2427
|
+
this.isBusy = false;
|
|
2428
|
+
}, err => {
|
|
2429
|
+
this.isBusy = false;
|
|
2430
|
+
this.notification.showMsg(err.error);
|
|
2431
|
+
});
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
ProdutoAddDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoAddDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2435
|
+
ProdutoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoAddDialogComponent, selector: "ox-produto-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-form (nextIdClick)=\"getNextId()\" [model]=\"model\" *ngIf=\"model\"></ox-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoFormComponent, selector: "ox-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }] });
|
|
2436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoAddDialogComponent, decorators: [{
|
|
2437
|
+
type: Component,
|
|
2438
|
+
args: [{ selector: 'ox-produto-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-form (nextIdClick)=\"getNextId()\" [model]=\"model\" *ngIf=\"model\"></ox-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
2439
|
+
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2440
|
+
type: Inject,
|
|
2441
|
+
args: [MAT_DIALOG_DATA]
|
|
2442
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
|
|
2443
|
+
|
|
2444
|
+
class ProdutoBuscaFiltrosDialogComponent {
|
|
2445
|
+
constructor(d, ws, notification, dialogRef) {
|
|
2446
|
+
this.d = d;
|
|
2447
|
+
this.ws = ws;
|
|
2448
|
+
this.notification = notification;
|
|
2449
|
+
this.dialogRef = dialogRef;
|
|
2450
|
+
this.isBusy = false;
|
|
2451
|
+
this.produtosGrupos = [];
|
|
2452
|
+
this.d.setting.grupos = undefined;
|
|
2453
|
+
}
|
|
2454
|
+
ngOnInit() {
|
|
2455
|
+
this.getProdutos();
|
|
2456
|
+
}
|
|
2457
|
+
getProdutos() {
|
|
2458
|
+
this.isBusy = true;
|
|
2459
|
+
this.ws.getAllProdutoGrupo()
|
|
2460
|
+
.subscribe(r => {
|
|
2461
|
+
this.produtosGrupos = r;
|
|
2462
|
+
console.info(r);
|
|
2463
|
+
this.isBusy = false;
|
|
2464
|
+
}, err => {
|
|
2465
|
+
this.isBusy = false;
|
|
2466
|
+
this.notification.showHttpError(err);
|
|
2467
|
+
});
|
|
2468
|
+
}
|
|
2469
|
+
salvar() {
|
|
2470
|
+
this.dialogRef.close(this.d);
|
|
2471
|
+
}
|
|
2472
|
+
changeGruposProdutos(ev) {
|
|
2473
|
+
const itens = ev.value;
|
|
2474
|
+
this.d.setting.grupos = itens;
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
ProdutoBuscaFiltrosDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoBuscaFiltrosDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2478
|
+
ProdutoBuscaFiltrosDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoBuscaFiltrosDialogComponent, selector: "ox-produto-busca-filtros-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <span class=\"titulo\">Filtros de Pesquisa</span>\n <button mat-icon-button mat-dialog-close>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <h4>Op\u00E7\u00F5es de exibi\u00E7\u00E3o</h4>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeNaoControladoEstoque\" tabindex=-1>Exibir n\u00E3o controlado no\n estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeApenasMostraRecepcao\" tabindex=-1>Apenas o que mostra na recep\u00E7\u00E3o\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeImprimiCozinha\" tabindex=-1>Exibir imprime na cozinha\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeInativo\" tabindex=-1>Exibir desativados</mat-slide-toggle>\n </div>\n <div class=\"vbox margin-top-16\">\n <h4>Selecione um ou mais grupos</h4>\n <mat-select (selectionChange)=\"changeGruposProdutos($event)\" multiple>\n <mat-option *ngFor=\"let i of produtosGrupos\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"vbox margin-top-32\">\n <h4>Quantidade de Itens por P\u00E1gina</h4>\n\n <div class=\"form-group\">\n <label>Quantidade</label>\n <input [(ngModel)]=\"d.qtd\" class=\"form-control input-120\" maxlength=\"10\" type=\"number\">\n </div>\n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button (click)=\"salvar()\">CONFIRMAR</button>\n</div>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;margin-left:16px;text-transform:uppercase;flex-grow:1}mat-select{background:white;height:36px;padding:8px 16px;border-radius:.25rem;border:1px solid #ced4da}h4{margin:0 0 16px}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
|
|
2479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoBuscaFiltrosDialogComponent, decorators: [{
|
|
2480
|
+
type: Component,
|
|
2481
|
+
args: [{ selector: 'ox-produto-busca-filtros-dialog', template: "<div class=\"ox-header\">\n <span class=\"titulo\">Filtros de Pesquisa</span>\n <button mat-icon-button mat-dialog-close>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <h4>Op\u00E7\u00F5es de exibi\u00E7\u00E3o</h4>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeNaoControladoEstoque\" tabindex=-1>Exibir n\u00E3o controlado no\n estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeApenasMostraRecepcao\" tabindex=-1>Apenas o que mostra na recep\u00E7\u00E3o\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeImprimiCozinha\" tabindex=-1>Exibir imprime na cozinha\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"d.setting.exibeInativo\" tabindex=-1>Exibir desativados</mat-slide-toggle>\n </div>\n <div class=\"vbox margin-top-16\">\n <h4>Selecione um ou mais grupos</h4>\n <mat-select (selectionChange)=\"changeGruposProdutos($event)\" multiple>\n <mat-option *ngFor=\"let i of produtosGrupos\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"vbox margin-top-32\">\n <h4>Quantidade de Itens por P\u00E1gina</h4>\n\n <div class=\"form-group\">\n <label>Quantidade</label>\n <input [(ngModel)]=\"d.qtd\" class=\"form-control input-120\" maxlength=\"10\" type=\"number\">\n </div>\n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button (click)=\"salvar()\">CONFIRMAR</button>\n</div>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}.header{display:flex;background:white;border-bottom:1px solid #eee}.header .titulo{align-self:center;margin-left:16px;text-transform:uppercase;flex-grow:1}mat-select{background:white;height:36px;padding:8px 16px;border-radius:.25rem;border:1px solid #ced4da}h4{margin:0 0 16px}\n"] }]
|
|
2482
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2483
|
+
type: Inject,
|
|
2484
|
+
args: [MAT_DIALOG_DATA]
|
|
2485
|
+
}] }, { type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialogRef }]; } });
|
|
2486
|
+
|
|
2487
|
+
class ProdutoEditDialogComponent {
|
|
2488
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2489
|
+
this.ws = ws;
|
|
2490
|
+
this.notification = notification;
|
|
2491
|
+
this.dataDialog = dataDialog;
|
|
2492
|
+
this.dialog = dialog;
|
|
2493
|
+
this.elRef = elRef;
|
|
2494
|
+
this.dialogRef = dialogRef;
|
|
2495
|
+
this.screenHelper = screenHelper;
|
|
2496
|
+
this.isBusy = false;
|
|
2497
|
+
this.focus = new FocusService();
|
|
2498
|
+
if (dataDialog) {
|
|
2499
|
+
this.model = dataDialog;
|
|
2500
|
+
}
|
|
2501
|
+
this.mobile = this.screenHelper.isMedium;
|
|
2502
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2503
|
+
}
|
|
2504
|
+
ngOnInit() {
|
|
2505
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
2506
|
+
}
|
|
2507
|
+
ngOnDestroy() {
|
|
2508
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
2509
|
+
}
|
|
2510
|
+
salvar() {
|
|
2511
|
+
if (!this.model)
|
|
2512
|
+
return;
|
|
2513
|
+
const valMsg = validaProduto(this.model, this.focus);
|
|
2514
|
+
if (valMsg) {
|
|
2515
|
+
this.notification.showMsgError(valMsg);
|
|
2516
|
+
return;
|
|
2517
|
+
}
|
|
2518
|
+
this.isBusy = true;
|
|
2519
|
+
this.ws.saveProduto(this.model)
|
|
2520
|
+
.subscribe(r => {
|
|
2521
|
+
this.isBusy = false;
|
|
2522
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
2523
|
+
if (this.dialogRef)
|
|
2524
|
+
this.dialogRef.close(true);
|
|
2525
|
+
}, err => {
|
|
2526
|
+
this.isBusy = false;
|
|
2527
|
+
this.notification.showMsg(err.error);
|
|
2528
|
+
});
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
ProdutoEditDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoEditDialogComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: MAT_DIALOG_DATA }, { token: i3.MatDialog }, { token: i0.ElementRef }, { token: i3.MatDialogRef }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2532
|
+
ProdutoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoEditDialogComponent, selector: "ox-produto-edit-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></ox-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoFormComponent, selector: "ox-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }] });
|
|
2533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoEditDialogComponent, decorators: [{
|
|
2534
|
+
type: Component,
|
|
2535
|
+
args: [{ selector: 'ox-produto-edit-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Editando Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <ox-produto-form [model]=\"model\" [editMode]=\"true\" *ngIf=\"model\"></ox-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
2536
|
+
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2537
|
+
type: Inject,
|
|
2538
|
+
args: [MAT_DIALOG_DATA]
|
|
2539
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
|
|
2540
|
+
|
|
2541
|
+
class ProdutoSearchSetting extends SearchSetting {
|
|
2542
|
+
constructor() {
|
|
2543
|
+
super();
|
|
2544
|
+
this.exibeNaoControladoEstoque = true;
|
|
2545
|
+
this.exibeApenasMostraRecepcao = false;
|
|
2546
|
+
this.exibeInativo = false;
|
|
2547
|
+
this.exibeImprimiCozinha = false;
|
|
2548
|
+
this.exibeHePrato = false;
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
class PaginatorComponent {
|
|
2553
|
+
constructor() {
|
|
2554
|
+
this.paginaAtualChange = new EventEmitter();
|
|
2555
|
+
this.totalPaginasChange = new EventEmitter();
|
|
2556
|
+
this.change = new EventEmitter();
|
|
2557
|
+
this._paginaAtual = 1;
|
|
2558
|
+
this._totalPaginas = 1;
|
|
2559
|
+
this.inicio = true;
|
|
2560
|
+
this.fim = true;
|
|
2561
|
+
this.pageSize = 0;
|
|
2562
|
+
}
|
|
2563
|
+
get paginaAtual() {
|
|
2564
|
+
return this._paginaAtual;
|
|
2565
|
+
}
|
|
2566
|
+
set paginaAtual(val) {
|
|
2567
|
+
this._paginaAtual = val;
|
|
2568
|
+
this.paginaAtualChange.emit(val);
|
|
2569
|
+
this.refreshUI();
|
|
2570
|
+
}
|
|
2571
|
+
get totalPaginas() {
|
|
2572
|
+
return this._totalPaginas;
|
|
2573
|
+
}
|
|
2574
|
+
set totalPaginas(val) {
|
|
2575
|
+
this._totalPaginas = val;
|
|
2576
|
+
this.totalPaginasChange.emit(val);
|
|
2577
|
+
this.refreshUI();
|
|
2578
|
+
}
|
|
2579
|
+
ngOnInit() {
|
|
2580
|
+
}
|
|
2581
|
+
trocaPagina(pagina) {
|
|
2582
|
+
if (pagina > this.totalPaginas || pagina < 1)
|
|
2583
|
+
return;
|
|
2584
|
+
this.paginaAtual = pagina;
|
|
2585
|
+
this.refreshUI();
|
|
2586
|
+
this.change.emit(this.paginaAtual);
|
|
2587
|
+
}
|
|
2588
|
+
refreshUI() {
|
|
2589
|
+
this.inicio = this.paginaAtual == 1;
|
|
2590
|
+
this.fim = this.paginaAtual == this.totalPaginas;
|
|
2591
|
+
}
|
|
2592
|
+
goBack() {
|
|
2593
|
+
this.trocaPagina(this.paginaAtual - 1);
|
|
2594
|
+
}
|
|
2595
|
+
goNext() {
|
|
2596
|
+
this.trocaPagina(this.paginaAtual + 1);
|
|
2597
|
+
}
|
|
2598
|
+
}
|
|
2599
|
+
PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2600
|
+
PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: PaginatorComponent, selector: "ox-paginator", inputs: { pageSize: "pageSize", paginaAtual: "paginaAtual", totalPaginas: "totalPaginas" }, outputs: { paginaAtualChange: "paginaAtualChange", totalPaginasChange: "totalPaginasChange", change: "change" }, ngImport: i0, template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"], dependencies: [{ kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
2601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
2749
2602
|
type: Component,
|
|
2750
|
-
args: [{ selector: 'app-produto-form', animations: [lateralAnimation], template: "<div style=\"margin-bottom: 16px\">\n <ox-radio-button-group (change)=\"changeModo($event)\" [items]=\"tabs\" class=\"tool-item-container\">\n </ox-radio-button-group>\n</div>\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 0\">\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>C\u00F3digo</label>\n <div class=\"hbox\">\n <input id=\"id\" [attr.readonly]=\"editMode\" [(ngModel)]=\"model.id\" class=\"form-control input-120\"\n tabindex=\"2\">\n <button (click)=\"nextIdClick.emit()\" *ngIf=\"!editMode\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n lightbulb\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Refer\u00EAncia</label>\n <input id=\"referencia\" [(ngModel)]=\"model.referencia\" class=\"form-control input-120\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Nome</label>\n <input id=\"nome\" [(ngModel)]=\"model.nome\" cdkFocusInitial class=\"form-control input-300\" tabindex=\"2\">\n </div>\n <div class=\"hbox\">\n <div class=\"form-group\">\n <label>Pre\u00E7o de Venda</label>\n <input id=\"precoVenda\" [ngModel]=\"model.precoVenda | number:'1.2-2'\"\n (ngModelChange)=\"precoVendaParser.parse($event)\" (focusout)=\"precoVendaParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o p/ Func.</label>\n <input id=\"precoFuncionario\" [ngModel]=\"model.precoFuncionario | number:'1.2-2'\"\n (ngModelChange)=\"precoFuncParser.parse($event)\" (focusout)=\"precoFuncParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n <div class=\"form-group margin-left-8\">\n <label>Pre\u00E7o de Custo</label>\n <input id=\"precoCusto\" [ngModel]=\"model.precoCusto | number:'1.2-2'\"\n (ngModelChange)=\"precoCustoParser.parse($event)\" (focusout)=\"precoCustoParser.checkout()\"\n class=\"form-control input-100 text-right\" tabindex=\"2\">\n </div>\n </div>\n <div class=\"form-group\">\n <label>Grupo</label>\n <div class=\"hbox\">\n <div id=\"grupo\" (click)=\"editarGrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.grupoNome}} </div>\n <button (click)=\"editarGrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"form-group\">\n <label>Subgrupo</label>\n <div class=\"hbox\">\n <div id=\"subgrupo\" (click)=\"editarSubgrupo()\" class=\"form-control grow-1 input-selecao input-300\">\n {{model.subgrupoNome}} </div>\n <button (click)=\"editarSubgrupo()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Unidade</label>\n <input id=\"unidade\" [(ngModel)]=\"model.unidade\" class=\"form-control input-120\">\n </div>\n <div class=\"form-group\">\n <label>Estoque Min.</label>\n <input id=\"estoqueMinimo\" [(ngModel)]=\"model.estoqueMinimo\" class=\"form-control input-120\">\n </div>\n </div>\n\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>C\u00F3digo Patrim\u00F4nio</label>\n <input id=\"codigoPatrimonio\" [(ngModel)]=\"model.codigoPatrimonio\" class=\"form-control input-120\"\n maxlength=\"36\">\n </div>\n <div class=\"form-group\">\n <label>Obs.</label>\n <input id=\"obs\" [(ngModel)]=\"model.obs\" class=\"form-control input-300\" maxlength=\"300\">\n </div>\n </div>\n \n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>Setor Subestoque</label>\n <mat-select [(value)]=\"model.setorSubEstoqueId\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of setores\" [value]=\"i.id\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Qtd. Subestoque</label>\n <input id=\"qtdMinSubEstoque\" [(ngModel)]=\"model.qtdMinSubEstoque\" class=\"form-control input-120 text-right\">\n </div>\n </div>\n <div class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.estoqueControlado\" tabindex=-1>Controlado no Estoque</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimiCozinha\" tabindex=-1>Imprime Cozinha</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.imprimeCorredor\" tabindex=-1>Imprime Corredor</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.verNaRecepcao\" tabindex=-1>Ver na Recep\u00E7\u00E3o</mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.omiteCliente\" tabindex=-1>N\u00E3o Exibe para o Cliente na Sa\u00EDda\n </mat-slide-toggle>\n <mat-slide-toggle [(ngModel)]=\"model.isAtivo\" tabindex=-1>Ativado</mat-slide-toggle>\n </div>\n\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 1\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.emiteNFCe\" tabindex=-1>Emite Fiscal\n </mat-slide-toggle>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>GTIN</label>\n <input id=\"gtin\" [(ngModel)]=\"model.gtin\" class=\"form-control input-120\" placeholder=\"SEM GTIN\"\n maxlength=\"14\">\n </div>\n <div class=\"form-group\">\n <label>CFOP</label>\n <input id=\"cfop\" [(ngModel)]=\"model.cfop\" [matAutocomplete]=\"auto\" matInput class=\"form-control input-100\"\n maxlength=\"4\">\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of cfopList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n <div class=\"form-group\">\n <label>NCM</label>\n <div class=\"hbox\">\n <input id=\"ncm\" (input)=\"lazyTriggerNcm.fire()\" [(ngModel)]=\"model.ncm\" class=\"form-control input-100\"\n maxlength=\"8\">\n <button (click)=\"editarNCM()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n <span class=\"badge buscando\" *ngIf=\"isBusy\">Buscando...</span>\n <span class=\"badge encontrado\" *ngIf=\"ncmEncontrado\">Encontrado</span>\n <span class=\"badge nao-encontrado\" *ngIf=\"ncmNaoEncontrado\">N\u00E3o encontrado</span>\n </div>\n </div>\n </div>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CEST</label>\n <input id=\"cest\" [(ngModel)]=\"model.cest\" autocomplete=\"off\" class=\"form-control input-120\" maxlength=\"7\">\n </div>\n <div class=\"form-group\">\n <label>ICMS (ECF/SAT)</label>\n <input id=\"aliquotaICMS\" [(ngModel)]=\"model.aliquotaICMS\" autocomplete=\"off\" class=\"form-control input-100 text-right\"\n maxlength=\"5\">\n </div>\n <div class=\"form-group\">\n <label>S. T. (ECF/SAT)</label>\n <input id=\"sitTrib\" [(ngModel)]=\"model.sitTrib\" autocomplete=\"off\" [matAutocomplete]=\"autoST\" matInput\n class=\"form-control input-120\" maxlength=\"5\">\n <mat-autocomplete #autoST=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of stList\" [value]=\"option.item1\">\n {{option.item1}} <small>{{option.item2}}</small>\n </mat-option>\n </mat-autocomplete>\n </div>\n </div>\n <h4>Campos da NFC-e</h4>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/CSOSN</label>\n <mat-select [(value)]=\"model.csT_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of cstICMSList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. ICMS (%)</label>\n <input id=\"pICMS_icms\" [ngModel]=\"model.pICMS_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pICMS_icmsParser.parse($event)\" (focusout)=\"pICMS_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>Modalidade BC</label>\n <mat-select [(value)]=\"model.modBC_icms\" class=\"form-control input-120\">\n <mat-option *ngFor=\"let i of modBaseICMS\" [value]=\"i.item1\">\n {{i.item1}} <small>{{i.item2}}</small>\n </mat-option>\n </mat-select>\n </div>\n </div>\n <h6>ICMS Efetivo CST60/CSOSN500</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pRedBCEfet (%)</label>\n <input id=\"pRedBCEfet_icms\" [ngModel]=\"model.pRedBCEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pRedBCEfet_icmsParser.parse($event)\" (focusout)=\"pRedBCEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pICMSEfet (%)</label>\n <input id=\"picmsEfet_icms\" [ngModel]=\"model.picmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"picmsEfet_icmsParser.parse($event)\" (focusout)=\"picmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCEfet (R$)</label>\n <input id=\"vbcEfet_icms\" [ngModel]=\"model.vbcEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcEfet_icmsParser.parse($event)\" (focusout)=\"vbcEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSEfet (R$)</label>\n <input id=\"vicmsEfet_icms\" [ngModel]=\"model.vicmsEfet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsEfet_icmsParser.parse($event)\" (focusout)=\"vicmsEfet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Substitui\u00E7\u00E3o Tribut\u00E1ria (ST)</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pST (%)</label>\n <input id=\"psT_icms\" [ngModel]=\"model.psT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"psT_icmsParser.parse($event)\" (focusout)=\"psT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCSTRet (R$)</label>\n <input id=\"vbcstRet_icms\" [ngModel]=\"model.vbcstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcstRet_icmsParser.parse($event)\" (focusout)=\"vbcstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSubs (R$)</label>\n <input id=\"vicmsSubstituto_icms\" [ngModel]=\"model.vicmsSubstituto_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsSubstituto_icmsParser.parse($event)\"\n (focusout)=\"vicmsSubstituto_icmsParser.checkout()\" class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vICMSSTRet (R$)</label>\n <input id=\"vicmsstRet_icms\" [ngModel]=\"model.vicmsstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vicmsstRet_icmsParser.parse($event)\" (focusout)=\"vicmsstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>Fundo de Combate a Pobresa</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>pFCP (%)</label>\n <input id=\"pfcP_icms\" [ngModel]=\"model.pfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcP_icmsParser.parse($event)\" (focusout)=\"pfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCP (R$)</label>\n <input id=\"vbcfcP_icms\" [ngModel]=\"model.vbcfcP_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcP_icmsParser.parse($event)\" (focusout)=\"vbcfcP_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPST (%)</label>\n <input id=\"pfcpsT_icms\" [ngModel]=\"model.pfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpsT_icmsParser.parse($event)\" (focusout)=\"pfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPST (R$)</label>\n <input id=\"vbcfcpsT_icms\" [ngModel]=\"model.vbcfcpsT_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpsT_icmsParser.parse($event)\" (focusout)=\"vbcfcpsT_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>pFCPSTRet (%)</label>\n <input id=\"pfcpstRet_icms\" [ngModel]=\"model.pfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pfcpstRet_icmsParser.parse($event)\" (focusout)=\"pfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>vBCFCPSTRet (R$)</label>\n <input id=\"vbcfcpstRet_icms\" [ngModel]=\"model.vbcfcpstRet_icms | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbcfcpstRet_icmsParser.parse($event)\" (focusout)=\"vbcfcpstRet_icmsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n <h6>PIS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/PIS</label>\n <mat-select [(value)]=\"model.csT_pis\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliquota PIS (%)</label>\n <input id=\"ppiS_pis\" [ngModel]=\"model.ppiS_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"ppiS_pisParser.parse($event)\" (focusout)=\"ppiS_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>PIS BC %</label>\n <input id=\"vbC_pis\" [ngModel]=\"model.vbC_pis | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_pisParser.parse($event)\" (focusout)=\"vbC_pisParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n \n <h6>COFINS</h6>\n <div class=\"hbox gap-8\">\n <div class=\"form-group\">\n <label>CST/COFINS</label>\n <mat-select [(value)]=\"model.csT_cofins\" class=\"form-control input-120\">\n <mat-option [value]=\"null\">\n Nenhum\n </mat-option>\n <mat-option *ngFor=\"let i of cstCofinsList\" [value]=\"i.item1\">\n {{i.item1}}\n </mat-option>\n </mat-select>\n </div>\n <div class=\"form-group\">\n <label>Aliq. COFINS (%)</label>\n <input id=\"pcofinS_cofins\" [ngModel]=\"model.pcofinS_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"pcofinS_cofinsParser.parse($event)\" (focusout)=\"pcofinS_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n <div class=\"form-group\">\n <label>COFINS BC %</label>\n <input id=\"vbC_cofins\" [ngModel]=\"model.vbC_cofins | number:'1.2-2'\" autocomplete=\"off\"\n (ngModelChange)=\"vbC_cofinsParser.parse($event)\" (focusout)=\"vbC_cofinsParser.checkout()\"\n class=\"form-control input-100 text-right\">\n </div>\n </div>\n</div>\n\n<div [@menuLateral] class=\"vbox\" *ngIf=\"selectedTab == 2\">\n\n <div style=\"margin-bottom: 16px;\" class=\"vbox\">\n <mat-slide-toggle [(ngModel)]=\"model.disponivelCardapio\" tabindex=-1>Dispon\u00EDvel no Card\u00E1pio Digital\n </mat-slide-toggle>\n </div>\n <div class=\"form-group\">\n <label>Descri\u00E7\u00E3o</label>\n <textarea id=\"descricao\" [(ngModel)]=\"model.descricao\" cols=\"40\" rows=\"5\" class=\"form-control input-300\"\n tabindex=\"2\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Categoria</label>\n <div class=\"hbox\">\n <div id=\"categoriaCardapio\" (click)=\"editarCategoriaCardapio()\"\n class=\"form-control grow-1 input-selecao input-300\">\n {{model.categoriaCardapioNome}} </div>\n <button (click)=\"editarCategoriaCardapio()\" class=\"form-inline-button btn-form-margin\">\n <span class=\"material-icons\">\n search\n </span>\n </button>\n </div>\n </div>\n <div class=\"imagem-container\" *ngIf=\"editMode\">\n <img [src]=\"imgUrl\" class=\"img-fluid\" *ngIf=\"imgUrl\" />\n\n <input type=\"file\" #file placeholder=\"Choose file\" (change)=\"uploadFile(file.files)\" accept=\".jpg,.png\"\n style=\"display: none;\">\n\n <button mat-button color=\"primary\" type=\"button\" (click)=\"file.click()\">Escolher Imagem</button>\n\n <span class=\"upload\" *ngIf=\"progress > 0\">\n {{progress}}%\n </span>\n <span class=\"upload\" *ngIf=\"message\">\n {{message}}\n </span>\n </div>\n\n</div>", styles: [".imagem-container{border:1px solid #ced4da;display:flex;flex-direction:column;border-radius:9px;max-width:460px}small{font-size:xx-small}.badge{color:#fff;font-size:xx-small;display:flex;align-items:center;padding:4px;border-radius:13px;margin-left:2px}.badge.encontrado{background:#05a301;border:1px solid #28d112}.badge.nao-encontrado{background:#a30101;border:1px solid #d17812}.badge.buscando{background:#929292;border:1px solid #a3a3a3}h6{margin:8px 0;color:#666}\n"] }]
|
|
2751
|
-
}], ctorParameters: function () { return [
|
|
2752
|
-
type: Input
|
|
2753
|
-
}], nextIdClick: [{
|
|
2603
|
+
args: [{ selector: 'ox-paginator', template: "<button [disabled]=\"inicio\" mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n</button>\n<span class=\"picker-text\">\n {{paginaAtual}}/{{totalPaginas}}\n</span>\n<button [disabled]=\"fim\" mat-icon-button (click)=\"goNext()\">\n <mat-icon>chevron_right</mat-icon>\n</button>\n", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;flex-wrap:nowrap}.picker-text{flex-flow:1;flex-grow:1;text-align:center}\n"] }]
|
|
2604
|
+
}], ctorParameters: function () { return []; }, propDecorators: { paginaAtualChange: [{
|
|
2754
2605
|
type: Output
|
|
2755
|
-
}],
|
|
2606
|
+
}], totalPaginasChange: [{
|
|
2607
|
+
type: Output
|
|
2608
|
+
}], change: [{
|
|
2609
|
+
type: Output
|
|
2610
|
+
}], pageSize: [{
|
|
2611
|
+
type: Input
|
|
2612
|
+
}], paginaAtual: [{
|
|
2613
|
+
type: Input
|
|
2614
|
+
}], totalPaginas: [{
|
|
2756
2615
|
type: Input
|
|
2757
2616
|
}] } });
|
|
2758
2617
|
|
|
2759
|
-
class
|
|
2760
|
-
constructor(ws, notification,
|
|
2618
|
+
class ProdutosComponent {
|
|
2619
|
+
constructor(ws, notification, dialog, auth, screenHelper) {
|
|
2761
2620
|
this.ws = ws;
|
|
2762
2621
|
this.notification = notification;
|
|
2763
|
-
this.dataDialog = dataDialog;
|
|
2764
2622
|
this.dialog = dialog;
|
|
2765
|
-
this.elRef = elRef;
|
|
2766
|
-
this.dialogRef = dialogRef;
|
|
2767
2623
|
this.screenHelper = screenHelper;
|
|
2768
2624
|
this.isBusy = false;
|
|
2625
|
+
this.items = [];
|
|
2626
|
+
this.result = {
|
|
2627
|
+
finalQtd: 0,
|
|
2628
|
+
inicioQtd: 0,
|
|
2629
|
+
items: [],
|
|
2630
|
+
pagina: 0,
|
|
2631
|
+
quantidade: 0,
|
|
2632
|
+
valor: 0,
|
|
2633
|
+
totalPaginas: 0
|
|
2634
|
+
};
|
|
2635
|
+
this._selectedItem = null;
|
|
2636
|
+
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
2637
|
+
this.setting = new ProdutoSearchSetting();
|
|
2769
2638
|
this.focus = new FocusService();
|
|
2770
|
-
this.
|
|
2639
|
+
this.paginaAtual = 1;
|
|
2640
|
+
this.quantidadePagina = 50;
|
|
2641
|
+
this.allowAdd = auth.permissoes.adminProdutoAdd;
|
|
2642
|
+
this.allowExcluir = auth.permissoes.adminProdutoDelete;
|
|
2771
2643
|
this.mobile = this.screenHelper.isMedium;
|
|
2772
2644
|
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2645
|
+
this.setting.exibeNaoControladoEstoque = true;
|
|
2646
|
+
this.setting.exibeImprimiCozinha = true;
|
|
2773
2647
|
}
|
|
2774
|
-
|
|
2775
|
-
this.
|
|
2776
|
-
this.getNextId();
|
|
2648
|
+
get selectedItem() {
|
|
2649
|
+
return this._selectedItem;
|
|
2777
2650
|
}
|
|
2778
|
-
|
|
2779
|
-
this.
|
|
2651
|
+
set selectedItem(p) {
|
|
2652
|
+
this._selectedItem = p;
|
|
2780
2653
|
}
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
const valMsg = valida$1(this.model, this.focus);
|
|
2785
|
-
if (valMsg) {
|
|
2786
|
-
this.notification.showMsgError(valMsg);
|
|
2787
|
-
return;
|
|
2788
|
-
}
|
|
2789
|
-
this.isBusy = true;
|
|
2790
|
-
this.ws.addProduto(this.model)
|
|
2791
|
-
.subscribe(r => {
|
|
2792
|
-
this.isBusy = false;
|
|
2793
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
2794
|
-
if (this.dialogRef)
|
|
2795
|
-
this.dialogRef.close(true);
|
|
2796
|
-
}, err => {
|
|
2797
|
-
this.isBusy = false;
|
|
2798
|
-
this.notification.showMsg(err.error);
|
|
2799
|
-
});
|
|
2654
|
+
ngOnInit() {
|
|
2655
|
+
this.setting.ordem = "nome";
|
|
2656
|
+
this.atualiza();
|
|
2800
2657
|
}
|
|
2801
|
-
|
|
2802
|
-
this.
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
this.
|
|
2808
|
-
}
|
|
2809
|
-
|
|
2810
|
-
this.
|
|
2811
|
-
}
|
|
2658
|
+
onSelectItem() {
|
|
2659
|
+
if (!this.focus.hasInit()) {
|
|
2660
|
+
setTimeout(() => {
|
|
2661
|
+
this.focus.registerElementById("form-column");
|
|
2662
|
+
this.focus.setFirst();
|
|
2663
|
+
}, 500);
|
|
2664
|
+
//this._focus.registerElementById("form-column");
|
|
2665
|
+
}
|
|
2666
|
+
else {
|
|
2667
|
+
this.focus.setFirst();
|
|
2668
|
+
}
|
|
2812
2669
|
}
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
ProdutoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoAddDialogComponent, selector: "app-produto-add-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form (nextIdClick)=\"getNextId()\" [model]=\"model\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ProdutoFormComponent, selector: "app-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }] });
|
|
2816
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoAddDialogComponent, decorators: [{
|
|
2817
|
-
type: Component,
|
|
2818
|
-
args: [{ selector: 'app-produto-add-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Novo Produto</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <app-produto-form (nextIdClick)=\"getNextId()\" [model]=\"model\" *ngIf=\"model\"></app-produto-form>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
2819
|
-
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2820
|
-
type: Inject,
|
|
2821
|
-
args: [MAT_DIALOG_DATA]
|
|
2822
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
|
|
2823
|
-
|
|
2824
|
-
class ProdutoBuscaFiltrosDialogComponent {
|
|
2825
|
-
constructor(d, ws, notification, dialogRef) {
|
|
2826
|
-
this.d = d;
|
|
2827
|
-
this.ws = ws;
|
|
2828
|
-
this.notification = notification;
|
|
2829
|
-
this.dialogRef = dialogRef;
|
|
2830
|
-
this.isBusy = false;
|
|
2831
|
-
this.produtosGrupos = [];
|
|
2832
|
-
this.d.setting.grupos = undefined;
|
|
2670
|
+
ngOnDestroy() {
|
|
2671
|
+
this.focus.unregisterElementById("form-column");
|
|
2833
2672
|
}
|
|
2834
|
-
|
|
2835
|
-
this.
|
|
2673
|
+
trocaPagina() {
|
|
2674
|
+
this.atualiza(this.paginaAtual);
|
|
2836
2675
|
}
|
|
2837
|
-
|
|
2676
|
+
atualiza(pagina) {
|
|
2677
|
+
if (pagina == undefined)
|
|
2678
|
+
this.paginaAtual = 1;
|
|
2679
|
+
else
|
|
2680
|
+
this.paginaAtual = pagina;
|
|
2838
2681
|
this.isBusy = true;
|
|
2839
|
-
this.ws.
|
|
2682
|
+
this.ws.buscaPaginadaProdutos(this.setting, this.paginaAtual, this.quantidadePagina)
|
|
2840
2683
|
.subscribe(r => {
|
|
2841
|
-
this.
|
|
2684
|
+
this.items = r.items;
|
|
2685
|
+
this.result = r;
|
|
2686
|
+
this.selectedItem = null;
|
|
2842
2687
|
console.info(r);
|
|
2843
2688
|
this.isBusy = false;
|
|
2844
2689
|
}, err => {
|
|
@@ -2846,79 +2691,118 @@ class ProdutoBuscaFiltrosDialogComponent {
|
|
|
2846
2691
|
this.notification.showHttpError(err);
|
|
2847
2692
|
});
|
|
2848
2693
|
}
|
|
2849
|
-
|
|
2850
|
-
this.
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2694
|
+
excluir() {
|
|
2695
|
+
const item = this.selectedItem;
|
|
2696
|
+
if (!item)
|
|
2697
|
+
return;
|
|
2698
|
+
confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do produto ${item.nome}?`, () => {
|
|
2699
|
+
this.isBusy = true;
|
|
2700
|
+
this.ws.deleteProduto(item.id)
|
|
2701
|
+
.subscribe(r => {
|
|
2702
|
+
this.notification.showMsg("O produto foi excluído com sucesso.");
|
|
2703
|
+
this.items.remove(item);
|
|
2704
|
+
this.selectedItem = null;
|
|
2705
|
+
this.isBusy = false;
|
|
2706
|
+
}, err => {
|
|
2707
|
+
this.isBusy = false;
|
|
2708
|
+
this.notification.showMsg(err.error);
|
|
2709
|
+
});
|
|
2710
|
+
});
|
|
2855
2711
|
}
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2863
|
-
type: Inject,
|
|
2864
|
-
args: [MAT_DIALOG_DATA]
|
|
2865
|
-
}] }, { type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialogRef }]; } });
|
|
2866
|
-
|
|
2867
|
-
class ProdutoEditDialogComponent {
|
|
2868
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2869
|
-
this.ws = ws;
|
|
2870
|
-
this.notification = notification;
|
|
2871
|
-
this.dataDialog = dataDialog;
|
|
2872
|
-
this.dialog = dialog;
|
|
2873
|
-
this.elRef = elRef;
|
|
2874
|
-
this.dialogRef = dialogRef;
|
|
2875
|
-
this.screenHelper = screenHelper;
|
|
2876
|
-
this.isBusy = false;
|
|
2877
|
-
this.focus = new FocusService();
|
|
2878
|
-
if (dataDialog) {
|
|
2879
|
-
this.model = dataDialog;
|
|
2712
|
+
novo() {
|
|
2713
|
+
let height = (window.innerHeight * 0.90) + 'px';
|
|
2714
|
+
let width = 550 + 'px';
|
|
2715
|
+
if (this.mobile) {
|
|
2716
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
2717
|
+
//height = (window.innerHeight * 0.98) + 'px';
|
|
2880
2718
|
}
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2719
|
+
const dialog = this.dialog.open(ProdutoAddDialogComponent, {
|
|
2720
|
+
width: width,
|
|
2721
|
+
height: height,
|
|
2722
|
+
maxWidth: '100%',
|
|
2723
|
+
panelClass: 'dialog-p0',
|
|
2724
|
+
});
|
|
2725
|
+
dialog.afterClosed().subscribe(result => {
|
|
2726
|
+
if (result === undefined)
|
|
2727
|
+
return;
|
|
2728
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
2729
|
+
this.atualiza();
|
|
2730
|
+
});
|
|
2886
2731
|
}
|
|
2887
|
-
|
|
2888
|
-
|
|
2732
|
+
abreCadastro(item) {
|
|
2733
|
+
let height = undefined;
|
|
2734
|
+
let width = 550 + 'px';
|
|
2735
|
+
if (this.mobile) {
|
|
2736
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
2737
|
+
height = (window.innerHeight * 0.99) + 'px';
|
|
2738
|
+
}
|
|
2739
|
+
const dialog = this.dialog.open(ProdutoEditDialogComponent, {
|
|
2740
|
+
data: item,
|
|
2741
|
+
width: width,
|
|
2742
|
+
height: height,
|
|
2743
|
+
maxWidth: '100%',
|
|
2744
|
+
panelClass: 'dialog-p0',
|
|
2745
|
+
});
|
|
2746
|
+
dialog.afterClosed().subscribe(result => {
|
|
2747
|
+
if (result !== true)
|
|
2748
|
+
return;
|
|
2749
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
2750
|
+
this.atualiza();
|
|
2751
|
+
});
|
|
2889
2752
|
}
|
|
2890
2753
|
salvar() {
|
|
2891
|
-
if (!this.
|
|
2754
|
+
if (!this.selectedItem)
|
|
2892
2755
|
return;
|
|
2893
|
-
const valMsg =
|
|
2756
|
+
const valMsg = validaProduto(this.selectedItem, this.focus);
|
|
2894
2757
|
if (valMsg) {
|
|
2895
2758
|
this.notification.showMsgError(valMsg);
|
|
2896
2759
|
return;
|
|
2897
2760
|
}
|
|
2898
2761
|
this.isBusy = true;
|
|
2899
|
-
this.ws.saveProduto(this.
|
|
2762
|
+
this.ws.saveProduto(this.selectedItem)
|
|
2900
2763
|
.subscribe(r => {
|
|
2901
|
-
this.isBusy = false;
|
|
2902
2764
|
this.notification.showMsg("Salvo com sucesso.");
|
|
2903
|
-
|
|
2904
|
-
this.dialogRef.close(true);
|
|
2765
|
+
this.isBusy = false;
|
|
2905
2766
|
}, err => {
|
|
2906
2767
|
this.isBusy = false;
|
|
2907
2768
|
this.notification.showMsg(err.error);
|
|
2908
2769
|
});
|
|
2909
2770
|
}
|
|
2771
|
+
filtros() {
|
|
2772
|
+
let height = undefined;
|
|
2773
|
+
let width = 550 + 'px';
|
|
2774
|
+
if (this.mobile) {
|
|
2775
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
2776
|
+
height = (window.innerHeight * 0.99) + 'px';
|
|
2777
|
+
}
|
|
2778
|
+
const p = {
|
|
2779
|
+
qtd: this.quantidadePagina,
|
|
2780
|
+
setting: this.setting
|
|
2781
|
+
};
|
|
2782
|
+
const dialog = this.dialog.open(ProdutoBuscaFiltrosDialogComponent, {
|
|
2783
|
+
data: p,
|
|
2784
|
+
width: width,
|
|
2785
|
+
height: height,
|
|
2786
|
+
maxWidth: '100%',
|
|
2787
|
+
panelClass: 'dialog-p0',
|
|
2788
|
+
});
|
|
2789
|
+
dialog.afterClosed().subscribe(result => {
|
|
2790
|
+
if (!result)
|
|
2791
|
+
return;
|
|
2792
|
+
const r = result;
|
|
2793
|
+
this.quantidadePagina = r.qtd;
|
|
2794
|
+
this.atualiza();
|
|
2795
|
+
});
|
|
2796
|
+
}
|
|
2910
2797
|
}
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
2798
|
+
ProdutosComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2799
|
+
ProdutosComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosComponent, selector: "ox-produtos", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div> \n <div class=\"hbox\" *ngIf=\"mobile\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [codigo]=\"i.id\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n <div class=\"hbox\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n <div class=\"total-qtd\">Exibindo {{result.inicioQtd}}-{{result.finalQtd}} de {{result.quantidade}}</div>\n \n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um produto no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </ox-produto-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}.total-qtd{align-self:center;font-size:small}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: PaginatorComponent, selector: "ox-paginator", inputs: ["pageSize", "paginaAtual", "totalPaginas"], outputs: ["paginaAtualChange", "totalPaginasChange", "change"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoFormComponent, selector: "ox-produto-form", inputs: ["editMode", "model"], outputs: ["nextIdClick"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
|
|
2800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosComponent, decorators: [{
|
|
2914
2801
|
type: Component,
|
|
2915
|
-
args: [{ selector: '
|
|
2916
|
-
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type:
|
|
2917
|
-
type: Inject,
|
|
2918
|
-
args: [MAT_DIALOG_DATA]
|
|
2919
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }]; } });
|
|
2802
|
+
args: [{ selector: 'ox-produtos', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div> \n <div class=\"hbox\" *ngIf=\"mobile\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n <button mat-icon-button (click)=\"filtros()\">\n <mat-icon aria-label=\"Filtros\">manage_search</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [desativado]=\"!i.isAtivo\" [cloud]=\"i.enviadoPC\" [codigo]=\"i.id\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n <div class=\"hbox\">\n <ox-paginator (change)=\"trocaPagina()\" [(paginaAtual)]=\"paginaAtual\" [(totalPaginas)]=\"result.totalPaginas\">\n </ox-paginator>\n <div class=\"total-qtd\">Exibindo {{result.inicioQtd}}-{{result.finalQtd}} de {{result.quantidade}}</div>\n \n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um produto no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\" [editMode]=\"true\">\n </ox-produto-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}.total-qtd{align-self:center;font-size:small}\n"] }]
|
|
2803
|
+
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
2920
2804
|
|
|
2921
|
-
class
|
|
2805
|
+
class ProdutosCategoriasCardapioComponent {
|
|
2922
2806
|
constructor(ws, notification, dialog, auth, screenHelper) {
|
|
2923
2807
|
this.ws = ws;
|
|
2924
2808
|
this.notification = notification;
|
|
@@ -2926,33 +2810,14 @@ class ProdutosComponent {
|
|
|
2926
2810
|
this.screenHelper = screenHelper;
|
|
2927
2811
|
this.isBusy = false;
|
|
2928
2812
|
this.items = [];
|
|
2929
|
-
this.
|
|
2930
|
-
finalQtd: 0,
|
|
2931
|
-
inicioQtd: 0,
|
|
2932
|
-
items: [],
|
|
2933
|
-
pagina: 0,
|
|
2934
|
-
quantidade: 0,
|
|
2935
|
-
valor: 0,
|
|
2936
|
-
totalPaginas: 0
|
|
2937
|
-
};
|
|
2938
|
-
this._selectedItem = null;
|
|
2813
|
+
this.selectedItem = null;
|
|
2939
2814
|
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
2940
|
-
this.setting = new
|
|
2815
|
+
this.setting = new SearchSetting();
|
|
2941
2816
|
this.focus = new FocusService();
|
|
2942
|
-
this.
|
|
2943
|
-
this.
|
|
2944
|
-
this.allowAdd = auth.permissoes.adminProdutoAdd;
|
|
2945
|
-
this.allowExcluir = auth.permissoes.adminProdutoDelete;
|
|
2817
|
+
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
2818
|
+
this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
|
|
2946
2819
|
this.mobile = this.screenHelper.isMedium;
|
|
2947
2820
|
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2948
|
-
this.setting.exibeNaoControladoEstoque = true;
|
|
2949
|
-
this.setting.exibeImprimiCozinha = true;
|
|
2950
|
-
}
|
|
2951
|
-
get selectedItem() {
|
|
2952
|
-
return this._selectedItem;
|
|
2953
|
-
}
|
|
2954
|
-
set selectedItem(p) {
|
|
2955
|
-
this._selectedItem = p;
|
|
2956
2821
|
}
|
|
2957
2822
|
ngOnInit() {
|
|
2958
2823
|
this.setting.ordem = "nome";
|
|
@@ -2973,19 +2838,11 @@ class ProdutosComponent {
|
|
|
2973
2838
|
ngOnDestroy() {
|
|
2974
2839
|
this.focus.unregisterElementById("form-column");
|
|
2975
2840
|
}
|
|
2976
|
-
|
|
2977
|
-
this.atualiza(this.paginaAtual);
|
|
2978
|
-
}
|
|
2979
|
-
atualiza(pagina) {
|
|
2980
|
-
if (pagina == undefined)
|
|
2981
|
-
this.paginaAtual = 1;
|
|
2982
|
-
else
|
|
2983
|
-
this.paginaAtual = pagina;
|
|
2841
|
+
atualiza() {
|
|
2984
2842
|
this.isBusy = true;
|
|
2985
|
-
this.ws.
|
|
2843
|
+
this.ws.buscaProdutoCategoriaCardapio(this.setting)
|
|
2986
2844
|
.subscribe(r => {
|
|
2987
|
-
this.items = r
|
|
2988
|
-
this.result = r;
|
|
2845
|
+
this.items = r;
|
|
2989
2846
|
this.selectedItem = null;
|
|
2990
2847
|
console.info(r);
|
|
2991
2848
|
this.isBusy = false;
|
|
@@ -2998,11 +2855,11 @@ class ProdutosComponent {
|
|
|
2998
2855
|
const item = this.selectedItem;
|
|
2999
2856
|
if (!item)
|
|
3000
2857
|
return;
|
|
3001
|
-
confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do
|
|
2858
|
+
confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do grupo ${item.nome}?`, () => {
|
|
3002
2859
|
this.isBusy = true;
|
|
3003
|
-
this.ws.
|
|
2860
|
+
this.ws.deleteProdutoCategoriaCardapio(item.id)
|
|
3004
2861
|
.subscribe(r => {
|
|
3005
|
-
this.notification.showMsg("O
|
|
2862
|
+
this.notification.showMsg("O grupo foi excluído com sucesso.");
|
|
3006
2863
|
this.items.remove(item);
|
|
3007
2864
|
this.selectedItem = null;
|
|
3008
2865
|
this.isBusy = false;
|
|
@@ -3019,9 +2876,9 @@ class ProdutosComponent {
|
|
|
3019
2876
|
width = (window.innerWidth * 0.99) + 'px';
|
|
3020
2877
|
//height = (window.innerHeight * 0.98) + 'px';
|
|
3021
2878
|
}
|
|
3022
|
-
const dialog = this.dialog.open(
|
|
2879
|
+
const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
|
|
3023
2880
|
width: width,
|
|
3024
|
-
height: height,
|
|
2881
|
+
//height: height,
|
|
3025
2882
|
maxWidth: '100%',
|
|
3026
2883
|
panelClass: 'dialog-p0',
|
|
3027
2884
|
});
|
|
@@ -3039,10 +2896,10 @@ class ProdutosComponent {
|
|
|
3039
2896
|
width = (window.innerWidth * 0.99) + 'px';
|
|
3040
2897
|
height = (window.innerHeight * 0.99) + 'px';
|
|
3041
2898
|
}
|
|
3042
|
-
const dialog = this.dialog.open(
|
|
2899
|
+
const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
|
|
3043
2900
|
data: item,
|
|
3044
2901
|
width: width,
|
|
3045
|
-
height: height,
|
|
2902
|
+
//height: height,
|
|
3046
2903
|
maxWidth: '100%',
|
|
3047
2904
|
panelClass: 'dialog-p0',
|
|
3048
2905
|
});
|
|
@@ -3056,13 +2913,13 @@ class ProdutosComponent {
|
|
|
3056
2913
|
salvar() {
|
|
3057
2914
|
if (!this.selectedItem)
|
|
3058
2915
|
return;
|
|
3059
|
-
const valMsg =
|
|
2916
|
+
const valMsg = validaProdutoGrupo(this.selectedItem, this.focus);
|
|
3060
2917
|
if (valMsg) {
|
|
3061
2918
|
this.notification.showMsgError(valMsg);
|
|
3062
2919
|
return;
|
|
3063
2920
|
}
|
|
3064
2921
|
this.isBusy = true;
|
|
3065
|
-
this.ws.
|
|
2922
|
+
this.ws.saveProdutoCategoriaCardapio(this.selectedItem)
|
|
3066
2923
|
.subscribe(r => {
|
|
3067
2924
|
this.notification.showMsg("Salvo com sucesso.");
|
|
3068
2925
|
this.isBusy = false;
|
|
@@ -3071,38 +2928,12 @@ class ProdutosComponent {
|
|
|
3071
2928
|
this.notification.showMsg(err.error);
|
|
3072
2929
|
});
|
|
3073
2930
|
}
|
|
3074
|
-
filtros() {
|
|
3075
|
-
let height = undefined;
|
|
3076
|
-
let width = 550 + 'px';
|
|
3077
|
-
if (this.mobile) {
|
|
3078
|
-
width = (window.innerWidth * 0.99) + 'px';
|
|
3079
|
-
height = (window.innerHeight * 0.99) + 'px';
|
|
3080
|
-
}
|
|
3081
|
-
const p = {
|
|
3082
|
-
qtd: this.quantidadePagina,
|
|
3083
|
-
setting: this.setting
|
|
3084
|
-
};
|
|
3085
|
-
const dialog = this.dialog.open(ProdutoBuscaFiltrosDialogComponent, {
|
|
3086
|
-
data: p,
|
|
3087
|
-
width: width,
|
|
3088
|
-
height: height,
|
|
3089
|
-
maxWidth: '100%',
|
|
3090
|
-
panelClass: 'dialog-p0',
|
|
3091
|
-
});
|
|
3092
|
-
dialog.afterClosed().subscribe(result => {
|
|
3093
|
-
if (!result)
|
|
3094
|
-
return;
|
|
3095
|
-
const r = result;
|
|
3096
|
-
this.quantidadePagina = r.qtd;
|
|
3097
|
-
this.atualiza();
|
|
3098
|
-
});
|
|
3099
|
-
}
|
|
3100
2931
|
}
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
2932
|
+
ProdutosCategoriasCardapioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosCategoriasCardapioComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2933
|
+
ProdutosCategoriasCardapioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosCategoriasCardapioComponent, selector: "ox-produtos-categorias-cardapio", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
|
|
2934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosCategoriasCardapioComponent, decorators: [{
|
|
3104
2935
|
type: Component,
|
|
3105
|
-
args: [{ selector: '
|
|
2936
|
+
args: [{ selector: 'ox-produtos-categorias-cardapio', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"] }]
|
|
3106
2937
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
3107
2938
|
|
|
3108
2939
|
class MoverGrupoDialogComponent {
|
|
@@ -3149,10 +2980,10 @@ class MoverGrupoDialogComponent {
|
|
|
3149
2980
|
}
|
|
3150
2981
|
}
|
|
3151
2982
|
MoverGrupoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MoverGrupoDialogComponent, deps: [{ token: CommonWebService }, { token: i3.MatDialogRef }, { token: NotificationService }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
3152
|
-
MoverGrupoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MoverGrupoDialogComponent, selector: "
|
|
2983
|
+
MoverGrupoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MoverGrupoDialogComponent, selector: "ox-mover-grupo-dialog", ngImport: i0, template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Transferir Produtos para um Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <p *ngIf=\"!selected\">Voc\u00EA pode transferir todos os produtos que utilizam o grupo <strong>'{{dataDialog.nome}}'</strong> para outro grupo.</p>\n <p class=\"alert alert-warning\" *ngIf=\"selected\">Transferir produtos com grupo '{{dataDialog.nome}}'' para '{{selected?.nome}}'</p>\n <h4>Selecione um novo grupo para transferir os produtos do grupo</h4>\n \n <mat-select class=\"form-group\" [(value)]=\"selected\">\n <mat-option *ngFor=\"let i of grupos\" [value]=\"i\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n \n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }] });
|
|
3153
2984
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MoverGrupoDialogComponent, decorators: [{
|
|
3154
2985
|
type: Component,
|
|
3155
|
-
args: [{ selector: '
|
|
2986
|
+
args: [{ selector: 'ox-mover-grupo-dialog', template: "<div class=\"ox-header\">\n <h2 class=\"titulo\">Transferir Produtos para um Novo Grupo</h2>\n <button mat-icon-button [mat-dialog-close]>\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div class=\"dialog-content\">\n <div class=\"vbox\">\n <p *ngIf=\"!selected\">Voc\u00EA pode transferir todos os produtos que utilizam o grupo <strong>'{{dataDialog.nome}}'</strong> para outro grupo.</p>\n <p class=\"alert alert-warning\" *ngIf=\"selected\">Transferir produtos com grupo '{{dataDialog.nome}}'' para '{{selected?.nome}}'</p>\n <h4>Selecione um novo grupo para transferir os produtos do grupo</h4>\n \n <mat-select class=\"form-group\" [(value)]=\"selected\">\n <mat-option *ngFor=\"let i of grupos\" [value]=\"i\">\n {{i.nome}}\n </mat-option>\n </mat-select>\n \n </div>\n</div>\n<div class=\"dialog-footer\">\n <button mat-button color=\"primary\" (click)=\"salvar()\" tabindex=\"9\">SALVAR</button>\n <button mat-button [mat-dialog-close]>VOLTAR</button>\n</div>\n<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>", styles: [":host{background:#fafafa;display:flex;flex-direction:column;height:100%;max-height:99vh}\n"] }]
|
|
3156
2987
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: i3.MatDialogRef }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
3157
2988
|
type: Inject,
|
|
3158
2989
|
args: [MAT_DIALOG_DATA]
|
|
@@ -3270,7 +3101,7 @@ class ProdutosGruposComponent {
|
|
|
3270
3101
|
const item = this.selectedItem;
|
|
3271
3102
|
if (!item)
|
|
3272
3103
|
return;
|
|
3273
|
-
const valMsg =
|
|
3104
|
+
const valMsg = validaProdutoGrupo(item, this.focus);
|
|
3274
3105
|
if (valMsg) {
|
|
3275
3106
|
this.notification.showMsgError(valMsg);
|
|
3276
3107
|
return;
|
|
@@ -3308,10 +3139,10 @@ class ProdutosGruposComponent {
|
|
|
3308
3139
|
}
|
|
3309
3140
|
}
|
|
3310
3141
|
ProdutosGruposComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosGruposComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3311
|
-
ProdutosGruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosGruposComponent, selector: "
|
|
3142
|
+
ProdutosGruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosGruposComponent, selector: "ox-produtos-grupos", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">sync_alt</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">move_up</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
|
|
3312
3143
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosGruposComponent, decorators: [{
|
|
3313
3144
|
type: Component,
|
|
3314
|
-
args: [{ selector: '
|
|
3145
|
+
args: [{ selector: 'ox-produtos-grupos', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Grupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Grupo\">delete</mat-icon>\n </button>\n <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">sync_alt</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Grupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n <button mat-icon-button (click)=\"moverGrupo()\" *ngIf=\"selectedItem\" [@fade]>\n <mat-icon aria-label=\"Transferir Grupo\">move_up</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um grupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"] }]
|
|
3315
3146
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
3316
3147
|
|
|
3317
3148
|
class ProdutosSubgruposComponent {
|
|
@@ -3425,7 +3256,7 @@ class ProdutosSubgruposComponent {
|
|
|
3425
3256
|
salvar() {
|
|
3426
3257
|
if (!this.selectedItem)
|
|
3427
3258
|
return;
|
|
3428
|
-
const valMsg =
|
|
3259
|
+
const valMsg = validaProdutoGrupo(this.selectedItem, this.focus);
|
|
3429
3260
|
if (valMsg) {
|
|
3430
3261
|
this.notification.showMsgError(valMsg);
|
|
3431
3262
|
return;
|
|
@@ -3441,146 +3272,315 @@ class ProdutosSubgruposComponent {
|
|
|
3441
3272
|
});
|
|
3442
3273
|
}
|
|
3443
3274
|
}
|
|
3444
|
-
ProdutosSubgruposComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3445
|
-
ProdutosSubgruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosSubgruposComponent, selector: "
|
|
3446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, decorators: [{
|
|
3275
|
+
ProdutosSubgruposComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, deps: [{ token: CommonWebService }, { token: NotificationService }, { token: i3.MatDialog }, { token: AuthDataService }, { token: ScreenHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3276
|
+
ProdutosSubgruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosSubgruposComponent, selector: "ox-produtos-subgrupos", ngImport: i0, template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Subgrupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Subgrupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Subgrupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um subgrupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: BusyIndicatorComponent, selector: "ox-busy-indicator", inputs: ["isBusy"] }, { kind: "component", type: ItemCardComponent, selector: "ox-item-card", inputs: ["nome", "codigo", "star", "cloud", "desativado"] }, { kind: "component", type: ProdutoGrupoFormComponent, selector: "ox-produto-grupo-form", inputs: ["model"] }, { kind: "pipe", type: i6.UpperCasePipe, name: "uppercase" }], animations: [fadeAnimation] });
|
|
3277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, decorators: [{
|
|
3278
|
+
type: Component,
|
|
3279
|
+
args: [{ selector: 'ox-produtos-subgrupos', animations: [fadeAnimation], template: "<ox-busy-indicator [isBusy]=\"isBusy\"></ox-busy-indicator>\n<div class=\"tool-panel\" *ngIf=\"mobile\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo Subgrupo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir Subgrupo\">delete</mat-icon>\n </button>\n </div>\n </div>\n</div>\n<div class=\"result-container\" *ngIf=\"items\">\n <div class=\"cards-container cards-container-shadow\" *ngIf=\"mobile\">\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" (click)=\"abreCadastro(i)\"></ox-item-card>\n </div>\n <div class=\"listagem-desktop-grid\" *ngIf=\"!mobile\">\n <div class=\"listagem-column-container listagem-list-column\">\n <h3>Subgrupos de Produtos</h3>\n <div class=\"tool-panel tool-panel-float\">\n <div class=\"tool-section\">\n <label>Pesquisa</label>\n <div class=\"search-input-container\">\n <input [(ngModel)]=\"setting.frase\" placeholder=\"Digite um termo de busca...\" (input)=\"lazyTrigger.fire()\">\n </div>\n </div>\n <div class=\"tool-section ordem-sm2\">\n <label>A\u00E7\u00F5es</label>\n <div class=\"tool-row\">\n <button mat-icon-button (click)=\"atualiza()\">\n <mat-icon aria-label=\"Atualizar\">refresh</mat-icon>\n </button>\n <button mat-icon-button (click)=\"novo()\" *ngIf=\"allowAdd\">\n <mat-icon aria-label=\"Novo\">add</mat-icon>\n </button>\n <button mat-icon-button (click)=\"excluir()\" *ngIf=\"selectedItem && allowExcluir\" [@fade]>\n <mat-icon aria-label=\"Excluir\">delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n <div class=\"listagem-list-container\">\n <h4 *ngIf=\"items.length === 0\" class=\"nenhum-item-msg\">A busca n\u00E3o retornou resultados</h4>\n\n <ox-item-card [cloud]=\"i.enviadoPC\" [nome]=\"i.nome\" *ngFor=\"let i of items\" [class.selected]=\"i === selectedItem\"\n (click)=\"selectedItem = i;\"></ox-item-card>\n\n </div>\n </div>\n <div class=\"listagem-column-container listagem-column-form\">\n <h3 *ngIf=\"!selectedItem\">Selecione um subgrupo no lado direito</h3>\n <h3 *ngIf=\"selectedItem\">{{selectedItem.nome | uppercase}}</h3>\n <div class=\"listagem-form-container\">\n <ox-produto-grupo-form [@fade] [model]=\"selectedItem\" *ngIf=\"selectedItem\">\n </ox-produto-grupo-form>\n </div>\n\n <div class=\"listagem-form-acoes\">\n <button (click)=\"salvar()\" mat-fab color=\"primary\" *ngIf=\"selectedItem\" tabindex=\"20\">\n <mat-icon>save</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [":host{height:calc(100% - 48px);display:flex;flex-grow:1;flex-direction:column;background:#F0F0F0}:host{background-color:#fdfdfd}\n"] }]
|
|
3280
|
+
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
3281
|
+
|
|
3282
|
+
class ImageViewerComponent {
|
|
3283
|
+
constructor() {
|
|
3284
|
+
this.infos = [];
|
|
3285
|
+
this._isOpen = false;
|
|
3286
|
+
this.paginaAtual = 0;
|
|
3287
|
+
this.disableBack = false;
|
|
3288
|
+
this.disableNext = false;
|
|
3289
|
+
this.isOpenChange = new EventEmitter();
|
|
3290
|
+
}
|
|
3291
|
+
get isOpen() {
|
|
3292
|
+
return this._isOpen;
|
|
3293
|
+
}
|
|
3294
|
+
set isOpen(val) {
|
|
3295
|
+
this._isOpen = val;
|
|
3296
|
+
this.isOpenChange.emit(val);
|
|
3297
|
+
}
|
|
3298
|
+
onClick(e) {
|
|
3299
|
+
//this.isOpen = !this.isOpen;
|
|
3300
|
+
}
|
|
3301
|
+
ngOnInit() {
|
|
3302
|
+
}
|
|
3303
|
+
open(info, infos) {
|
|
3304
|
+
if (infos !== undefined) {
|
|
3305
|
+
for (let i = 0; i < infos.length; i++) {
|
|
3306
|
+
if (infos[i] === info) {
|
|
3307
|
+
this.paginaAtual = i + 1;
|
|
3308
|
+
break;
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
this.info = info;
|
|
3313
|
+
this.infos = infos;
|
|
3314
|
+
this.isOpen = true;
|
|
3315
|
+
this.updateUI();
|
|
3316
|
+
}
|
|
3317
|
+
goNext() {
|
|
3318
|
+
this.paginaAtual += 1;
|
|
3319
|
+
this.info = this.infos[this.paginaAtual - 1];
|
|
3320
|
+
this.updateUI();
|
|
3321
|
+
}
|
|
3322
|
+
goBack() {
|
|
3323
|
+
this.paginaAtual -= 1;
|
|
3324
|
+
this.info = this.infos[this.paginaAtual - 1];
|
|
3325
|
+
this.updateUI();
|
|
3326
|
+
}
|
|
3327
|
+
updateUI() {
|
|
3328
|
+
this.disableBack = this.paginaAtual == 1;
|
|
3329
|
+
this.disableNext = this.paginaAtual == this.infos.length;
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
ImageViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3333
|
+
ImageViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ImageViewerComponent, selector: "ox-image-viewer", inputs: { info: "info", infos: "infos", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<div class=\"image-fullsize\" *ngIf=\"isOpen\">\n <div class=\"titulo\">\n {{info?.titulo}}\n </div>\n <div class=\"img-container\" (click)=\"isOpen = !isOpen\">\n <img class=\"image\" *ngIf=\"info\" [src]=\"info?.url\" />\n </div>\n <div class=\"action-bar\" *ngIf=\"infos\">\n <button (click)=\"goBack()\" [disabled]=\"disableBack\" mat-icon-button>\n <mat-icon>chevron_left</mat-icon>\n </button>\n <span class=\"picker-text\">\n {{paginaAtual}}/{{infos?.length}}\n </span>\n <button (click)=\"goNext()\" [disabled]=\"disableNext\" mat-icon-button>\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: [".image-fullsize{position:absolute;left:0;top:0;background:rgba(0,0,0,.8);width:100%;height:100%;display:flex;flex-flow:column}.titulo{color:#fff;text-align:center;padding:16px;font-size:large;font-weight:300}.action-bar{background:linear-gradient(135deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.9) 50%,rgba(0,0,0,.8) 100%);color:#fff;padding:8px}.img-container{flex-grow:1;display:flex;justify-content:center;align-items:center}.image{box-shadow:0 5px 35px #000000a6;max-width:100%;height:auto}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
3334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, decorators: [{
|
|
3335
|
+
type: Component,
|
|
3336
|
+
args: [{ selector: 'ox-image-viewer', template: "<div class=\"image-fullsize\" *ngIf=\"isOpen\">\n <div class=\"titulo\">\n {{info?.titulo}}\n </div>\n <div class=\"img-container\" (click)=\"isOpen = !isOpen\">\n <img class=\"image\" *ngIf=\"info\" [src]=\"info?.url\" />\n </div>\n <div class=\"action-bar\" *ngIf=\"infos\">\n <button (click)=\"goBack()\" [disabled]=\"disableBack\" mat-icon-button>\n <mat-icon>chevron_left</mat-icon>\n </button>\n <span class=\"picker-text\">\n {{paginaAtual}}/{{infos?.length}}\n </span>\n <button (click)=\"goNext()\" [disabled]=\"disableNext\" mat-icon-button>\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>\n", styles: [".image-fullsize{position:absolute;left:0;top:0;background:rgba(0,0,0,.8);width:100%;height:100%;display:flex;flex-flow:column}.titulo{color:#fff;text-align:center;padding:16px;font-size:large;font-weight:300}.action-bar{background:linear-gradient(135deg,rgba(0,0,0,.8) 0%,rgba(0,0,0,.9) 50%,rgba(0,0,0,.8) 100%);color:#fff;padding:8px}.img-container{flex-grow:1;display:flex;justify-content:center;align-items:center}.image{box-shadow:0 5px 35px #000000a6;max-width:100%;height:auto}\n"] }]
|
|
3337
|
+
}], ctorParameters: function () { return []; }, propDecorators: { info: [{
|
|
3338
|
+
type: Input
|
|
3339
|
+
}], infos: [{
|
|
3340
|
+
type: Input
|
|
3341
|
+
}], isOpenChange: [{
|
|
3342
|
+
type: Output
|
|
3343
|
+
}], isOpen: [{
|
|
3344
|
+
type: Input
|
|
3345
|
+
}], onClick: [{
|
|
3346
|
+
type: HostListener,
|
|
3347
|
+
args: ['click', ['$event']]
|
|
3348
|
+
}] } });
|
|
3349
|
+
|
|
3350
|
+
class MonthYearPickerComponent {
|
|
3351
|
+
constructor() {
|
|
3352
|
+
this.anoChange = new EventEmitter();
|
|
3353
|
+
this.mesChange = new EventEmitter();
|
|
3354
|
+
this.changed = new EventEmitter();
|
|
3355
|
+
this._init = false;
|
|
3356
|
+
this._modoAnual = false;
|
|
3357
|
+
this._meses = ["JANEIRO", "FEVEREIRO", "MARÇO", "ABRIL", "MAIO", "JUNHO", "JULHO", "AGOSTO", "SETEMBRO", "OUTUBRO", "NOVEMBRO", "DEZEMBRO"];
|
|
3358
|
+
this.text = '';
|
|
3359
|
+
this.disableNext = false;
|
|
3360
|
+
this.blockFuture = false;
|
|
3361
|
+
let d = new Date();
|
|
3362
|
+
this._ano = d.getFullYear();
|
|
3363
|
+
this._mes = d.getMonth() + 1;
|
|
3364
|
+
}
|
|
3365
|
+
get modoAnual() {
|
|
3366
|
+
return this._modoAnual;
|
|
3367
|
+
}
|
|
3368
|
+
set modoAnual(val) {
|
|
3369
|
+
this._modoAnual = val;
|
|
3370
|
+
if (!this._init)
|
|
3371
|
+
return;
|
|
3372
|
+
this.updateText();
|
|
3373
|
+
this.raiseOnSelectionChanged();
|
|
3374
|
+
}
|
|
3375
|
+
get ano() {
|
|
3376
|
+
return this._ano;
|
|
3377
|
+
}
|
|
3378
|
+
set ano(val) {
|
|
3379
|
+
this._ano = val;
|
|
3380
|
+
if (!this._init)
|
|
3381
|
+
return;
|
|
3382
|
+
this.anoChange.emit(val);
|
|
3383
|
+
this.updateText();
|
|
3384
|
+
}
|
|
3385
|
+
get mes() {
|
|
3386
|
+
return this._mes;
|
|
3387
|
+
}
|
|
3388
|
+
set mes(val) {
|
|
3389
|
+
this._mes = val;
|
|
3390
|
+
if (!this._init)
|
|
3391
|
+
return;
|
|
3392
|
+
this.mesChange.emit(val);
|
|
3393
|
+
this.updateText();
|
|
3394
|
+
}
|
|
3395
|
+
ngOnInit() {
|
|
3396
|
+
this.updateText();
|
|
3397
|
+
this._init = true;
|
|
3398
|
+
}
|
|
3399
|
+
goBack() {
|
|
3400
|
+
if (this.modoAnual) {
|
|
3401
|
+
this.ano -= 1;
|
|
3402
|
+
}
|
|
3403
|
+
else {
|
|
3404
|
+
this.mes--;
|
|
3405
|
+
if (this.mes < 1) {
|
|
3406
|
+
this.ano -= 1;
|
|
3407
|
+
this.mes = 12;
|
|
3408
|
+
}
|
|
3409
|
+
}
|
|
3410
|
+
this.updateText();
|
|
3411
|
+
this.raiseOnSelectionChanged();
|
|
3412
|
+
}
|
|
3413
|
+
;
|
|
3414
|
+
goNext() {
|
|
3415
|
+
if (this.modoAnual) {
|
|
3416
|
+
this.ano += 1;
|
|
3417
|
+
}
|
|
3418
|
+
else {
|
|
3419
|
+
this.mes++;
|
|
3420
|
+
if (this.mes > 12) {
|
|
3421
|
+
this.ano += 1;
|
|
3422
|
+
this.mes = 1;
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
this.updateText();
|
|
3426
|
+
this.raiseOnSelectionChanged();
|
|
3427
|
+
}
|
|
3428
|
+
;
|
|
3429
|
+
updateText() {
|
|
3430
|
+
if (this.modoAnual)
|
|
3431
|
+
this.text = '' + this._ano;
|
|
3432
|
+
else
|
|
3433
|
+
this.text = this._meses[this._mes - 1] + " DE " + this._ano;
|
|
3434
|
+
if (!this.blockFuture)
|
|
3435
|
+
return;
|
|
3436
|
+
let d = new Date();
|
|
3437
|
+
let ano = d.getFullYear();
|
|
3438
|
+
let mes = d.getMonth() + 1;
|
|
3439
|
+
if (!this.modoAnual)
|
|
3440
|
+
this.disableNext = ano == this.ano && this.mes >= mes;
|
|
3441
|
+
else
|
|
3442
|
+
this.disableNext = ano == this.ano;
|
|
3443
|
+
}
|
|
3444
|
+
;
|
|
3445
|
+
raiseOnSelectionChanged() {
|
|
3446
|
+
let d = { ano: this._ano, mes: this._mes };
|
|
3447
|
+
this.changed.emit(d);
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
MonthYearPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3451
|
+
MonthYearPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MonthYearPickerComponent, selector: "ox-month-year-picker", inputs: { blockFuture: "blockFuture", modoAnual: "modoAnual", ano: "ano", mes: "mes" }, outputs: { anoChange: "anoChange", mesChange: "mesChange", changed: "changed" }, ngImport: i0, template: "<div class=\"picker-container\">\n <div>\n <button mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </div>\n <span class=\"picker-text\">\n {{text}}\n </span>\n <div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>", styles: [".picker-container{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:250px}.picker-text{flex-flow:1;flex-grow:1;text-align:center;font-weight:700}\n"], dependencies: [{ kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
3452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, decorators: [{
|
|
3447
3453
|
type: Component,
|
|
3448
|
-
args: [{ selector: '
|
|
3449
|
-
}], ctorParameters: function () { return [
|
|
3454
|
+
args: [{ selector: 'ox-month-year-picker', template: "<div class=\"picker-container\">\n <div>\n <button mat-icon-button (click)=\"goBack()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </div>\n <span class=\"picker-text\">\n {{text}}\n </span>\n <div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n</div>", styles: [".picker-container{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:250px}.picker-text{flex-flow:1;flex-grow:1;text-align:center;font-weight:700}\n"] }]
|
|
3455
|
+
}], ctorParameters: function () { return []; }, propDecorators: { anoChange: [{
|
|
3456
|
+
type: Output
|
|
3457
|
+
}], mesChange: [{
|
|
3458
|
+
type: Output
|
|
3459
|
+
}], changed: [{
|
|
3460
|
+
type: Output
|
|
3461
|
+
}], blockFuture: [{
|
|
3462
|
+
type: Input
|
|
3463
|
+
}], modoAnual: [{
|
|
3464
|
+
type: Input
|
|
3465
|
+
}], ano: [{
|
|
3466
|
+
type: Input
|
|
3467
|
+
}], mes: [{
|
|
3468
|
+
type: Input
|
|
3469
|
+
}] } });
|
|
3450
3470
|
|
|
3451
|
-
class
|
|
3452
|
-
constructor(
|
|
3453
|
-
this.
|
|
3454
|
-
this.
|
|
3455
|
-
this.
|
|
3456
|
-
this.
|
|
3457
|
-
this.
|
|
3458
|
-
this.
|
|
3459
|
-
this.
|
|
3460
|
-
this.
|
|
3461
|
-
this.setting = new SearchSetting();
|
|
3462
|
-
this.focus = new FocusService();
|
|
3463
|
-
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
3464
|
-
this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
|
|
3465
|
-
this.mobile = this.screenHelper.isMedium;
|
|
3466
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
3471
|
+
class NumericPickerComponent {
|
|
3472
|
+
constructor() {
|
|
3473
|
+
this.valueChange = new EventEmitter();
|
|
3474
|
+
this.change = new EventEmitter();
|
|
3475
|
+
this._value = 0;
|
|
3476
|
+
this._max = 0;
|
|
3477
|
+
this._min = 0;
|
|
3478
|
+
this.text = '';
|
|
3479
|
+
this.disableNext = false;
|
|
3480
|
+
this.disableBack = false;
|
|
3467
3481
|
}
|
|
3468
|
-
|
|
3469
|
-
this.
|
|
3470
|
-
this.atualiza();
|
|
3482
|
+
get value() {
|
|
3483
|
+
return this._value;
|
|
3471
3484
|
}
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
this.focus.setFirst();
|
|
3477
|
-
}, 500);
|
|
3478
|
-
//this._focus.registerElementById("form-column");
|
|
3479
|
-
}
|
|
3480
|
-
else {
|
|
3481
|
-
this.focus.setFirst();
|
|
3482
|
-
}
|
|
3485
|
+
set value(val) {
|
|
3486
|
+
this._value = val;
|
|
3487
|
+
this.valueChange.emit(val);
|
|
3488
|
+
this.refreshUI();
|
|
3483
3489
|
}
|
|
3484
|
-
|
|
3485
|
-
this.
|
|
3490
|
+
get max() {
|
|
3491
|
+
return this._max;
|
|
3486
3492
|
}
|
|
3487
|
-
|
|
3488
|
-
this.
|
|
3489
|
-
this.
|
|
3490
|
-
.subscribe(r => {
|
|
3491
|
-
this.items = r;
|
|
3492
|
-
this.selectedItem = null;
|
|
3493
|
-
console.info(r);
|
|
3494
|
-
this.isBusy = false;
|
|
3495
|
-
}, err => {
|
|
3496
|
-
this.isBusy = false;
|
|
3497
|
-
this.notification.showHttpError(err);
|
|
3498
|
-
});
|
|
3493
|
+
set max(val) {
|
|
3494
|
+
this._max = val;
|
|
3495
|
+
this.refreshUI();
|
|
3499
3496
|
}
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
if (!item)
|
|
3503
|
-
return;
|
|
3504
|
-
confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do grupo ${item.nome}?`, () => {
|
|
3505
|
-
this.isBusy = true;
|
|
3506
|
-
this.ws.deleteProdutoCategoriaCardapio(item.id)
|
|
3507
|
-
.subscribe(r => {
|
|
3508
|
-
this.notification.showMsg("O grupo foi excluído com sucesso.");
|
|
3509
|
-
this.items.remove(item);
|
|
3510
|
-
this.selectedItem = null;
|
|
3511
|
-
this.isBusy = false;
|
|
3512
|
-
}, err => {
|
|
3513
|
-
this.isBusy = false;
|
|
3514
|
-
this.notification.showMsg(err.error);
|
|
3515
|
-
});
|
|
3516
|
-
});
|
|
3497
|
+
get min() {
|
|
3498
|
+
return this._min;
|
|
3517
3499
|
}
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
if (this.mobile) {
|
|
3522
|
-
width = (window.innerWidth * 0.99) + 'px';
|
|
3523
|
-
//height = (window.innerHeight * 0.98) + 'px';
|
|
3524
|
-
}
|
|
3525
|
-
const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
|
|
3526
|
-
width: width,
|
|
3527
|
-
//height: height,
|
|
3528
|
-
maxWidth: '100%',
|
|
3529
|
-
panelClass: 'dialog-p0',
|
|
3530
|
-
});
|
|
3531
|
-
dialog.afterClosed().subscribe(result => {
|
|
3532
|
-
if (result === undefined)
|
|
3533
|
-
return;
|
|
3534
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
3535
|
-
this.atualiza();
|
|
3536
|
-
});
|
|
3500
|
+
set min(val) {
|
|
3501
|
+
this._min = Number(val);
|
|
3502
|
+
this.refreshUI();
|
|
3537
3503
|
}
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3504
|
+
ngOnInit() {
|
|
3505
|
+
}
|
|
3506
|
+
onTextEdit(ev) {
|
|
3507
|
+
console.info(ev);
|
|
3508
|
+
const i = Number(ev.target.value);
|
|
3509
|
+
if (!this.valida(i))
|
|
3510
|
+
this.text = '' + this.value;
|
|
3511
|
+
else {
|
|
3512
|
+
this.value = i;
|
|
3513
|
+
this.raiseChange();
|
|
3514
|
+
this.refreshUI();
|
|
3544
3515
|
}
|
|
3545
|
-
const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
|
|
3546
|
-
data: item,
|
|
3547
|
-
width: width,
|
|
3548
|
-
//height: height,
|
|
3549
|
-
maxWidth: '100%',
|
|
3550
|
-
panelClass: 'dialog-p0',
|
|
3551
|
-
});
|
|
3552
|
-
dialog.afterClosed().subscribe(result => {
|
|
3553
|
-
if (result !== true)
|
|
3554
|
-
return;
|
|
3555
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
3556
|
-
this.atualiza();
|
|
3557
|
-
});
|
|
3558
3516
|
}
|
|
3559
|
-
|
|
3560
|
-
|
|
3517
|
+
goBack() {
|
|
3518
|
+
const newVal = this.value - 1;
|
|
3519
|
+
if (!this.valida(newVal))
|
|
3561
3520
|
return;
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3521
|
+
this.value = newVal;
|
|
3522
|
+
this.raiseChange();
|
|
3523
|
+
}
|
|
3524
|
+
;
|
|
3525
|
+
goNext() {
|
|
3526
|
+
const newVal = this.value + 1;
|
|
3527
|
+
if (!this.valida(newVal))
|
|
3565
3528
|
return;
|
|
3566
|
-
|
|
3567
|
-
this.
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3529
|
+
this.value = newVal;
|
|
3530
|
+
this.raiseChange();
|
|
3531
|
+
}
|
|
3532
|
+
;
|
|
3533
|
+
refreshUI() {
|
|
3534
|
+
this.text = this.value === undefined ? '--' : '' + this.value;
|
|
3535
|
+
this.disableNext = this.max !== undefined && this.value === this.max;
|
|
3536
|
+
this.disableBack = this.min !== undefined && this.value === this.min;
|
|
3537
|
+
}
|
|
3538
|
+
valida(val) {
|
|
3539
|
+
if (isNaN(val))
|
|
3540
|
+
return false;
|
|
3541
|
+
if (this.max !== undefined && val > this.max)
|
|
3542
|
+
return false;
|
|
3543
|
+
if (this.min !== undefined && val < this.min)
|
|
3544
|
+
return false;
|
|
3545
|
+
return true;
|
|
3546
|
+
}
|
|
3547
|
+
raiseChange() {
|
|
3548
|
+
this.change.emit(this.value);
|
|
3576
3549
|
}
|
|
3577
3550
|
}
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
3551
|
+
NumericPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3552
|
+
NumericPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: NumericPickerComponent, selector: "ox-numeric-picker", inputs: { value: "value", max: "max", min: "min" }, outputs: { valueChange: "valueChange", change: "change" }, ngImport: i0, template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\n"], dependencies: [{ kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
3553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, decorators: [{
|
|
3581
3554
|
type: Component,
|
|
3582
|
-
args: [{ selector: '
|
|
3583
|
-
}], ctorParameters: function () { return [
|
|
3555
|
+
args: [{ selector: 'ox-numeric-picker', template: "<div>\n <button mat-icon-button (click)=\"goBack()\" [disabled]=\"disableBack\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n</div>\n<input [(ngModel)]=\"text\" (change)=\"onTextEdit($event)\" class=\"date\">\n<div>\n <button mat-icon-button (click)=\"goNext()\" [disabled]=\"disableNext\" >\n <mat-icon>chevron_right</mat-icon>\n </button>\n</div>", styles: [":host{display:flex;flex-direction:row;justify-content:center;align-items:center;background:transparent;min-width:60px}\n"] }]
|
|
3556
|
+
}], ctorParameters: function () { return []; }, propDecorators: { valueChange: [{
|
|
3557
|
+
type: Output
|
|
3558
|
+
}], change: [{
|
|
3559
|
+
type: Output
|
|
3560
|
+
}], value: [{
|
|
3561
|
+
type: Input
|
|
3562
|
+
}], max: [{
|
|
3563
|
+
type: Input
|
|
3564
|
+
}], min: [{
|
|
3565
|
+
type: Input
|
|
3566
|
+
}] } });
|
|
3567
|
+
|
|
3568
|
+
class SafeHtmlPipe {
|
|
3569
|
+
constructor(sanitizer) {
|
|
3570
|
+
this.sanitizer = sanitizer;
|
|
3571
|
+
}
|
|
3572
|
+
transform(html) {
|
|
3573
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
3574
|
+
}
|
|
3575
|
+
}
|
|
3576
|
+
SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3577
|
+
SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
|
|
3578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
3579
|
+
type: Pipe,
|
|
3580
|
+
args: [{
|
|
3581
|
+
name: 'safeHtml'
|
|
3582
|
+
}]
|
|
3583
|
+
}], ctorParameters: function () { return [{ type: i1$2.DomSanitizer }]; } });
|
|
3584
3584
|
|
|
3585
3585
|
Array.prototype.remove = function (item) {
|
|
3586
3586
|
const index = this.indexOf(item);
|
|
@@ -3919,5 +3919,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
3919
3919
|
* Generated bundle index. Do not edit.
|
|
3920
3920
|
*/
|
|
3921
3921
|
|
|
3922
|
-
export { AlertDialogComponent, AuthDataService, BusyIndicatorComponent, BusyState, CheckButtonComponent, CommonWebService, ConsumoProdutoSearchSetting, DuplicataSearchSetting, ExportFileService, FocusService, FuncionarioAddDialogComponent, FuncionarioEditDialogComponent, FuncionarioFormComponent, FuncionariosComponent, ImageViewerComponent, ItemCardComponent, LazyTrigger, MonthYearPickerComponent, NavegacaoSelecaoDialogUtil, NotificationService, NumberParser, NumericPickerComponent, OcupacaoFilterSetting, OcupacaoSearchDateField, OcupacaoSearchSetting, OcupacaoSearchTipoEntrada, Ordem, OxpiNglibModule, PagamentoRecebimentoSearchSetting, PaginatorComponent, PorOcupacaoTipo, Preferences, ProdutoSearchSetting, RadioButtonGroupComponent, SafeHtmlPipe, ScreenHelperService, SearchMode, SearchSetting, SuitesIntervencoesSetting, confirmaExclusao, fadeAnimation, menuLateralAnimation, printHtml, printTxt, selectText, valNumberEmpty, valNumberMin, valTextEmpty, valTextMax };
|
|
3922
|
+
export { AlertDialogComponent, AuthDataService, BusyIndicatorComponent, BusyState, CheckButtonComponent, CommonWebService, ConsumoProdutoSearchSetting, DuplicataSearchSetting, ExportFileService, FocusService, FuncionarioAddDialogComponent, FuncionarioEditDialogComponent, FuncionarioFormComponent, FuncionariosComponent, ImageViewerComponent, ItemCardComponent, LazyTrigger, MonthYearPickerComponent, MoverGrupoDialogComponent, NavegacaoSelecaoDialogUtil, NotificationService, NumberParser, NumericPickerComponent, OcupacaoFilterSetting, OcupacaoSearchDateField, OcupacaoSearchSetting, OcupacaoSearchTipoEntrada, Ordem, OxpiNglibModule, PagamentoRecebimentoSearchSetting, PaginatorComponent, PorOcupacaoTipo, Preferences, ProdutoAddDialogComponent, ProdutoBuscaFiltrosDialogComponent, ProdutoCategoriaCardapioAddDialogComponent, ProdutoCategoriaCardapioEditDialogComponent, ProdutoCategoriaCardapioSelecaoDialogComponent, ProdutoEditDialogComponent, ProdutoFormComponent, ProdutoGrupoAddDialogComponent, ProdutoGrupoEditDialogComponent, ProdutoGrupoFormComponent, ProdutoGrupoSelecaoDialogComponent, ProdutoSearchSetting, ProdutoSubgrupoAddDialogComponent, ProdutoSubgrupoEditDialogComponent, ProdutoSubgrupoSelecaoDialogComponent, ProdutosCategoriasCardapioComponent, ProdutosComponent, ProdutosGruposComponent, ProdutosNcmDialogComponent, ProdutosSubgruposComponent, RadioButtonGroupComponent, SafeHtmlPipe, ScreenHelperService, SearchMode, SearchSetting, SuitesIntervencoesSetting, confirmaExclusao, createProduct, fadeAnimation, lateralAnimation, menuLateralAnimation, printHtml, printTxt, selectText, valNumberEmpty, valNumberMin, valTextEmpty, valTextMax, validaProduto, validaProdutoGrupo };
|
|
3923
3923
|
//# sourceMappingURL=oxpi-nglib.mjs.map
|