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/fesm2015/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;
|
|
@@ -594,7 +594,7 @@ class FuncionarioEditDialogComponent {
|
|
|
594
594
|
salvar() {
|
|
595
595
|
if (!this.model)
|
|
596
596
|
return;
|
|
597
|
-
const valMsg = valida
|
|
597
|
+
const valMsg = valida(this.model, this.focus);
|
|
598
598
|
if (valMsg) {
|
|
599
599
|
this.notification.showMsgError(valMsg);
|
|
600
600
|
return;
|
|
@@ -1142,7 +1142,7 @@ class FuncionariosComponent {
|
|
|
1142
1142
|
const item = this.selectedItem;
|
|
1143
1143
|
if (!item)
|
|
1144
1144
|
return;
|
|
1145
|
-
const valMsg = valida
|
|
1145
|
+
const valMsg = valida(item, this.focus);
|
|
1146
1146
|
if (valMsg) {
|
|
1147
1147
|
this.notification.showMsgError(valMsg);
|
|
1148
1148
|
return;
|
|
@@ -1165,1207 +1165,758 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
1165
1165
|
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"] }]
|
|
1166
1166
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
1167
1167
|
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1168
|
+
var ModalidadeBaseICMS;
|
|
1169
|
+
(function (ModalidadeBaseICMS) {
|
|
1170
|
+
ModalidadeBaseICMS[ModalidadeBaseICMS["MargemValorAgregado"] = 0] = "MargemValorAgregado";
|
|
1171
|
+
ModalidadeBaseICMS[ModalidadeBaseICMS["PautaValor"] = 1] = "PautaValor";
|
|
1172
|
+
ModalidadeBaseICMS[ModalidadeBaseICMS["Pre\u00E7oTabeladoMax"] = 2] = "Pre\u00E7oTabeladoMax";
|
|
1173
|
+
ModalidadeBaseICMS[ModalidadeBaseICMS["ValorDaOpera\u00E7\u00E3o"] = 3] = "ValorDaOpera\u00E7\u00E3o";
|
|
1174
|
+
})(ModalidadeBaseICMS || (ModalidadeBaseICMS = {}));
|
|
1175
|
+
function createProduct() {
|
|
1176
|
+
return {
|
|
1177
|
+
id: 0,
|
|
1178
|
+
nome: '',
|
|
1179
|
+
unidade: 'UN',
|
|
1180
|
+
precoCusto: 0,
|
|
1181
|
+
precoVenda: 0,
|
|
1182
|
+
precoFuncionario: 0,
|
|
1183
|
+
estoqueMinimo: 0,
|
|
1184
|
+
referencia: '',
|
|
1185
|
+
aliquotaICMS: null,
|
|
1186
|
+
ncm: null,
|
|
1187
|
+
grupoId: 0,
|
|
1188
|
+
grupoNome: null,
|
|
1189
|
+
subgrupoId: 0,
|
|
1190
|
+
subgrupoNome: null,
|
|
1191
|
+
quantidadeSuite: 0,
|
|
1192
|
+
estoqueControlado: true,
|
|
1193
|
+
imprimiCozinha: true,
|
|
1194
|
+
imprimeCorredor: false,
|
|
1195
|
+
verNaRecepcao: true,
|
|
1196
|
+
prato: false,
|
|
1197
|
+
isAtivo: true,
|
|
1198
|
+
isComposto: true,
|
|
1199
|
+
isIngrediente: true,
|
|
1200
|
+
omiteCliente: false,
|
|
1201
|
+
estoqueRecepcao: false,
|
|
1202
|
+
estoqueRecepcaoQuantidade: 0,
|
|
1203
|
+
gtin: null,
|
|
1204
|
+
cfop: null,
|
|
1205
|
+
csT_icms: null,
|
|
1206
|
+
modBC_icms: 0,
|
|
1207
|
+
pICMS_icms: null,
|
|
1208
|
+
pRedBC_icms: null,
|
|
1209
|
+
pfcP_icms: null,
|
|
1210
|
+
vbcfcP_icms: null,
|
|
1211
|
+
pfcpsT_icms: null,
|
|
1212
|
+
pRedBCEfet_icms: null,
|
|
1213
|
+
vbcEfet_icms: null,
|
|
1214
|
+
picmsEfet_icms: null,
|
|
1215
|
+
vicmsEfet_icms: null,
|
|
1216
|
+
csT_pis: null,
|
|
1217
|
+
vbC_pis: null,
|
|
1218
|
+
ppiS_pis: null,
|
|
1219
|
+
csT_cofins: null,
|
|
1220
|
+
vbC_cofins: null,
|
|
1221
|
+
pcofinS_cofins: null,
|
|
1222
|
+
psT_icms: null,
|
|
1223
|
+
vbcstRet_icms: null,
|
|
1224
|
+
vicmsSubstituto_icms: null,
|
|
1225
|
+
vicmsstRet_icms: null,
|
|
1226
|
+
emiteNFCe: false,
|
|
1227
|
+
cest: null,
|
|
1228
|
+
vbcfcpsT_icms: null,
|
|
1229
|
+
vbcfcpstRet_icms: null,
|
|
1230
|
+
pfcpstRet_icms: null,
|
|
1231
|
+
sitTrib: null,
|
|
1232
|
+
setorSubEstoqueId: null,
|
|
1233
|
+
setorSubEstoqueNome: null,
|
|
1234
|
+
setorPrincipalId: null,
|
|
1235
|
+
setorPrincipalNome: null,
|
|
1236
|
+
qtdMinSubEstoque: null,
|
|
1237
|
+
disponivelCardapio: false,
|
|
1238
|
+
categoriaCardapioId: null,
|
|
1239
|
+
categoriaCardapioNome: null,
|
|
1240
|
+
descricao: null,
|
|
1241
|
+
enviadoPC: false,
|
|
1242
|
+
qbcProd_cofins: null,
|
|
1243
|
+
vAliqProd_cofins: null
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
;
|
|
1247
|
+
function validaProduto(item, focus) {
|
|
1248
|
+
if (valTextEmpty(item.nome)) {
|
|
1249
|
+
focus.set('nome');
|
|
1250
|
+
return 'Digite um nome válido.';
|
|
1174
1251
|
}
|
|
1175
|
-
|
|
1252
|
+
if (valNumberEmpty(item.grupoId)) {
|
|
1253
|
+
return 'Escolha um grupo de produto.';
|
|
1176
1254
|
}
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
this.checked = !this.checked;
|
|
1180
|
-
this.changed.emit(this.checked);
|
|
1255
|
+
if (valNumberEmpty(item.subgrupoId)) {
|
|
1256
|
+
return 'Escolha um subgrupo de produto.';
|
|
1181
1257
|
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: CheckButtonComponent, decorators: [{
|
|
1186
|
-
type: Component,
|
|
1187
|
-
args: [{ selector: 'ox-check-button', host: {
|
|
1188
|
-
'[class.checked]': "checked",
|
|
1189
|
-
}, 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"] }]
|
|
1190
|
-
}], ctorParameters: function () { return []; }, propDecorators: { checked: [{
|
|
1191
|
-
type: Input
|
|
1192
|
-
}], radioBehavior: [{
|
|
1193
|
-
type: Input
|
|
1194
|
-
}], changed: [{
|
|
1195
|
-
type: Output
|
|
1196
|
-
}], onClick: [{
|
|
1197
|
-
type: HostListener,
|
|
1198
|
-
args: ['click', ['$event']]
|
|
1199
|
-
}] } });
|
|
1200
|
-
|
|
1201
|
-
class ImageViewerComponent {
|
|
1202
|
-
constructor() {
|
|
1203
|
-
this.infos = [];
|
|
1204
|
-
this._isOpen = false;
|
|
1205
|
-
this.paginaAtual = 0;
|
|
1206
|
-
this.disableBack = false;
|
|
1207
|
-
this.disableNext = false;
|
|
1208
|
-
this.isOpenChange = new EventEmitter();
|
|
1258
|
+
if (valTextEmpty(item.unidade)) {
|
|
1259
|
+
focus.set('unidade');
|
|
1260
|
+
return 'Digite uma unidade.';
|
|
1209
1261
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1262
|
+
if (item.disponivelCardapio) {
|
|
1263
|
+
if (valNumberEmpty(item.categoriaCardapioId))
|
|
1264
|
+
return 'Escolha uma categoria do cardápio digital.';
|
|
1265
|
+
if (valTextEmpty(item.descricao)) {
|
|
1266
|
+
focus.set('descricao');
|
|
1267
|
+
return 'Digite uma descrição para o cardápio digital.';
|
|
1268
|
+
}
|
|
1212
1269
|
}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1270
|
+
return null;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
class NumberParser {
|
|
1274
|
+
constructor(setPropFunc, getPropFunc, min, max, triggerMilliseconds = 1500) {
|
|
1275
|
+
this.setPropFunc = setPropFunc;
|
|
1276
|
+
this.getPropFunc = getPropFunc;
|
|
1277
|
+
this.min = min;
|
|
1278
|
+
this.max = max;
|
|
1279
|
+
this.parsed = false;
|
|
1280
|
+
this._parseTrigger = new LazyTrigger(() => this.parseValor(), triggerMilliseconds);
|
|
1216
1281
|
}
|
|
1217
|
-
|
|
1218
|
-
|
|
1282
|
+
parse(vlr) {
|
|
1283
|
+
this.valor = vlr;
|
|
1284
|
+
this.parsed = false;
|
|
1285
|
+
this._parseTrigger.fire();
|
|
1219
1286
|
}
|
|
1220
|
-
|
|
1287
|
+
store(vlr) {
|
|
1288
|
+
this.valor = vlr;
|
|
1289
|
+
this.parsed = false;
|
|
1221
1290
|
}
|
|
1222
|
-
|
|
1223
|
-
if (
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1291
|
+
checkout() {
|
|
1292
|
+
if (this.parsed || !this.valor)
|
|
1293
|
+
return;
|
|
1294
|
+
this.parseValor();
|
|
1295
|
+
}
|
|
1296
|
+
parseValor() {
|
|
1297
|
+
if (this.valor === undefined)
|
|
1298
|
+
return;
|
|
1299
|
+
this.parsed = true;
|
|
1300
|
+
const vlrTxt = this.valor.split(",").join(".");
|
|
1301
|
+
;
|
|
1302
|
+
const spTxt = vlrTxt.split(".");
|
|
1303
|
+
let toParseTxt = "";
|
|
1304
|
+
if (spTxt.length > 2) {
|
|
1305
|
+
const chars = vlrTxt.split("");
|
|
1306
|
+
const lastIndex = vlrTxt.lastIndexOf(".");
|
|
1307
|
+
for (let i = 0; i < chars.length; i++) {
|
|
1308
|
+
const c = chars[i];
|
|
1309
|
+
if (c === "." && i != lastIndex)
|
|
1310
|
+
continue;
|
|
1311
|
+
toParseTxt = toParseTxt.concat(c);
|
|
1229
1312
|
}
|
|
1230
1313
|
}
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1314
|
+
else {
|
|
1315
|
+
toParseTxt = vlrTxt;
|
|
1316
|
+
}
|
|
1317
|
+
const vlr = parseFloat(toParseTxt);
|
|
1318
|
+
if (isNaN(vlr) || !this.validaMinMax(vlr)) {
|
|
1319
|
+
const original = this.getPropFunc();
|
|
1320
|
+
this.setPropFunc(0);
|
|
1321
|
+
setTimeout(() => this.setPropFunc(original));
|
|
1322
|
+
}
|
|
1323
|
+
else {
|
|
1324
|
+
this.setPropFunc(vlr);
|
|
1325
|
+
}
|
|
1235
1326
|
}
|
|
1236
|
-
|
|
1237
|
-
this.
|
|
1238
|
-
|
|
1239
|
-
this.
|
|
1327
|
+
validaMinMax(value) {
|
|
1328
|
+
if ((this.min === undefined) && this.max === undefined)
|
|
1329
|
+
return true;
|
|
1330
|
+
if (!(this.min === undefined) && value < this.min)
|
|
1331
|
+
return false;
|
|
1332
|
+
if (!(this.max === undefined) && value > this.max)
|
|
1333
|
+
return false;
|
|
1334
|
+
return true;
|
|
1240
1335
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
function validaProdutoGrupo(item, focus) {
|
|
1339
|
+
if (valTextEmpty(item.nome)) {
|
|
1340
|
+
focus.set('nome');
|
|
1341
|
+
return 'Digite um nome válido.';
|
|
1245
1342
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1343
|
+
return null;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
class ProdutoGrupoFormComponent {
|
|
1347
|
+
constructor() { }
|
|
1348
|
+
ngOnInit() {
|
|
1249
1349
|
}
|
|
1250
1350
|
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
1351
|
+
ProdutoGrupoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1352
|
+
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"] }] });
|
|
1353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, decorators: [{
|
|
1254
1354
|
type: Component,
|
|
1255
|
-
args: [{ selector: 'ox-
|
|
1256
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
1257
|
-
type: Input
|
|
1258
|
-
}], infos: [{
|
|
1259
|
-
type: Input
|
|
1260
|
-
}], isOpenChange: [{
|
|
1261
|
-
type: Output
|
|
1262
|
-
}], isOpen: [{
|
|
1355
|
+
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"] }]
|
|
1356
|
+
}], ctorParameters: function () { return []; }, propDecorators: { model: [{
|
|
1263
1357
|
type: Input
|
|
1264
|
-
}], onClick: [{
|
|
1265
|
-
type: HostListener,
|
|
1266
|
-
args: ['click', ['$event']]
|
|
1267
1358
|
}] } });
|
|
1268
1359
|
|
|
1269
|
-
class
|
|
1270
|
-
constructor() {
|
|
1271
|
-
this.
|
|
1272
|
-
this.
|
|
1273
|
-
this.
|
|
1274
|
-
this.
|
|
1275
|
-
this.
|
|
1276
|
-
this.
|
|
1277
|
-
this.
|
|
1278
|
-
this.
|
|
1279
|
-
this.
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1360
|
+
class ProdutoCategoriaCardapioAddDialogComponent {
|
|
1361
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1362
|
+
this.ws = ws;
|
|
1363
|
+
this.notification = notification;
|
|
1364
|
+
this.dataDialog = dataDialog;
|
|
1365
|
+
this.dialog = dialog;
|
|
1366
|
+
this.elRef = elRef;
|
|
1367
|
+
this.dialogRef = dialogRef;
|
|
1368
|
+
this.screenHelper = screenHelper;
|
|
1369
|
+
this.isBusy = false;
|
|
1370
|
+
this.focus = new FocusService();
|
|
1371
|
+
this.model = {
|
|
1372
|
+
id: 0,
|
|
1373
|
+
nome: '',
|
|
1374
|
+
isAtivo: true,
|
|
1375
|
+
enviadoPC: false
|
|
1376
|
+
};
|
|
1377
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1378
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1286
1379
|
}
|
|
1287
|
-
|
|
1288
|
-
this.
|
|
1289
|
-
if (!this._init)
|
|
1290
|
-
return;
|
|
1291
|
-
this.updateText();
|
|
1292
|
-
this.raiseOnSelectionChanged();
|
|
1380
|
+
ngOnInit() {
|
|
1381
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
1293
1382
|
}
|
|
1294
|
-
|
|
1295
|
-
|
|
1383
|
+
ngOnDestroy() {
|
|
1384
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1296
1385
|
}
|
|
1297
|
-
|
|
1298
|
-
this.
|
|
1299
|
-
if (
|
|
1386
|
+
salvar() {
|
|
1387
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
1388
|
+
if (valMsg) {
|
|
1389
|
+
this.notification.showMsgError(valMsg);
|
|
1300
1390
|
return;
|
|
1301
|
-
|
|
1302
|
-
this.
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1391
|
+
}
|
|
1392
|
+
this.isBusy = true;
|
|
1393
|
+
this.ws.addProdutoCategoriaCardapio(this.model)
|
|
1394
|
+
.subscribe(r => {
|
|
1395
|
+
this.isBusy = false;
|
|
1396
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1397
|
+
if (this.dialogRef)
|
|
1398
|
+
this.dialogRef.close(true);
|
|
1399
|
+
}, err => {
|
|
1400
|
+
this.isBusy = false;
|
|
1401
|
+
this.notification.showMsg(err.error);
|
|
1402
|
+
});
|
|
1306
1403
|
}
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1404
|
+
}
|
|
1405
|
+
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 });
|
|
1406
|
+
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"] }] });
|
|
1407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, decorators: [{
|
|
1408
|
+
type: Component,
|
|
1409
|
+
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"] }]
|
|
1410
|
+
}], ctorParameters: function () {
|
|
1411
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1412
|
+
type: Inject,
|
|
1413
|
+
args: [MAT_DIALOG_DATA]
|
|
1414
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
1415
|
+
} });
|
|
1416
|
+
|
|
1417
|
+
class ProdutoCategoriaCardapioEditDialogComponent {
|
|
1418
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1419
|
+
this.ws = ws;
|
|
1420
|
+
this.notification = notification;
|
|
1421
|
+
this.dataDialog = dataDialog;
|
|
1422
|
+
this.dialog = dialog;
|
|
1423
|
+
this.elRef = elRef;
|
|
1424
|
+
this.dialogRef = dialogRef;
|
|
1425
|
+
this.screenHelper = screenHelper;
|
|
1426
|
+
this.isBusy = false;
|
|
1427
|
+
this.focus = new FocusService();
|
|
1428
|
+
if (dataDialog) {
|
|
1429
|
+
this.model = dataDialog;
|
|
1430
|
+
}
|
|
1431
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1432
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1313
1433
|
}
|
|
1314
1434
|
ngOnInit() {
|
|
1315
|
-
this.
|
|
1316
|
-
this._init = true;
|
|
1317
|
-
}
|
|
1318
|
-
goBack() {
|
|
1319
|
-
if (this.modoAnual) {
|
|
1320
|
-
this.ano -= 1;
|
|
1321
|
-
}
|
|
1322
|
-
else {
|
|
1323
|
-
this.mes--;
|
|
1324
|
-
if (this.mes < 1) {
|
|
1325
|
-
this.ano -= 1;
|
|
1326
|
-
this.mes = 12;
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
this.updateText();
|
|
1330
|
-
this.raiseOnSelectionChanged();
|
|
1435
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
1331
1436
|
}
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
if (this.modoAnual) {
|
|
1335
|
-
this.ano += 1;
|
|
1336
|
-
}
|
|
1337
|
-
else {
|
|
1338
|
-
this.mes++;
|
|
1339
|
-
if (this.mes > 12) {
|
|
1340
|
-
this.ano += 1;
|
|
1341
|
-
this.mes = 1;
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
this.updateText();
|
|
1345
|
-
this.raiseOnSelectionChanged();
|
|
1437
|
+
ngOnDestroy() {
|
|
1438
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1346
1439
|
}
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
if (this.modoAnual)
|
|
1350
|
-
this.text = '' + this._ano;
|
|
1351
|
-
else
|
|
1352
|
-
this.text = this._meses[this._mes - 1] + " DE " + this._ano;
|
|
1353
|
-
if (!this.blockFuture)
|
|
1440
|
+
salvar() {
|
|
1441
|
+
if (!this.model)
|
|
1354
1442
|
return;
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1443
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
1444
|
+
if (valMsg) {
|
|
1445
|
+
this.notification.showMsgError(valMsg);
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
this.isBusy = true;
|
|
1449
|
+
this.ws.saveProdutoCategoriaCardapio(this.model)
|
|
1450
|
+
.subscribe(r => {
|
|
1451
|
+
this.isBusy = false;
|
|
1452
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1453
|
+
if (this.dialogRef)
|
|
1454
|
+
this.dialogRef.close(true);
|
|
1455
|
+
}, err => {
|
|
1456
|
+
this.isBusy = false;
|
|
1457
|
+
this.notification.showMsg(err.error);
|
|
1458
|
+
});
|
|
1367
1459
|
}
|
|
1368
1460
|
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
1461
|
+
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 });
|
|
1462
|
+
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"] }] });
|
|
1463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, decorators: [{
|
|
1372
1464
|
type: Component,
|
|
1373
|
-
args: [{ selector: 'ox-
|
|
1374
|
-
}], ctorParameters: function () {
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
}], blockFuture: [{
|
|
1381
|
-
type: Input
|
|
1382
|
-
}], modoAnual: [{
|
|
1383
|
-
type: Input
|
|
1384
|
-
}], ano: [{
|
|
1385
|
-
type: Input
|
|
1386
|
-
}], mes: [{
|
|
1387
|
-
type: Input
|
|
1388
|
-
}] } });
|
|
1465
|
+
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"] }]
|
|
1466
|
+
}], ctorParameters: function () {
|
|
1467
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1468
|
+
type: Inject,
|
|
1469
|
+
args: [MAT_DIALOG_DATA]
|
|
1470
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
1471
|
+
} });
|
|
1389
1472
|
|
|
1390
|
-
class
|
|
1391
|
-
constructor() {
|
|
1392
|
-
this.
|
|
1393
|
-
this.
|
|
1394
|
-
this.
|
|
1395
|
-
this.
|
|
1396
|
-
this.
|
|
1397
|
-
this.
|
|
1398
|
-
this.
|
|
1399
|
-
this.
|
|
1473
|
+
class ProdutoCategoriaCardapioSelecaoDialogComponent {
|
|
1474
|
+
constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
|
|
1475
|
+
this.dialogRef = dialogRef;
|
|
1476
|
+
this.dialog = dialog;
|
|
1477
|
+
this.ws = ws;
|
|
1478
|
+
this.notification = notification;
|
|
1479
|
+
this.screenHelper = screenHelper;
|
|
1480
|
+
this.items = [];
|
|
1481
|
+
this.selectedItem = null;
|
|
1482
|
+
this.isBusy = false;
|
|
1483
|
+
this.setting = new SearchSetting();
|
|
1484
|
+
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
1485
|
+
this.nav = new NavegacaoSelecaoDialogUtil(this);
|
|
1486
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1487
|
+
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
1488
|
+
this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
|
|
1400
1489
|
}
|
|
1401
|
-
|
|
1402
|
-
|
|
1490
|
+
ngOnInit() {
|
|
1491
|
+
this.setting.ordem = "nome";
|
|
1492
|
+
this.atualiza();
|
|
1403
1493
|
}
|
|
1404
|
-
|
|
1405
|
-
this.
|
|
1406
|
-
this.
|
|
1407
|
-
|
|
1494
|
+
atualiza() {
|
|
1495
|
+
this.isBusy = true;
|
|
1496
|
+
this.ws.buscaProdutoCategoriaCardapio(this.setting)
|
|
1497
|
+
.subscribe(r => {
|
|
1498
|
+
this.isBusy = false;
|
|
1499
|
+
this.items = r;
|
|
1500
|
+
console.info(r);
|
|
1501
|
+
}, err => {
|
|
1502
|
+
this.isBusy = false;
|
|
1503
|
+
this.notification.showHttpError(err);
|
|
1504
|
+
});
|
|
1408
1505
|
}
|
|
1409
|
-
|
|
1410
|
-
|
|
1506
|
+
selectItem(i) {
|
|
1507
|
+
if (this.selectedItem === i) {
|
|
1508
|
+
this.dialogRef.close(i);
|
|
1509
|
+
}
|
|
1510
|
+
this.selectedItem = i;
|
|
1411
1511
|
}
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1512
|
+
novo() {
|
|
1513
|
+
let height = (window.innerHeight * 0.90) + 'px';
|
|
1514
|
+
let width = 550 + 'px';
|
|
1515
|
+
if (this.mobile) {
|
|
1516
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
1517
|
+
//height = (window.innerHeight * 0.98) + 'px';
|
|
1518
|
+
}
|
|
1519
|
+
const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
|
|
1520
|
+
width: width,
|
|
1521
|
+
height: height,
|
|
1522
|
+
maxWidth: '100%',
|
|
1523
|
+
panelClass: 'dialog-p0',
|
|
1524
|
+
});
|
|
1525
|
+
dialog.afterClosed().subscribe(result => {
|
|
1526
|
+
if (result === undefined)
|
|
1527
|
+
return;
|
|
1528
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1529
|
+
this.atualiza();
|
|
1530
|
+
});
|
|
1415
1531
|
}
|
|
1416
|
-
|
|
1417
|
-
|
|
1532
|
+
editar() {
|
|
1533
|
+
let height = (window.innerHeight * 0.90) + 'px';
|
|
1534
|
+
let width = 550 + 'px';
|
|
1535
|
+
if (this.mobile) {
|
|
1536
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
1537
|
+
//height = (window.innerHeight * 0.98) + 'px';
|
|
1538
|
+
}
|
|
1539
|
+
const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
|
|
1540
|
+
width: width,
|
|
1541
|
+
height: height,
|
|
1542
|
+
maxWidth: '100%',
|
|
1543
|
+
panelClass: 'dialog-p0',
|
|
1544
|
+
data: this.selectedItem
|
|
1545
|
+
});
|
|
1546
|
+
dialog.afterClosed().subscribe(result => {
|
|
1547
|
+
if (result === undefined)
|
|
1548
|
+
return;
|
|
1549
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1550
|
+
this.atualiza();
|
|
1551
|
+
});
|
|
1418
1552
|
}
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1553
|
+
}
|
|
1554
|
+
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 });
|
|
1555
|
+
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"] }] });
|
|
1556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioSelecaoDialogComponent, decorators: [{
|
|
1557
|
+
type: Component,
|
|
1558
|
+
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"] }]
|
|
1559
|
+
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
1560
|
+
|
|
1561
|
+
class ProdutoGrupoAddDialogComponent {
|
|
1562
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1563
|
+
this.ws = ws;
|
|
1564
|
+
this.notification = notification;
|
|
1565
|
+
this.dataDialog = dataDialog;
|
|
1566
|
+
this.dialog = dialog;
|
|
1567
|
+
this.elRef = elRef;
|
|
1568
|
+
this.dialogRef = dialogRef;
|
|
1569
|
+
this.screenHelper = screenHelper;
|
|
1570
|
+
this.isBusy = false;
|
|
1571
|
+
this.focus = new FocusService();
|
|
1572
|
+
this.model = {
|
|
1573
|
+
id: 0,
|
|
1574
|
+
nome: '',
|
|
1575
|
+
isAtivo: true,
|
|
1576
|
+
enviadoPC: false
|
|
1577
|
+
};
|
|
1578
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1579
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1422
1580
|
}
|
|
1423
1581
|
ngOnInit() {
|
|
1582
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
1424
1583
|
}
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
const i = Number(ev.target.value);
|
|
1428
|
-
if (!this.valida(i))
|
|
1429
|
-
this.text = '' + this.value;
|
|
1430
|
-
else {
|
|
1431
|
-
this.value = i;
|
|
1432
|
-
this.raiseChange();
|
|
1433
|
-
this.refreshUI();
|
|
1434
|
-
}
|
|
1584
|
+
ngOnDestroy() {
|
|
1585
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1435
1586
|
}
|
|
1436
|
-
|
|
1437
|
-
const
|
|
1438
|
-
if (
|
|
1587
|
+
salvar() {
|
|
1588
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
1589
|
+
if (valMsg) {
|
|
1590
|
+
this.notification.showMsgError(valMsg);
|
|
1439
1591
|
return;
|
|
1440
|
-
|
|
1441
|
-
this.
|
|
1592
|
+
}
|
|
1593
|
+
this.isBusy = true;
|
|
1594
|
+
this.ws.addProdutoGrupo(this.model)
|
|
1595
|
+
.subscribe(r => {
|
|
1596
|
+
this.isBusy = false;
|
|
1597
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1598
|
+
if (this.dialogRef)
|
|
1599
|
+
this.dialogRef.close(true);
|
|
1600
|
+
}, err => {
|
|
1601
|
+
this.isBusy = false;
|
|
1602
|
+
this.notification.showMsg(err.error);
|
|
1603
|
+
});
|
|
1442
1604
|
}
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1605
|
+
}
|
|
1606
|
+
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 });
|
|
1607
|
+
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"] }] });
|
|
1608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoAddDialogComponent, decorators: [{
|
|
1609
|
+
type: Component,
|
|
1610
|
+
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"] }]
|
|
1611
|
+
}], ctorParameters: function () {
|
|
1612
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1613
|
+
type: Inject,
|
|
1614
|
+
args: [MAT_DIALOG_DATA]
|
|
1615
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
1616
|
+
} });
|
|
1617
|
+
|
|
1618
|
+
class ProdutoGrupoEditDialogComponent {
|
|
1619
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1620
|
+
this.ws = ws;
|
|
1621
|
+
this.notification = notification;
|
|
1622
|
+
this.dataDialog = dataDialog;
|
|
1623
|
+
this.dialog = dialog;
|
|
1624
|
+
this.elRef = elRef;
|
|
1625
|
+
this.dialogRef = dialogRef;
|
|
1626
|
+
this.screenHelper = screenHelper;
|
|
1627
|
+
this.isBusy = false;
|
|
1628
|
+
this.focus = new FocusService();
|
|
1629
|
+
if (dataDialog) {
|
|
1630
|
+
this.model = dataDialog;
|
|
1631
|
+
}
|
|
1632
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1633
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1450
1634
|
}
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
this.text = this.value === undefined ? '--' : '' + this.value;
|
|
1454
|
-
this.disableNext = this.max !== undefined && this.value === this.max;
|
|
1455
|
-
this.disableBack = this.min !== undefined && this.value === this.min;
|
|
1635
|
+
ngOnInit() {
|
|
1636
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
1456
1637
|
}
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
return false;
|
|
1460
|
-
if (this.max !== undefined && val > this.max)
|
|
1461
|
-
return false;
|
|
1462
|
-
if (this.min !== undefined && val < this.min)
|
|
1463
|
-
return false;
|
|
1464
|
-
return true;
|
|
1638
|
+
ngOnDestroy() {
|
|
1639
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1465
1640
|
}
|
|
1466
|
-
|
|
1467
|
-
|
|
1641
|
+
salvar() {
|
|
1642
|
+
if (!this.model)
|
|
1643
|
+
return;
|
|
1644
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
1645
|
+
if (valMsg) {
|
|
1646
|
+
this.notification.showMsgError(valMsg);
|
|
1647
|
+
return;
|
|
1648
|
+
}
|
|
1649
|
+
this.isBusy = true;
|
|
1650
|
+
this.ws.saveProdutoGrupo(this.model)
|
|
1651
|
+
.subscribe(r => {
|
|
1652
|
+
this.isBusy = false;
|
|
1653
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1654
|
+
if (this.dialogRef)
|
|
1655
|
+
this.dialogRef.close(true);
|
|
1656
|
+
}, err => {
|
|
1657
|
+
this.isBusy = false;
|
|
1658
|
+
this.notification.showMsg(err.error);
|
|
1659
|
+
});
|
|
1468
1660
|
}
|
|
1469
1661
|
}
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
1662
|
+
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 });
|
|
1663
|
+
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"] }] });
|
|
1664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoEditDialogComponent, decorators: [{
|
|
1473
1665
|
type: Component,
|
|
1474
|
-
args: [{ selector: 'ox-
|
|
1475
|
-
}], ctorParameters: function () {
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
}], max: [{
|
|
1482
|
-
type: Input
|
|
1483
|
-
}], min: [{
|
|
1484
|
-
type: Input
|
|
1485
|
-
}] } });
|
|
1666
|
+
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"] }]
|
|
1667
|
+
}], ctorParameters: function () {
|
|
1668
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1669
|
+
type: Inject,
|
|
1670
|
+
args: [MAT_DIALOG_DATA]
|
|
1671
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
1672
|
+
} });
|
|
1486
1673
|
|
|
1487
|
-
class
|
|
1488
|
-
constructor() {
|
|
1489
|
-
this.
|
|
1490
|
-
this.
|
|
1491
|
-
this.
|
|
1492
|
-
this.
|
|
1493
|
-
this.
|
|
1494
|
-
this.
|
|
1495
|
-
this.
|
|
1496
|
-
this.
|
|
1674
|
+
class ProdutoGrupoSelecaoDialogComponent {
|
|
1675
|
+
constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
|
|
1676
|
+
this.dialogRef = dialogRef;
|
|
1677
|
+
this.dialog = dialog;
|
|
1678
|
+
this.ws = ws;
|
|
1679
|
+
this.notification = notification;
|
|
1680
|
+
this.screenHelper = screenHelper;
|
|
1681
|
+
this.items = [];
|
|
1682
|
+
this.selectedItem = null;
|
|
1683
|
+
this.isBusy = false;
|
|
1684
|
+
this.setting = new SearchSetting();
|
|
1685
|
+
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
1686
|
+
this.nav = new NavegacaoSelecaoDialogUtil(this);
|
|
1687
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1688
|
+
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
1689
|
+
this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
|
|
1497
1690
|
}
|
|
1498
|
-
|
|
1499
|
-
|
|
1691
|
+
ngOnInit() {
|
|
1692
|
+
this.setting.ordem = "nome";
|
|
1693
|
+
this.atualiza();
|
|
1500
1694
|
}
|
|
1501
|
-
|
|
1502
|
-
this.
|
|
1503
|
-
this.
|
|
1504
|
-
|
|
1695
|
+
atualiza() {
|
|
1696
|
+
this.isBusy = true;
|
|
1697
|
+
this.ws.buscaProdutoGrupo(this.setting)
|
|
1698
|
+
.subscribe(r => {
|
|
1699
|
+
this.isBusy = false;
|
|
1700
|
+
this.items = r;
|
|
1701
|
+
console.info(r);
|
|
1702
|
+
}, err => {
|
|
1703
|
+
this.isBusy = false;
|
|
1704
|
+
this.notification.showHttpError(err);
|
|
1705
|
+
});
|
|
1505
1706
|
}
|
|
1506
|
-
|
|
1507
|
-
|
|
1707
|
+
selectItem(i) {
|
|
1708
|
+
if (this.selectedItem === i) {
|
|
1709
|
+
this.dialogRef.close(i);
|
|
1710
|
+
}
|
|
1711
|
+
this.selectedItem = i;
|
|
1508
1712
|
}
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
this.
|
|
1713
|
+
novo() {
|
|
1714
|
+
let height = (window.innerHeight * 0.90) + 'px';
|
|
1715
|
+
let width = 550 + 'px';
|
|
1716
|
+
if (this.mobile) {
|
|
1717
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
1718
|
+
//height = (window.innerHeight * 0.98) + 'px';
|
|
1719
|
+
}
|
|
1720
|
+
const dialog = this.dialog.open(ProdutoGrupoAddDialogComponent, {
|
|
1721
|
+
width: width,
|
|
1722
|
+
height: height,
|
|
1723
|
+
maxWidth: '100%',
|
|
1724
|
+
panelClass: 'dialog-p0',
|
|
1725
|
+
});
|
|
1726
|
+
dialog.afterClosed().subscribe(result => {
|
|
1727
|
+
if (result === undefined)
|
|
1728
|
+
return;
|
|
1729
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1730
|
+
this.atualiza();
|
|
1731
|
+
});
|
|
1513
1732
|
}
|
|
1514
|
-
|
|
1733
|
+
editar() {
|
|
1734
|
+
let height = (window.innerHeight * 0.90) + 'px';
|
|
1735
|
+
let width = 550 + 'px';
|
|
1736
|
+
if (this.mobile) {
|
|
1737
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
1738
|
+
//height = (window.innerHeight * 0.98) + 'px';
|
|
1739
|
+
}
|
|
1740
|
+
const dialog = this.dialog.open(ProdutoGrupoEditDialogComponent, {
|
|
1741
|
+
width: width,
|
|
1742
|
+
height: height,
|
|
1743
|
+
maxWidth: '100%',
|
|
1744
|
+
panelClass: 'dialog-p0',
|
|
1745
|
+
data: this.selectedItem
|
|
1746
|
+
});
|
|
1747
|
+
dialog.afterClosed().subscribe(result => {
|
|
1748
|
+
if (result === undefined)
|
|
1749
|
+
return;
|
|
1750
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1751
|
+
this.atualiza();
|
|
1752
|
+
});
|
|
1515
1753
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1754
|
+
}
|
|
1755
|
+
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 });
|
|
1756
|
+
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"] }] });
|
|
1757
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoSelecaoDialogComponent, decorators: [{
|
|
1758
|
+
type: Component,
|
|
1759
|
+
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"] }]
|
|
1760
|
+
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
1761
|
+
|
|
1762
|
+
class ProdutosNcmDialogComponent {
|
|
1763
|
+
constructor(dialogRef, dialog, ws, notification, screenHelper) {
|
|
1764
|
+
this.dialogRef = dialogRef;
|
|
1765
|
+
this.dialog = dialog;
|
|
1766
|
+
this.ws = ws;
|
|
1767
|
+
this.notification = notification;
|
|
1768
|
+
this.screenHelper = screenHelper;
|
|
1769
|
+
this.isBusy = false;
|
|
1770
|
+
this.frase = '';
|
|
1771
|
+
this.items = [];
|
|
1772
|
+
this.selectedItem = null;
|
|
1773
|
+
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
1774
|
+
this.nav = new NavegacaoSelecaoDialogUtil(this);
|
|
1775
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1522
1776
|
}
|
|
1523
|
-
|
|
1524
|
-
this.
|
|
1525
|
-
this.fim = this.paginaAtual == this.totalPaginas;
|
|
1777
|
+
ngOnInit() {
|
|
1778
|
+
this.atualiza();
|
|
1526
1779
|
}
|
|
1527
|
-
|
|
1528
|
-
this.
|
|
1780
|
+
atualiza() {
|
|
1781
|
+
this.isBusy = true;
|
|
1782
|
+
this.ws.buscaNcm(this.frase)
|
|
1783
|
+
.subscribe(r => {
|
|
1784
|
+
this.isBusy = false;
|
|
1785
|
+
this.items = r;
|
|
1786
|
+
console.info(r);
|
|
1787
|
+
}, err => {
|
|
1788
|
+
this.isBusy = false;
|
|
1789
|
+
this.notification.showHttpError(err);
|
|
1790
|
+
});
|
|
1529
1791
|
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1792
|
+
selectItem(i) {
|
|
1793
|
+
if (this.selectedItem === i) {
|
|
1794
|
+
this.dialogRef.close(i);
|
|
1795
|
+
}
|
|
1796
|
+
this.selectedItem = i;
|
|
1532
1797
|
}
|
|
1533
1798
|
}
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
1799
|
+
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 });
|
|
1800
|
+
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"] }] });
|
|
1801
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosNcmDialogComponent, decorators: [{
|
|
1537
1802
|
type: Component,
|
|
1538
|
-
args: [{ selector: 'ox-
|
|
1539
|
-
}], ctorParameters: function () { return [
|
|
1540
|
-
type: Output
|
|
1541
|
-
}], totalPaginasChange: [{
|
|
1542
|
-
type: Output
|
|
1543
|
-
}], change: [{
|
|
1544
|
-
type: Output
|
|
1545
|
-
}], pageSize: [{
|
|
1546
|
-
type: Input
|
|
1547
|
-
}], paginaAtual: [{
|
|
1548
|
-
type: Input
|
|
1549
|
-
}], totalPaginas: [{
|
|
1550
|
-
type: Input
|
|
1551
|
-
}] } });
|
|
1803
|
+
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"] }]
|
|
1804
|
+
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: ScreenHelperService }]; } });
|
|
1552
1805
|
|
|
1553
|
-
class
|
|
1554
|
-
constructor() {
|
|
1555
|
-
this.
|
|
1556
|
-
this.
|
|
1557
|
-
|
|
1558
|
-
this.
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
this.
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1806
|
+
class ProdutoSubgrupoAddDialogComponent {
|
|
1807
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1808
|
+
this.ws = ws;
|
|
1809
|
+
this.notification = notification;
|
|
1810
|
+
this.dataDialog = dataDialog;
|
|
1811
|
+
this.dialog = dialog;
|
|
1812
|
+
this.elRef = elRef;
|
|
1813
|
+
this.dialogRef = dialogRef;
|
|
1814
|
+
this.screenHelper = screenHelper;
|
|
1815
|
+
this.isBusy = false;
|
|
1816
|
+
this.focus = new FocusService();
|
|
1817
|
+
this.model = {
|
|
1818
|
+
id: 0,
|
|
1819
|
+
nome: '',
|
|
1820
|
+
isAtivo: true,
|
|
1821
|
+
enviadoPC: false
|
|
1822
|
+
};
|
|
1823
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1824
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1568
1825
|
}
|
|
1569
1826
|
ngOnInit() {
|
|
1827
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
1570
1828
|
}
|
|
1571
|
-
|
|
1572
|
-
this.
|
|
1573
|
-
|
|
1829
|
+
ngOnDestroy() {
|
|
1830
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1831
|
+
}
|
|
1832
|
+
salvar() {
|
|
1833
|
+
if (!this.model)
|
|
1834
|
+
return;
|
|
1835
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
1836
|
+
if (valMsg) {
|
|
1837
|
+
this.notification.showMsgError(valMsg);
|
|
1838
|
+
return;
|
|
1839
|
+
}
|
|
1840
|
+
this.isBusy = true;
|
|
1841
|
+
this.ws.addProdutoSubgrupo(this.model)
|
|
1842
|
+
.subscribe(r => {
|
|
1843
|
+
this.isBusy = false;
|
|
1844
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1845
|
+
if (this.dialogRef)
|
|
1846
|
+
this.dialogRef.close(true);
|
|
1847
|
+
}, err => {
|
|
1848
|
+
this.isBusy = false;
|
|
1849
|
+
this.notification.showMsg(err.error);
|
|
1850
|
+
});
|
|
1574
1851
|
}
|
|
1575
1852
|
}
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
1853
|
+
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 });
|
|
1854
|
+
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"] }] });
|
|
1855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoAddDialogComponent, decorators: [{
|
|
1579
1856
|
type: Component,
|
|
1580
|
-
args: [{ selector: 'ox-
|
|
1581
|
-
}], ctorParameters: function () {
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
}] } });
|
|
1857
|
+
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"] }]
|
|
1858
|
+
}], ctorParameters: function () {
|
|
1859
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1860
|
+
type: Inject,
|
|
1861
|
+
args: [MAT_DIALOG_DATA]
|
|
1862
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
1863
|
+
} });
|
|
1588
1864
|
|
|
1589
|
-
class
|
|
1590
|
-
constructor(
|
|
1591
|
-
this.
|
|
1865
|
+
class ProdutoSubgrupoEditDialogComponent {
|
|
1866
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1867
|
+
this.ws = ws;
|
|
1868
|
+
this.notification = notification;
|
|
1869
|
+
this.dataDialog = dataDialog;
|
|
1870
|
+
this.dialog = dialog;
|
|
1871
|
+
this.elRef = elRef;
|
|
1872
|
+
this.dialogRef = dialogRef;
|
|
1873
|
+
this.screenHelper = screenHelper;
|
|
1874
|
+
this.isBusy = false;
|
|
1875
|
+
this.focus = new FocusService();
|
|
1876
|
+
if (dataDialog) {
|
|
1877
|
+
this.model = dataDialog;
|
|
1878
|
+
}
|
|
1879
|
+
this.mobile = this.screenHelper.isMedium;
|
|
1880
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1592
1881
|
}
|
|
1593
|
-
|
|
1594
|
-
|
|
1882
|
+
ngOnInit() {
|
|
1883
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
1884
|
+
}
|
|
1885
|
+
ngOnDestroy() {
|
|
1886
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1887
|
+
}
|
|
1888
|
+
salvar() {
|
|
1889
|
+
if (!this.model)
|
|
1890
|
+
return;
|
|
1891
|
+
const valMsg = validaProdutoGrupo(this.model, this.focus);
|
|
1892
|
+
if (valMsg) {
|
|
1893
|
+
this.notification.showMsgError(valMsg);
|
|
1894
|
+
return;
|
|
1895
|
+
}
|
|
1896
|
+
this.isBusy = true;
|
|
1897
|
+
this.ws.saveProdutoSubgrupo(this.model)
|
|
1898
|
+
.subscribe(r => {
|
|
1899
|
+
this.isBusy = false;
|
|
1900
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
1901
|
+
if (this.dialogRef)
|
|
1902
|
+
this.dialogRef.close(true);
|
|
1903
|
+
}, err => {
|
|
1904
|
+
this.isBusy = false;
|
|
1905
|
+
this.notification.showMsg(err.error);
|
|
1906
|
+
});
|
|
1595
1907
|
}
|
|
1596
1908
|
}
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
1600
|
-
type:
|
|
1601
|
-
args: [{
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
ModalidadeBaseICMS[ModalidadeBaseICMS["MargemValorAgregado"] = 0] = "MargemValorAgregado";
|
|
1609
|
-
ModalidadeBaseICMS[ModalidadeBaseICMS["PautaValor"] = 1] = "PautaValor";
|
|
1610
|
-
ModalidadeBaseICMS[ModalidadeBaseICMS["Pre\u00E7oTabeladoMax"] = 2] = "Pre\u00E7oTabeladoMax";
|
|
1611
|
-
ModalidadeBaseICMS[ModalidadeBaseICMS["ValorDaOpera\u00E7\u00E3o"] = 3] = "ValorDaOpera\u00E7\u00E3o";
|
|
1612
|
-
})(ModalidadeBaseICMS || (ModalidadeBaseICMS = {}));
|
|
1613
|
-
function createProduct() {
|
|
1614
|
-
return {
|
|
1615
|
-
id: 0,
|
|
1616
|
-
nome: '',
|
|
1617
|
-
unidade: 'UN',
|
|
1618
|
-
precoCusto: 0,
|
|
1619
|
-
precoVenda: 0,
|
|
1620
|
-
precoFuncionario: 0,
|
|
1621
|
-
estoqueMinimo: 0,
|
|
1622
|
-
referencia: '',
|
|
1623
|
-
aliquotaICMS: null,
|
|
1624
|
-
ncm: null,
|
|
1625
|
-
grupoId: 0,
|
|
1626
|
-
grupoNome: null,
|
|
1627
|
-
subgrupoId: 0,
|
|
1628
|
-
subgrupoNome: null,
|
|
1629
|
-
quantidadeSuite: 0,
|
|
1630
|
-
estoqueControlado: true,
|
|
1631
|
-
imprimiCozinha: true,
|
|
1632
|
-
imprimeCorredor: false,
|
|
1633
|
-
verNaRecepcao: true,
|
|
1634
|
-
prato: false,
|
|
1635
|
-
isAtivo: true,
|
|
1636
|
-
isComposto: true,
|
|
1637
|
-
isIngrediente: true,
|
|
1638
|
-
omiteCliente: false,
|
|
1639
|
-
estoqueRecepcao: false,
|
|
1640
|
-
estoqueRecepcaoQuantidade: 0,
|
|
1641
|
-
gtin: null,
|
|
1642
|
-
cfop: null,
|
|
1643
|
-
csT_icms: null,
|
|
1644
|
-
modBC_icms: 0,
|
|
1645
|
-
pICMS_icms: null,
|
|
1646
|
-
pRedBC_icms: null,
|
|
1647
|
-
pfcP_icms: null,
|
|
1648
|
-
vbcfcP_icms: null,
|
|
1649
|
-
pfcpsT_icms: null,
|
|
1650
|
-
pRedBCEfet_icms: null,
|
|
1651
|
-
vbcEfet_icms: null,
|
|
1652
|
-
picmsEfet_icms: null,
|
|
1653
|
-
vicmsEfet_icms: null,
|
|
1654
|
-
csT_pis: null,
|
|
1655
|
-
vbC_pis: null,
|
|
1656
|
-
ppiS_pis: null,
|
|
1657
|
-
csT_cofins: null,
|
|
1658
|
-
vbC_cofins: null,
|
|
1659
|
-
pcofinS_cofins: null,
|
|
1660
|
-
psT_icms: null,
|
|
1661
|
-
vbcstRet_icms: null,
|
|
1662
|
-
vicmsSubstituto_icms: null,
|
|
1663
|
-
vicmsstRet_icms: null,
|
|
1664
|
-
emiteNFCe: false,
|
|
1665
|
-
cest: null,
|
|
1666
|
-
vbcfcpsT_icms: null,
|
|
1667
|
-
vbcfcpstRet_icms: null,
|
|
1668
|
-
pfcpstRet_icms: null,
|
|
1669
|
-
sitTrib: null,
|
|
1670
|
-
setorSubEstoqueId: null,
|
|
1671
|
-
setorSubEstoqueNome: null,
|
|
1672
|
-
setorPrincipalId: null,
|
|
1673
|
-
setorPrincipalNome: null,
|
|
1674
|
-
qtdMinSubEstoque: null,
|
|
1675
|
-
disponivelCardapio: false,
|
|
1676
|
-
categoriaCardapioId: null,
|
|
1677
|
-
categoriaCardapioNome: null,
|
|
1678
|
-
descricao: null,
|
|
1679
|
-
enviadoPC: false,
|
|
1680
|
-
qbcProd_cofins: null,
|
|
1681
|
-
vAliqProd_cofins: null
|
|
1682
|
-
};
|
|
1683
|
-
}
|
|
1684
|
-
;
|
|
1685
|
-
function valida$1(item, focus) {
|
|
1686
|
-
if (valTextEmpty(item.nome)) {
|
|
1687
|
-
focus.set('nome');
|
|
1688
|
-
return 'Digite um nome válido.';
|
|
1689
|
-
}
|
|
1690
|
-
if (valNumberEmpty(item.grupoId)) {
|
|
1691
|
-
return 'Escolha um grupo de produto.';
|
|
1692
|
-
}
|
|
1693
|
-
if (valNumberEmpty(item.subgrupoId)) {
|
|
1694
|
-
return 'Escolha um subgrupo de produto.';
|
|
1695
|
-
}
|
|
1696
|
-
if (valTextEmpty(item.unidade)) {
|
|
1697
|
-
focus.set('unidade');
|
|
1698
|
-
return 'Digite uma unidade.';
|
|
1699
|
-
}
|
|
1700
|
-
if (item.disponivelCardapio) {
|
|
1701
|
-
if (valNumberEmpty(item.categoriaCardapioId))
|
|
1702
|
-
return 'Escolha uma categoria do cardápio digital.';
|
|
1703
|
-
if (valTextEmpty(item.descricao)) {
|
|
1704
|
-
focus.set('descricao');
|
|
1705
|
-
return 'Digite uma descrição para o cardápio digital.';
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
return null;
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
class ProdutoSearchSetting extends SearchSetting {
|
|
1712
|
-
constructor() {
|
|
1713
|
-
super();
|
|
1714
|
-
this.exibeNaoControladoEstoque = true;
|
|
1715
|
-
this.exibeApenasMostraRecepcao = false;
|
|
1716
|
-
this.exibeInativo = false;
|
|
1717
|
-
this.exibeImprimiCozinha = false;
|
|
1718
|
-
this.exibeHePrato = false;
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
class NumberParser {
|
|
1723
|
-
constructor(setPropFunc, getPropFunc, min, max, triggerMilliseconds = 1500) {
|
|
1724
|
-
this.setPropFunc = setPropFunc;
|
|
1725
|
-
this.getPropFunc = getPropFunc;
|
|
1726
|
-
this.min = min;
|
|
1727
|
-
this.max = max;
|
|
1728
|
-
this.parsed = false;
|
|
1729
|
-
this._parseTrigger = new LazyTrigger(() => this.parseValor(), triggerMilliseconds);
|
|
1730
|
-
}
|
|
1731
|
-
parse(vlr) {
|
|
1732
|
-
this.valor = vlr;
|
|
1733
|
-
this.parsed = false;
|
|
1734
|
-
this._parseTrigger.fire();
|
|
1735
|
-
}
|
|
1736
|
-
store(vlr) {
|
|
1737
|
-
this.valor = vlr;
|
|
1738
|
-
this.parsed = false;
|
|
1739
|
-
}
|
|
1740
|
-
checkout() {
|
|
1741
|
-
if (this.parsed || !this.valor)
|
|
1742
|
-
return;
|
|
1743
|
-
this.parseValor();
|
|
1744
|
-
}
|
|
1745
|
-
parseValor() {
|
|
1746
|
-
if (this.valor === undefined)
|
|
1747
|
-
return;
|
|
1748
|
-
this.parsed = true;
|
|
1749
|
-
const vlrTxt = this.valor.split(",").join(".");
|
|
1750
|
-
;
|
|
1751
|
-
const spTxt = vlrTxt.split(".");
|
|
1752
|
-
let toParseTxt = "";
|
|
1753
|
-
if (spTxt.length > 2) {
|
|
1754
|
-
const chars = vlrTxt.split("");
|
|
1755
|
-
const lastIndex = vlrTxt.lastIndexOf(".");
|
|
1756
|
-
for (let i = 0; i < chars.length; i++) {
|
|
1757
|
-
const c = chars[i];
|
|
1758
|
-
if (c === "." && i != lastIndex)
|
|
1759
|
-
continue;
|
|
1760
|
-
toParseTxt = toParseTxt.concat(c);
|
|
1761
|
-
}
|
|
1762
|
-
}
|
|
1763
|
-
else {
|
|
1764
|
-
toParseTxt = vlrTxt;
|
|
1765
|
-
}
|
|
1766
|
-
const vlr = parseFloat(toParseTxt);
|
|
1767
|
-
if (isNaN(vlr) || !this.validaMinMax(vlr)) {
|
|
1768
|
-
const original = this.getPropFunc();
|
|
1769
|
-
this.setPropFunc(0);
|
|
1770
|
-
setTimeout(() => this.setPropFunc(original));
|
|
1771
|
-
}
|
|
1772
|
-
else {
|
|
1773
|
-
this.setPropFunc(vlr);
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
validaMinMax(value) {
|
|
1777
|
-
if ((this.min === undefined) && this.max === undefined)
|
|
1778
|
-
return true;
|
|
1779
|
-
if (!(this.min === undefined) && value < this.min)
|
|
1780
|
-
return false;
|
|
1781
|
-
if (!(this.max === undefined) && value > this.max)
|
|
1782
|
-
return false;
|
|
1783
|
-
return true;
|
|
1784
|
-
}
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
function valida(item, focus) {
|
|
1788
|
-
if (valTextEmpty(item.nome)) {
|
|
1789
|
-
focus.set('nome');
|
|
1790
|
-
return 'Digite um nome válido.';
|
|
1791
|
-
}
|
|
1792
|
-
return null;
|
|
1793
|
-
}
|
|
1794
|
-
|
|
1795
|
-
class ProdutoGrupoFormComponent {
|
|
1796
|
-
constructor() { }
|
|
1797
|
-
ngOnInit() {
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
ProdutoGrupoFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1801
|
-
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"] }] });
|
|
1802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoFormComponent, decorators: [{
|
|
1803
|
-
type: Component,
|
|
1804
|
-
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"] }]
|
|
1805
|
-
}], ctorParameters: function () { return []; }, propDecorators: { model: [{
|
|
1806
|
-
type: Input
|
|
1807
|
-
}] } });
|
|
1808
|
-
|
|
1809
|
-
class ProdutoCategoriaCardapioAddDialogComponent {
|
|
1810
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1811
|
-
this.ws = ws;
|
|
1812
|
-
this.notification = notification;
|
|
1813
|
-
this.dataDialog = dataDialog;
|
|
1814
|
-
this.dialog = dialog;
|
|
1815
|
-
this.elRef = elRef;
|
|
1816
|
-
this.dialogRef = dialogRef;
|
|
1817
|
-
this.screenHelper = screenHelper;
|
|
1818
|
-
this.isBusy = false;
|
|
1819
|
-
this.focus = new FocusService();
|
|
1820
|
-
this.model = {
|
|
1821
|
-
id: 0,
|
|
1822
|
-
nome: '',
|
|
1823
|
-
isAtivo: true,
|
|
1824
|
-
enviadoPC: false
|
|
1825
|
-
};
|
|
1826
|
-
this.mobile = this.screenHelper.isMedium;
|
|
1827
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1828
|
-
}
|
|
1829
|
-
ngOnInit() {
|
|
1830
|
-
this.focus.registerElement(this.elRef.nativeElement);
|
|
1831
|
-
}
|
|
1832
|
-
ngOnDestroy() {
|
|
1833
|
-
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1834
|
-
}
|
|
1835
|
-
salvar() {
|
|
1836
|
-
const valMsg = valida(this.model, this.focus);
|
|
1837
|
-
if (valMsg) {
|
|
1838
|
-
this.notification.showMsgError(valMsg);
|
|
1839
|
-
return;
|
|
1840
|
-
}
|
|
1841
|
-
this.isBusy = true;
|
|
1842
|
-
this.ws.addProdutoCategoriaCardapio(this.model)
|
|
1843
|
-
.subscribe(r => {
|
|
1844
|
-
this.isBusy = false;
|
|
1845
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
1846
|
-
if (this.dialogRef)
|
|
1847
|
-
this.dialogRef.close(true);
|
|
1848
|
-
}, err => {
|
|
1849
|
-
this.isBusy = false;
|
|
1850
|
-
this.notification.showMsg(err.error);
|
|
1851
|
-
});
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
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 });
|
|
1855
|
-
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"] }] });
|
|
1856
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioAddDialogComponent, decorators: [{
|
|
1857
|
-
type: Component,
|
|
1858
|
-
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"] }]
|
|
1859
|
-
}], ctorParameters: function () {
|
|
1860
|
-
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1861
|
-
type: Inject,
|
|
1862
|
-
args: [MAT_DIALOG_DATA]
|
|
1863
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
1864
|
-
} });
|
|
1865
|
-
|
|
1866
|
-
class ProdutoCategoriaCardapioEditDialogComponent {
|
|
1867
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
1868
|
-
this.ws = ws;
|
|
1869
|
-
this.notification = notification;
|
|
1870
|
-
this.dataDialog = dataDialog;
|
|
1871
|
-
this.dialog = dialog;
|
|
1872
|
-
this.elRef = elRef;
|
|
1873
|
-
this.dialogRef = dialogRef;
|
|
1874
|
-
this.screenHelper = screenHelper;
|
|
1875
|
-
this.isBusy = false;
|
|
1876
|
-
this.focus = new FocusService();
|
|
1877
|
-
if (dataDialog) {
|
|
1878
|
-
this.model = dataDialog;
|
|
1879
|
-
}
|
|
1880
|
-
this.mobile = this.screenHelper.isMedium;
|
|
1881
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
1882
|
-
}
|
|
1883
|
-
ngOnInit() {
|
|
1884
|
-
this.focus.registerElement(this.elRef.nativeElement);
|
|
1885
|
-
}
|
|
1886
|
-
ngOnDestroy() {
|
|
1887
|
-
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
1888
|
-
}
|
|
1889
|
-
salvar() {
|
|
1890
|
-
if (!this.model)
|
|
1891
|
-
return;
|
|
1892
|
-
const valMsg = valida(this.model, this.focus);
|
|
1893
|
-
if (valMsg) {
|
|
1894
|
-
this.notification.showMsgError(valMsg);
|
|
1895
|
-
return;
|
|
1896
|
-
}
|
|
1897
|
-
this.isBusy = true;
|
|
1898
|
-
this.ws.saveProdutoCategoriaCardapio(this.model)
|
|
1899
|
-
.subscribe(r => {
|
|
1900
|
-
this.isBusy = false;
|
|
1901
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
1902
|
-
if (this.dialogRef)
|
|
1903
|
-
this.dialogRef.close(true);
|
|
1904
|
-
}, err => {
|
|
1905
|
-
this.isBusy = false;
|
|
1906
|
-
this.notification.showMsg(err.error);
|
|
1907
|
-
});
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
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 });
|
|
1911
|
-
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"] }] });
|
|
1912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioEditDialogComponent, decorators: [{
|
|
1913
|
-
type: Component,
|
|
1914
|
-
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"] }]
|
|
1915
|
-
}], ctorParameters: function () {
|
|
1916
|
-
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1917
|
-
type: Inject,
|
|
1918
|
-
args: [MAT_DIALOG_DATA]
|
|
1919
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
1920
|
-
} });
|
|
1921
|
-
|
|
1922
|
-
class ProdutoCategoriaCardapioSelecaoDialogComponent {
|
|
1923
|
-
constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
|
|
1924
|
-
this.dialogRef = dialogRef;
|
|
1925
|
-
this.dialog = dialog;
|
|
1926
|
-
this.ws = ws;
|
|
1927
|
-
this.notification = notification;
|
|
1928
|
-
this.screenHelper = screenHelper;
|
|
1929
|
-
this.items = [];
|
|
1930
|
-
this.selectedItem = null;
|
|
1931
|
-
this.isBusy = false;
|
|
1932
|
-
this.setting = new SearchSetting();
|
|
1933
|
-
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
1934
|
-
this.nav = new NavegacaoSelecaoDialogUtil(this);
|
|
1935
|
-
this.mobile = this.screenHelper.isMedium;
|
|
1936
|
-
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
1937
|
-
this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
|
|
1938
|
-
}
|
|
1939
|
-
ngOnInit() {
|
|
1940
|
-
this.setting.ordem = "nome";
|
|
1941
|
-
this.atualiza();
|
|
1942
|
-
}
|
|
1943
|
-
atualiza() {
|
|
1944
|
-
this.isBusy = true;
|
|
1945
|
-
this.ws.buscaProdutoCategoriaCardapio(this.setting)
|
|
1946
|
-
.subscribe(r => {
|
|
1947
|
-
this.isBusy = false;
|
|
1948
|
-
this.items = r;
|
|
1949
|
-
console.info(r);
|
|
1950
|
-
}, err => {
|
|
1951
|
-
this.isBusy = false;
|
|
1952
|
-
this.notification.showHttpError(err);
|
|
1953
|
-
});
|
|
1954
|
-
}
|
|
1955
|
-
selectItem(i) {
|
|
1956
|
-
if (this.selectedItem === i) {
|
|
1957
|
-
this.dialogRef.close(i);
|
|
1958
|
-
}
|
|
1959
|
-
this.selectedItem = i;
|
|
1960
|
-
}
|
|
1961
|
-
novo() {
|
|
1962
|
-
let height = (window.innerHeight * 0.90) + 'px';
|
|
1963
|
-
let width = 550 + 'px';
|
|
1964
|
-
if (this.mobile) {
|
|
1965
|
-
width = (window.innerWidth * 0.99) + 'px';
|
|
1966
|
-
//height = (window.innerHeight * 0.98) + 'px';
|
|
1967
|
-
}
|
|
1968
|
-
const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
|
|
1969
|
-
width: width,
|
|
1970
|
-
height: height,
|
|
1971
|
-
maxWidth: '100%',
|
|
1972
|
-
panelClass: 'dialog-p0',
|
|
1973
|
-
});
|
|
1974
|
-
dialog.afterClosed().subscribe(result => {
|
|
1975
|
-
if (result === undefined)
|
|
1976
|
-
return;
|
|
1977
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
1978
|
-
this.atualiza();
|
|
1979
|
-
});
|
|
1980
|
-
}
|
|
1981
|
-
editar() {
|
|
1982
|
-
let height = (window.innerHeight * 0.90) + 'px';
|
|
1983
|
-
let width = 550 + 'px';
|
|
1984
|
-
if (this.mobile) {
|
|
1985
|
-
width = (window.innerWidth * 0.99) + 'px';
|
|
1986
|
-
//height = (window.innerHeight * 0.98) + 'px';
|
|
1987
|
-
}
|
|
1988
|
-
const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
|
|
1989
|
-
width: width,
|
|
1990
|
-
height: height,
|
|
1991
|
-
maxWidth: '100%',
|
|
1992
|
-
panelClass: 'dialog-p0',
|
|
1993
|
-
data: this.selectedItem
|
|
1994
|
-
});
|
|
1995
|
-
dialog.afterClosed().subscribe(result => {
|
|
1996
|
-
if (result === undefined)
|
|
1997
|
-
return;
|
|
1998
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
1999
|
-
this.atualiza();
|
|
2000
|
-
});
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
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 });
|
|
2004
|
-
ProdutoCategoriaCardapioSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoCategoriaCardapioSelecaoDialogComponent, selector: "app-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"] }] });
|
|
2005
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoCategoriaCardapioSelecaoDialogComponent, decorators: [{
|
|
2006
|
-
type: Component,
|
|
2007
|
-
args: [{ selector: 'app-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"] }]
|
|
2008
|
-
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
2009
|
-
|
|
2010
|
-
class ProdutoGrupoAddDialogComponent {
|
|
2011
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2012
|
-
this.ws = ws;
|
|
2013
|
-
this.notification = notification;
|
|
2014
|
-
this.dataDialog = dataDialog;
|
|
2015
|
-
this.dialog = dialog;
|
|
2016
|
-
this.elRef = elRef;
|
|
2017
|
-
this.dialogRef = dialogRef;
|
|
2018
|
-
this.screenHelper = screenHelper;
|
|
2019
|
-
this.isBusy = false;
|
|
2020
|
-
this.focus = new FocusService();
|
|
2021
|
-
this.model = {
|
|
2022
|
-
id: 0,
|
|
2023
|
-
nome: '',
|
|
2024
|
-
isAtivo: true,
|
|
2025
|
-
enviadoPC: false
|
|
2026
|
-
};
|
|
2027
|
-
this.mobile = this.screenHelper.isMedium;
|
|
2028
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2029
|
-
}
|
|
2030
|
-
ngOnInit() {
|
|
2031
|
-
this.focus.registerElement(this.elRef.nativeElement);
|
|
2032
|
-
}
|
|
2033
|
-
ngOnDestroy() {
|
|
2034
|
-
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
2035
|
-
}
|
|
2036
|
-
salvar() {
|
|
2037
|
-
const valMsg = valida(this.model, this.focus);
|
|
2038
|
-
if (valMsg) {
|
|
2039
|
-
this.notification.showMsgError(valMsg);
|
|
2040
|
-
return;
|
|
2041
|
-
}
|
|
2042
|
-
this.isBusy = true;
|
|
2043
|
-
this.ws.addProdutoGrupo(this.model)
|
|
2044
|
-
.subscribe(r => {
|
|
2045
|
-
this.isBusy = false;
|
|
2046
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
2047
|
-
if (this.dialogRef)
|
|
2048
|
-
this.dialogRef.close(true);
|
|
2049
|
-
}, err => {
|
|
2050
|
-
this.isBusy = false;
|
|
2051
|
-
this.notification.showMsg(err.error);
|
|
2052
|
-
});
|
|
2053
|
-
}
|
|
2054
|
-
}
|
|
2055
|
-
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 });
|
|
2056
|
-
ProdutoGrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoAddDialogComponent, selector: "app-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 <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"] }] });
|
|
2057
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoAddDialogComponent, decorators: [{
|
|
2058
|
-
type: Component,
|
|
2059
|
-
args: [{ selector: 'app-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 <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"] }]
|
|
2060
|
-
}], ctorParameters: function () {
|
|
2061
|
-
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2062
|
-
type: Inject,
|
|
2063
|
-
args: [MAT_DIALOG_DATA]
|
|
2064
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
2065
|
-
} });
|
|
2066
|
-
|
|
2067
|
-
class ProdutoGrupoEditDialogComponent {
|
|
2068
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2069
|
-
this.ws = ws;
|
|
2070
|
-
this.notification = notification;
|
|
2071
|
-
this.dataDialog = dataDialog;
|
|
2072
|
-
this.dialog = dialog;
|
|
2073
|
-
this.elRef = elRef;
|
|
2074
|
-
this.dialogRef = dialogRef;
|
|
2075
|
-
this.screenHelper = screenHelper;
|
|
2076
|
-
this.isBusy = false;
|
|
2077
|
-
this.focus = new FocusService();
|
|
2078
|
-
if (dataDialog) {
|
|
2079
|
-
this.model = dataDialog;
|
|
2080
|
-
}
|
|
2081
|
-
this.mobile = this.screenHelper.isMedium;
|
|
2082
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2083
|
-
}
|
|
2084
|
-
ngOnInit() {
|
|
2085
|
-
this.focus.registerElement(this.elRef.nativeElement);
|
|
2086
|
-
}
|
|
2087
|
-
ngOnDestroy() {
|
|
2088
|
-
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
2089
|
-
}
|
|
2090
|
-
salvar() {
|
|
2091
|
-
if (!this.model)
|
|
2092
|
-
return;
|
|
2093
|
-
const valMsg = valida(this.model, this.focus);
|
|
2094
|
-
if (valMsg) {
|
|
2095
|
-
this.notification.showMsgError(valMsg);
|
|
2096
|
-
return;
|
|
2097
|
-
}
|
|
2098
|
-
this.isBusy = true;
|
|
2099
|
-
this.ws.saveProdutoGrupo(this.model)
|
|
2100
|
-
.subscribe(r => {
|
|
2101
|
-
this.isBusy = false;
|
|
2102
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
2103
|
-
if (this.dialogRef)
|
|
2104
|
-
this.dialogRef.close(true);
|
|
2105
|
-
}, err => {
|
|
2106
|
-
this.isBusy = false;
|
|
2107
|
-
this.notification.showMsg(err.error);
|
|
2108
|
-
});
|
|
2109
|
-
}
|
|
2110
|
-
}
|
|
2111
|
-
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 });
|
|
2112
|
-
ProdutoGrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoEditDialogComponent, selector: "app-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 <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"] }] });
|
|
2113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoEditDialogComponent, decorators: [{
|
|
2114
|
-
type: Component,
|
|
2115
|
-
args: [{ selector: 'app-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 <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"] }]
|
|
2116
|
-
}], ctorParameters: function () {
|
|
2117
|
-
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2118
|
-
type: Inject,
|
|
2119
|
-
args: [MAT_DIALOG_DATA]
|
|
2120
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
2121
|
-
} });
|
|
2122
|
-
|
|
2123
|
-
class ProdutoGrupoSelecaoDialogComponent {
|
|
2124
|
-
constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
|
|
2125
|
-
this.dialogRef = dialogRef;
|
|
2126
|
-
this.dialog = dialog;
|
|
2127
|
-
this.ws = ws;
|
|
2128
|
-
this.notification = notification;
|
|
2129
|
-
this.screenHelper = screenHelper;
|
|
2130
|
-
this.items = [];
|
|
2131
|
-
this.selectedItem = null;
|
|
2132
|
-
this.isBusy = false;
|
|
2133
|
-
this.setting = new SearchSetting();
|
|
2134
|
-
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
2135
|
-
this.nav = new NavegacaoSelecaoDialogUtil(this);
|
|
2136
|
-
this.mobile = this.screenHelper.isMedium;
|
|
2137
|
-
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
2138
|
-
this.allowEdit = auth.permissoes.adminProdutoGrupoPesquisa;
|
|
2139
|
-
}
|
|
2140
|
-
ngOnInit() {
|
|
2141
|
-
this.setting.ordem = "nome";
|
|
2142
|
-
this.atualiza();
|
|
2143
|
-
}
|
|
2144
|
-
atualiza() {
|
|
2145
|
-
this.isBusy = true;
|
|
2146
|
-
this.ws.buscaProdutoGrupo(this.setting)
|
|
2147
|
-
.subscribe(r => {
|
|
2148
|
-
this.isBusy = false;
|
|
2149
|
-
this.items = r;
|
|
2150
|
-
console.info(r);
|
|
2151
|
-
}, err => {
|
|
2152
|
-
this.isBusy = false;
|
|
2153
|
-
this.notification.showHttpError(err);
|
|
2154
|
-
});
|
|
2155
|
-
}
|
|
2156
|
-
selectItem(i) {
|
|
2157
|
-
if (this.selectedItem === i) {
|
|
2158
|
-
this.dialogRef.close(i);
|
|
2159
|
-
}
|
|
2160
|
-
this.selectedItem = i;
|
|
2161
|
-
}
|
|
2162
|
-
novo() {
|
|
2163
|
-
let height = (window.innerHeight * 0.90) + 'px';
|
|
2164
|
-
let width = 550 + 'px';
|
|
2165
|
-
if (this.mobile) {
|
|
2166
|
-
width = (window.innerWidth * 0.99) + 'px';
|
|
2167
|
-
//height = (window.innerHeight * 0.98) + 'px';
|
|
2168
|
-
}
|
|
2169
|
-
const dialog = this.dialog.open(ProdutoGrupoAddDialogComponent, {
|
|
2170
|
-
width: width,
|
|
2171
|
-
height: height,
|
|
2172
|
-
maxWidth: '100%',
|
|
2173
|
-
panelClass: 'dialog-p0',
|
|
2174
|
-
});
|
|
2175
|
-
dialog.afterClosed().subscribe(result => {
|
|
2176
|
-
if (result === undefined)
|
|
2177
|
-
return;
|
|
2178
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
2179
|
-
this.atualiza();
|
|
2180
|
-
});
|
|
2181
|
-
}
|
|
2182
|
-
editar() {
|
|
2183
|
-
let height = (window.innerHeight * 0.90) + 'px';
|
|
2184
|
-
let width = 550 + 'px';
|
|
2185
|
-
if (this.mobile) {
|
|
2186
|
-
width = (window.innerWidth * 0.99) + 'px';
|
|
2187
|
-
//height = (window.innerHeight * 0.98) + 'px';
|
|
2188
|
-
}
|
|
2189
|
-
const dialog = this.dialog.open(ProdutoGrupoEditDialogComponent, {
|
|
2190
|
-
width: width,
|
|
2191
|
-
height: height,
|
|
2192
|
-
maxWidth: '100%',
|
|
2193
|
-
panelClass: 'dialog-p0',
|
|
2194
|
-
data: this.selectedItem
|
|
2195
|
-
});
|
|
2196
|
-
dialog.afterClosed().subscribe(result => {
|
|
2197
|
-
if (result === undefined)
|
|
2198
|
-
return;
|
|
2199
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
2200
|
-
this.atualiza();
|
|
2201
|
-
});
|
|
2202
|
-
}
|
|
2203
|
-
}
|
|
2204
|
-
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 });
|
|
2205
|
-
ProdutoGrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoGrupoSelecaoDialogComponent, selector: "app-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"] }] });
|
|
2206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoGrupoSelecaoDialogComponent, decorators: [{
|
|
2207
|
-
type: Component,
|
|
2208
|
-
args: [{ selector: 'app-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"] }]
|
|
2209
|
-
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
2210
|
-
|
|
2211
|
-
class ProdutosNcmDialogComponent {
|
|
2212
|
-
constructor(dialogRef, dialog, ws, notification, screenHelper) {
|
|
2213
|
-
this.dialogRef = dialogRef;
|
|
2214
|
-
this.dialog = dialog;
|
|
2215
|
-
this.ws = ws;
|
|
2216
|
-
this.notification = notification;
|
|
2217
|
-
this.screenHelper = screenHelper;
|
|
2218
|
-
this.isBusy = false;
|
|
2219
|
-
this.frase = '';
|
|
2220
|
-
this.items = [];
|
|
2221
|
-
this.selectedItem = null;
|
|
2222
|
-
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
2223
|
-
this.nav = new NavegacaoSelecaoDialogUtil(this);
|
|
2224
|
-
this.mobile = this.screenHelper.isMedium;
|
|
2225
|
-
}
|
|
2226
|
-
ngOnInit() {
|
|
2227
|
-
this.atualiza();
|
|
2228
|
-
}
|
|
2229
|
-
atualiza() {
|
|
2230
|
-
this.isBusy = true;
|
|
2231
|
-
this.ws.buscaNcm(this.frase)
|
|
2232
|
-
.subscribe(r => {
|
|
2233
|
-
this.isBusy = false;
|
|
2234
|
-
this.items = r;
|
|
2235
|
-
console.info(r);
|
|
2236
|
-
}, err => {
|
|
2237
|
-
this.isBusy = false;
|
|
2238
|
-
this.notification.showHttpError(err);
|
|
2239
|
-
});
|
|
2240
|
-
}
|
|
2241
|
-
selectItem(i) {
|
|
2242
|
-
if (this.selectedItem === i) {
|
|
2243
|
-
this.dialogRef.close(i);
|
|
2244
|
-
}
|
|
2245
|
-
this.selectedItem = i;
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
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 });
|
|
2249
|
-
ProdutosNcmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosNcmDialogComponent, selector: "app-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"] }] });
|
|
2250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosNcmDialogComponent, decorators: [{
|
|
2251
|
-
type: Component,
|
|
2252
|
-
args: [{ selector: 'app-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"] }]
|
|
2253
|
-
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: ScreenHelperService }]; } });
|
|
2254
|
-
|
|
2255
|
-
class ProdutoSubgrupoAddDialogComponent {
|
|
2256
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2257
|
-
this.ws = ws;
|
|
2258
|
-
this.notification = notification;
|
|
2259
|
-
this.dataDialog = dataDialog;
|
|
2260
|
-
this.dialog = dialog;
|
|
2261
|
-
this.elRef = elRef;
|
|
2262
|
-
this.dialogRef = dialogRef;
|
|
2263
|
-
this.screenHelper = screenHelper;
|
|
2264
|
-
this.isBusy = false;
|
|
2265
|
-
this.focus = new FocusService();
|
|
2266
|
-
this.model = {
|
|
2267
|
-
id: 0,
|
|
2268
|
-
nome: '',
|
|
2269
|
-
isAtivo: true,
|
|
2270
|
-
enviadoPC: false
|
|
2271
|
-
};
|
|
2272
|
-
this.mobile = this.screenHelper.isMedium;
|
|
2273
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2274
|
-
}
|
|
2275
|
-
ngOnInit() {
|
|
2276
|
-
this.focus.registerElement(this.elRef.nativeElement);
|
|
2277
|
-
}
|
|
2278
|
-
ngOnDestroy() {
|
|
2279
|
-
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
2280
|
-
}
|
|
2281
|
-
salvar() {
|
|
2282
|
-
if (!this.model)
|
|
2283
|
-
return;
|
|
2284
|
-
const valMsg = valida(this.model, this.focus);
|
|
2285
|
-
if (valMsg) {
|
|
2286
|
-
this.notification.showMsgError(valMsg);
|
|
2287
|
-
return;
|
|
2288
|
-
}
|
|
2289
|
-
this.isBusy = true;
|
|
2290
|
-
this.ws.addProdutoSubgrupo(this.model)
|
|
2291
|
-
.subscribe(r => {
|
|
2292
|
-
this.isBusy = false;
|
|
2293
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
2294
|
-
if (this.dialogRef)
|
|
2295
|
-
this.dialogRef.close(true);
|
|
2296
|
-
}, err => {
|
|
2297
|
-
this.isBusy = false;
|
|
2298
|
-
this.notification.showMsg(err.error);
|
|
2299
|
-
});
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2302
|
-
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 });
|
|
2303
|
-
ProdutoSubgrupoAddDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoAddDialogComponent, selector: "app-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 <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"] }] });
|
|
2304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoAddDialogComponent, decorators: [{
|
|
2305
|
-
type: Component,
|
|
2306
|
-
args: [{ selector: 'app-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 <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"] }]
|
|
2307
|
-
}], ctorParameters: function () {
|
|
2308
|
-
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2309
|
-
type: Inject,
|
|
2310
|
-
args: [MAT_DIALOG_DATA]
|
|
2311
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
2312
|
-
} });
|
|
2313
|
-
|
|
2314
|
-
class ProdutoSubgrupoEditDialogComponent {
|
|
2315
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2316
|
-
this.ws = ws;
|
|
2317
|
-
this.notification = notification;
|
|
2318
|
-
this.dataDialog = dataDialog;
|
|
2319
|
-
this.dialog = dialog;
|
|
2320
|
-
this.elRef = elRef;
|
|
2321
|
-
this.dialogRef = dialogRef;
|
|
2322
|
-
this.screenHelper = screenHelper;
|
|
2323
|
-
this.isBusy = false;
|
|
2324
|
-
this.focus = new FocusService();
|
|
2325
|
-
if (dataDialog) {
|
|
2326
|
-
this.model = dataDialog;
|
|
2327
|
-
}
|
|
2328
|
-
this.mobile = this.screenHelper.isMedium;
|
|
2329
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2330
|
-
}
|
|
2331
|
-
ngOnInit() {
|
|
2332
|
-
this.focus.registerElement(this.elRef.nativeElement);
|
|
2333
|
-
}
|
|
2334
|
-
ngOnDestroy() {
|
|
2335
|
-
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
2336
|
-
}
|
|
2337
|
-
salvar() {
|
|
2338
|
-
if (!this.model)
|
|
2339
|
-
return;
|
|
2340
|
-
const valMsg = valida(this.model, this.focus);
|
|
2341
|
-
if (valMsg) {
|
|
2342
|
-
this.notification.showMsgError(valMsg);
|
|
2343
|
-
return;
|
|
2344
|
-
}
|
|
2345
|
-
this.isBusy = true;
|
|
2346
|
-
this.ws.saveProdutoSubgrupo(this.model)
|
|
2347
|
-
.subscribe(r => {
|
|
2348
|
-
this.isBusy = false;
|
|
2349
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
2350
|
-
if (this.dialogRef)
|
|
2351
|
-
this.dialogRef.close(true);
|
|
2352
|
-
}, err => {
|
|
2353
|
-
this.isBusy = false;
|
|
2354
|
-
this.notification.showMsg(err.error);
|
|
2355
|
-
});
|
|
2356
|
-
}
|
|
2357
|
-
}
|
|
2358
|
-
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 });
|
|
2359
|
-
ProdutoSubgrupoEditDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoEditDialogComponent, selector: "app-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 <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"] }] });
|
|
2360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoEditDialogComponent, decorators: [{
|
|
2361
|
-
type: Component,
|
|
2362
|
-
args: [{ selector: 'app-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 <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"] }]
|
|
2363
|
-
}], ctorParameters: function () {
|
|
2364
|
-
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2365
|
-
type: Inject,
|
|
2366
|
-
args: [MAT_DIALOG_DATA]
|
|
2367
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
2368
|
-
} });
|
|
1909
|
+
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 });
|
|
1910
|
+
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"] }] });
|
|
1911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoEditDialogComponent, decorators: [{
|
|
1912
|
+
type: Component,
|
|
1913
|
+
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"] }]
|
|
1914
|
+
}], ctorParameters: function () {
|
|
1915
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
1916
|
+
type: Inject,
|
|
1917
|
+
args: [MAT_DIALOG_DATA]
|
|
1918
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
1919
|
+
} });
|
|
2369
1920
|
|
|
2370
1921
|
class ProdutoSubgrupoSelecaoDialogComponent {
|
|
2371
1922
|
constructor(dialogRef, dialog, ws, notification, auth, screenHelper) {
|
|
@@ -2448,12 +1999,81 @@ class ProdutoSubgrupoSelecaoDialogComponent {
|
|
|
2448
1999
|
});
|
|
2449
2000
|
}
|
|
2450
2001
|
}
|
|
2451
|
-
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 });
|
|
2452
|
-
ProdutoSubgrupoSelecaoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutoSubgrupoSelecaoDialogComponent, selector: "
|
|
2453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, decorators: [{
|
|
2002
|
+
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 });
|
|
2003
|
+
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"] }] });
|
|
2004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoSubgrupoSelecaoDialogComponent, decorators: [{
|
|
2005
|
+
type: Component,
|
|
2006
|
+
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"] }]
|
|
2007
|
+
}], ctorParameters: function () { return [{ type: i3.MatDialogRef }, { type: i3.MatDialog }, { type: CommonWebService }, { type: NotificationService }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
2008
|
+
|
|
2009
|
+
class CheckButtonComponent {
|
|
2010
|
+
constructor() {
|
|
2011
|
+
this.checked = false;
|
|
2012
|
+
this.radioBehavior = false;
|
|
2013
|
+
this.changed = new EventEmitter();
|
|
2014
|
+
this.checked = true;
|
|
2015
|
+
}
|
|
2016
|
+
ngOnInit() {
|
|
2017
|
+
}
|
|
2018
|
+
onClick(e) {
|
|
2019
|
+
if (!this.radioBehavior)
|
|
2020
|
+
this.checked = !this.checked;
|
|
2021
|
+
this.changed.emit(this.checked);
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
CheckButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: CheckButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2025
|
+
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"] });
|
|
2026
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: CheckButtonComponent, decorators: [{
|
|
2027
|
+
type: Component,
|
|
2028
|
+
args: [{ selector: 'ox-check-button', host: {
|
|
2029
|
+
'[class.checked]': "checked",
|
|
2030
|
+
}, 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"] }]
|
|
2031
|
+
}], ctorParameters: function () { return []; }, propDecorators: { checked: [{
|
|
2032
|
+
type: Input
|
|
2033
|
+
}], radioBehavior: [{
|
|
2034
|
+
type: Input
|
|
2035
|
+
}], changed: [{
|
|
2036
|
+
type: Output
|
|
2037
|
+
}], onClick: [{
|
|
2038
|
+
type: HostListener,
|
|
2039
|
+
args: ['click', ['$event']]
|
|
2040
|
+
}] } });
|
|
2041
|
+
|
|
2042
|
+
class RadioButtonGroupComponent {
|
|
2043
|
+
constructor() {
|
|
2044
|
+
this.change = new EventEmitter();
|
|
2045
|
+
this._items = [];
|
|
2046
|
+
//_init : boolean = false;
|
|
2047
|
+
this.selectedItem = null;
|
|
2048
|
+
}
|
|
2049
|
+
get items() {
|
|
2050
|
+
return this._items;
|
|
2051
|
+
}
|
|
2052
|
+
set items(val) {
|
|
2053
|
+
this._items = val;
|
|
2054
|
+
this.selectedItem = this.items.filter(x => x.default === true).firstOrNull();
|
|
2055
|
+
if (this.selectedItem === null)
|
|
2056
|
+
this.selectedItem = this.items.firstOrNull();
|
|
2057
|
+
}
|
|
2058
|
+
ngOnInit() {
|
|
2059
|
+
}
|
|
2060
|
+
raiseChange(item) {
|
|
2061
|
+
this.selectedItem = item;
|
|
2062
|
+
this.change.emit(this.selectedItem);
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
RadioButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2066
|
+
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"] }] });
|
|
2067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: RadioButtonGroupComponent, decorators: [{
|
|
2454
2068
|
type: Component,
|
|
2455
|
-
args: [{ selector: '
|
|
2456
|
-
}], ctorParameters: function () { return [
|
|
2069
|
+
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"] }]
|
|
2070
|
+
}], ctorParameters: function () { return []; }, propDecorators: { change: [{
|
|
2071
|
+
type: Output
|
|
2072
|
+
}], selectedItem: [{
|
|
2073
|
+
type: Input
|
|
2074
|
+
}], items: [{
|
|
2075
|
+
type: Input
|
|
2076
|
+
}] } });
|
|
2457
2077
|
|
|
2458
2078
|
const lateralAnimation = trigger('menuLateral', [
|
|
2459
2079
|
transition(':enter', [
|
|
@@ -2763,103 +2383,332 @@ class ProdutoFormComponent {
|
|
|
2763
2383
|
}
|
|
2764
2384
|
}
|
|
2765
2385
|
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 });
|
|
2766
|
-
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] });
|
|
2386
|
+
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] });
|
|
2767
2387
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoFormComponent, decorators: [{
|
|
2768
2388
|
type: Component,
|
|
2769
|
-
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"] }]
|
|
2389
|
+
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"] }]
|
|
2770
2390
|
}], ctorParameters: function () { return [{ type: i3.MatDialog }, { type: CommonWebService }, { type: i1.HttpClient }, { type: AuthDataService }, { type: NotificationService }, { type: ScreenHelperService }]; }, propDecorators: { editMode: [{
|
|
2771
2391
|
type: Input
|
|
2772
2392
|
}], nextIdClick: [{
|
|
2773
2393
|
type: Output
|
|
2774
|
-
}], model: [{
|
|
2394
|
+
}], model: [{
|
|
2395
|
+
type: Input
|
|
2396
|
+
}] } });
|
|
2397
|
+
|
|
2398
|
+
class ProdutoAddDialogComponent {
|
|
2399
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2400
|
+
this.ws = ws;
|
|
2401
|
+
this.notification = notification;
|
|
2402
|
+
this.dataDialog = dataDialog;
|
|
2403
|
+
this.dialog = dialog;
|
|
2404
|
+
this.elRef = elRef;
|
|
2405
|
+
this.dialogRef = dialogRef;
|
|
2406
|
+
this.screenHelper = screenHelper;
|
|
2407
|
+
this.isBusy = false;
|
|
2408
|
+
this.focus = new FocusService();
|
|
2409
|
+
this.model = createProduct();
|
|
2410
|
+
this.mobile = this.screenHelper.isMedium;
|
|
2411
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2412
|
+
}
|
|
2413
|
+
ngOnInit() {
|
|
2414
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
2415
|
+
this.getNextId();
|
|
2416
|
+
}
|
|
2417
|
+
ngOnDestroy() {
|
|
2418
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
2419
|
+
}
|
|
2420
|
+
salvar() {
|
|
2421
|
+
if (!this.model)
|
|
2422
|
+
return;
|
|
2423
|
+
const valMsg = validaProduto(this.model, this.focus);
|
|
2424
|
+
if (valMsg) {
|
|
2425
|
+
this.notification.showMsgError(valMsg);
|
|
2426
|
+
return;
|
|
2427
|
+
}
|
|
2428
|
+
this.isBusy = true;
|
|
2429
|
+
this.ws.addProduto(this.model)
|
|
2430
|
+
.subscribe(r => {
|
|
2431
|
+
this.isBusy = false;
|
|
2432
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
2433
|
+
if (this.dialogRef)
|
|
2434
|
+
this.dialogRef.close(true);
|
|
2435
|
+
}, err => {
|
|
2436
|
+
this.isBusy = false;
|
|
2437
|
+
this.notification.showMsg(err.error);
|
|
2438
|
+
});
|
|
2439
|
+
}
|
|
2440
|
+
getNextId() {
|
|
2441
|
+
this.isBusy = true;
|
|
2442
|
+
this.ws.getNextIdProduto()
|
|
2443
|
+
.subscribe(r => {
|
|
2444
|
+
this.model.id = r;
|
|
2445
|
+
this.model.referencia = '' + r;
|
|
2446
|
+
this.isBusy = false;
|
|
2447
|
+
}, err => {
|
|
2448
|
+
this.isBusy = false;
|
|
2449
|
+
this.notification.showMsg(err.error);
|
|
2450
|
+
});
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
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 });
|
|
2454
|
+
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"] }] });
|
|
2455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoAddDialogComponent, decorators: [{
|
|
2456
|
+
type: Component,
|
|
2457
|
+
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"] }]
|
|
2458
|
+
}], ctorParameters: function () {
|
|
2459
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2460
|
+
type: Inject,
|
|
2461
|
+
args: [MAT_DIALOG_DATA]
|
|
2462
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
2463
|
+
} });
|
|
2464
|
+
|
|
2465
|
+
class ProdutoBuscaFiltrosDialogComponent {
|
|
2466
|
+
constructor(d, ws, notification, dialogRef) {
|
|
2467
|
+
this.d = d;
|
|
2468
|
+
this.ws = ws;
|
|
2469
|
+
this.notification = notification;
|
|
2470
|
+
this.dialogRef = dialogRef;
|
|
2471
|
+
this.isBusy = false;
|
|
2472
|
+
this.produtosGrupos = [];
|
|
2473
|
+
this.d.setting.grupos = undefined;
|
|
2474
|
+
}
|
|
2475
|
+
ngOnInit() {
|
|
2476
|
+
this.getProdutos();
|
|
2477
|
+
}
|
|
2478
|
+
getProdutos() {
|
|
2479
|
+
this.isBusy = true;
|
|
2480
|
+
this.ws.getAllProdutoGrupo()
|
|
2481
|
+
.subscribe(r => {
|
|
2482
|
+
this.produtosGrupos = r;
|
|
2483
|
+
console.info(r);
|
|
2484
|
+
this.isBusy = false;
|
|
2485
|
+
}, err => {
|
|
2486
|
+
this.isBusy = false;
|
|
2487
|
+
this.notification.showHttpError(err);
|
|
2488
|
+
});
|
|
2489
|
+
}
|
|
2490
|
+
salvar() {
|
|
2491
|
+
this.dialogRef.close(this.d);
|
|
2492
|
+
}
|
|
2493
|
+
changeGruposProdutos(ev) {
|
|
2494
|
+
const itens = ev.value;
|
|
2495
|
+
this.d.setting.grupos = itens;
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
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 });
|
|
2499
|
+
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"] }] });
|
|
2500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoBuscaFiltrosDialogComponent, decorators: [{
|
|
2501
|
+
type: Component,
|
|
2502
|
+
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"] }]
|
|
2503
|
+
}], ctorParameters: function () {
|
|
2504
|
+
return [{ type: undefined, decorators: [{
|
|
2505
|
+
type: Inject,
|
|
2506
|
+
args: [MAT_DIALOG_DATA]
|
|
2507
|
+
}] }, { type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialogRef }];
|
|
2508
|
+
} });
|
|
2509
|
+
|
|
2510
|
+
class ProdutoEditDialogComponent {
|
|
2511
|
+
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2512
|
+
this.ws = ws;
|
|
2513
|
+
this.notification = notification;
|
|
2514
|
+
this.dataDialog = dataDialog;
|
|
2515
|
+
this.dialog = dialog;
|
|
2516
|
+
this.elRef = elRef;
|
|
2517
|
+
this.dialogRef = dialogRef;
|
|
2518
|
+
this.screenHelper = screenHelper;
|
|
2519
|
+
this.isBusy = false;
|
|
2520
|
+
this.focus = new FocusService();
|
|
2521
|
+
if (dataDialog) {
|
|
2522
|
+
this.model = dataDialog;
|
|
2523
|
+
}
|
|
2524
|
+
this.mobile = this.screenHelper.isMedium;
|
|
2525
|
+
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2526
|
+
}
|
|
2527
|
+
ngOnInit() {
|
|
2528
|
+
this.focus.registerElement(this.elRef.nativeElement);
|
|
2529
|
+
}
|
|
2530
|
+
ngOnDestroy() {
|
|
2531
|
+
this.focus.unregisterElement(this.elRef.nativeElement);
|
|
2532
|
+
}
|
|
2533
|
+
salvar() {
|
|
2534
|
+
if (!this.model)
|
|
2535
|
+
return;
|
|
2536
|
+
const valMsg = validaProduto(this.model, this.focus);
|
|
2537
|
+
if (valMsg) {
|
|
2538
|
+
this.notification.showMsgError(valMsg);
|
|
2539
|
+
return;
|
|
2540
|
+
}
|
|
2541
|
+
this.isBusy = true;
|
|
2542
|
+
this.ws.saveProduto(this.model)
|
|
2543
|
+
.subscribe(r => {
|
|
2544
|
+
this.isBusy = false;
|
|
2545
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
2546
|
+
if (this.dialogRef)
|
|
2547
|
+
this.dialogRef.close(true);
|
|
2548
|
+
}, err => {
|
|
2549
|
+
this.isBusy = false;
|
|
2550
|
+
this.notification.showMsg(err.error);
|
|
2551
|
+
});
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2554
|
+
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 });
|
|
2555
|
+
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"] }] });
|
|
2556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoEditDialogComponent, decorators: [{
|
|
2557
|
+
type: Component,
|
|
2558
|
+
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"] }]
|
|
2559
|
+
}], ctorParameters: function () {
|
|
2560
|
+
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2561
|
+
type: Inject,
|
|
2562
|
+
args: [MAT_DIALOG_DATA]
|
|
2563
|
+
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
2564
|
+
} });
|
|
2565
|
+
|
|
2566
|
+
class ProdutoSearchSetting extends SearchSetting {
|
|
2567
|
+
constructor() {
|
|
2568
|
+
super();
|
|
2569
|
+
this.exibeNaoControladoEstoque = true;
|
|
2570
|
+
this.exibeApenasMostraRecepcao = false;
|
|
2571
|
+
this.exibeInativo = false;
|
|
2572
|
+
this.exibeImprimiCozinha = false;
|
|
2573
|
+
this.exibeHePrato = false;
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
class PaginatorComponent {
|
|
2578
|
+
constructor() {
|
|
2579
|
+
this.paginaAtualChange = new EventEmitter();
|
|
2580
|
+
this.totalPaginasChange = new EventEmitter();
|
|
2581
|
+
this.change = new EventEmitter();
|
|
2582
|
+
this._paginaAtual = 1;
|
|
2583
|
+
this._totalPaginas = 1;
|
|
2584
|
+
this.inicio = true;
|
|
2585
|
+
this.fim = true;
|
|
2586
|
+
this.pageSize = 0;
|
|
2587
|
+
}
|
|
2588
|
+
get paginaAtual() {
|
|
2589
|
+
return this._paginaAtual;
|
|
2590
|
+
}
|
|
2591
|
+
set paginaAtual(val) {
|
|
2592
|
+
this._paginaAtual = val;
|
|
2593
|
+
this.paginaAtualChange.emit(val);
|
|
2594
|
+
this.refreshUI();
|
|
2595
|
+
}
|
|
2596
|
+
get totalPaginas() {
|
|
2597
|
+
return this._totalPaginas;
|
|
2598
|
+
}
|
|
2599
|
+
set totalPaginas(val) {
|
|
2600
|
+
this._totalPaginas = val;
|
|
2601
|
+
this.totalPaginasChange.emit(val);
|
|
2602
|
+
this.refreshUI();
|
|
2603
|
+
}
|
|
2604
|
+
ngOnInit() {
|
|
2605
|
+
}
|
|
2606
|
+
trocaPagina(pagina) {
|
|
2607
|
+
if (pagina > this.totalPaginas || pagina < 1)
|
|
2608
|
+
return;
|
|
2609
|
+
this.paginaAtual = pagina;
|
|
2610
|
+
this.refreshUI();
|
|
2611
|
+
this.change.emit(this.paginaAtual);
|
|
2612
|
+
}
|
|
2613
|
+
refreshUI() {
|
|
2614
|
+
this.inicio = this.paginaAtual == 1;
|
|
2615
|
+
this.fim = this.paginaAtual == this.totalPaginas;
|
|
2616
|
+
}
|
|
2617
|
+
goBack() {
|
|
2618
|
+
this.trocaPagina(this.paginaAtual - 1);
|
|
2619
|
+
}
|
|
2620
|
+
goNext() {
|
|
2621
|
+
this.trocaPagina(this.paginaAtual + 1);
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2625
|
+
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"] }] });
|
|
2626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
2627
|
+
type: Component,
|
|
2628
|
+
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"] }]
|
|
2629
|
+
}], ctorParameters: function () { return []; }, propDecorators: { paginaAtualChange: [{
|
|
2630
|
+
type: Output
|
|
2631
|
+
}], totalPaginasChange: [{
|
|
2632
|
+
type: Output
|
|
2633
|
+
}], change: [{
|
|
2634
|
+
type: Output
|
|
2635
|
+
}], pageSize: [{
|
|
2636
|
+
type: Input
|
|
2637
|
+
}], paginaAtual: [{
|
|
2638
|
+
type: Input
|
|
2639
|
+
}], totalPaginas: [{
|
|
2775
2640
|
type: Input
|
|
2776
2641
|
}] } });
|
|
2777
2642
|
|
|
2778
|
-
class
|
|
2779
|
-
constructor(ws, notification,
|
|
2643
|
+
class ProdutosComponent {
|
|
2644
|
+
constructor(ws, notification, dialog, auth, screenHelper) {
|
|
2780
2645
|
this.ws = ws;
|
|
2781
2646
|
this.notification = notification;
|
|
2782
|
-
this.dataDialog = dataDialog;
|
|
2783
2647
|
this.dialog = dialog;
|
|
2784
|
-
this.elRef = elRef;
|
|
2785
|
-
this.dialogRef = dialogRef;
|
|
2786
2648
|
this.screenHelper = screenHelper;
|
|
2787
2649
|
this.isBusy = false;
|
|
2650
|
+
this.items = [];
|
|
2651
|
+
this.result = {
|
|
2652
|
+
finalQtd: 0,
|
|
2653
|
+
inicioQtd: 0,
|
|
2654
|
+
items: [],
|
|
2655
|
+
pagina: 0,
|
|
2656
|
+
quantidade: 0,
|
|
2657
|
+
valor: 0,
|
|
2658
|
+
totalPaginas: 0
|
|
2659
|
+
};
|
|
2660
|
+
this._selectedItem = null;
|
|
2661
|
+
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
2662
|
+
this.setting = new ProdutoSearchSetting();
|
|
2788
2663
|
this.focus = new FocusService();
|
|
2789
|
-
this.
|
|
2664
|
+
this.paginaAtual = 1;
|
|
2665
|
+
this.quantidadePagina = 50;
|
|
2666
|
+
this.allowAdd = auth.permissoes.adminProdutoAdd;
|
|
2667
|
+
this.allowExcluir = auth.permissoes.adminProdutoDelete;
|
|
2790
2668
|
this.mobile = this.screenHelper.isMedium;
|
|
2791
2669
|
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2670
|
+
this.setting.exibeNaoControladoEstoque = true;
|
|
2671
|
+
this.setting.exibeImprimiCozinha = true;
|
|
2792
2672
|
}
|
|
2793
|
-
|
|
2794
|
-
this.
|
|
2795
|
-
this.getNextId();
|
|
2673
|
+
get selectedItem() {
|
|
2674
|
+
return this._selectedItem;
|
|
2796
2675
|
}
|
|
2797
|
-
|
|
2798
|
-
this.
|
|
2676
|
+
set selectedItem(p) {
|
|
2677
|
+
this._selectedItem = p;
|
|
2799
2678
|
}
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
const valMsg = valida$1(this.model, this.focus);
|
|
2804
|
-
if (valMsg) {
|
|
2805
|
-
this.notification.showMsgError(valMsg);
|
|
2806
|
-
return;
|
|
2807
|
-
}
|
|
2808
|
-
this.isBusy = true;
|
|
2809
|
-
this.ws.addProduto(this.model)
|
|
2810
|
-
.subscribe(r => {
|
|
2811
|
-
this.isBusy = false;
|
|
2812
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
2813
|
-
if (this.dialogRef)
|
|
2814
|
-
this.dialogRef.close(true);
|
|
2815
|
-
}, err => {
|
|
2816
|
-
this.isBusy = false;
|
|
2817
|
-
this.notification.showMsg(err.error);
|
|
2818
|
-
});
|
|
2679
|
+
ngOnInit() {
|
|
2680
|
+
this.setting.ordem = "nome";
|
|
2681
|
+
this.atualiza();
|
|
2819
2682
|
}
|
|
2820
|
-
|
|
2821
|
-
this.
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
this.
|
|
2827
|
-
}
|
|
2828
|
-
|
|
2829
|
-
this.
|
|
2830
|
-
}
|
|
2683
|
+
onSelectItem() {
|
|
2684
|
+
if (!this.focus.hasInit()) {
|
|
2685
|
+
setTimeout(() => {
|
|
2686
|
+
this.focus.registerElementById("form-column");
|
|
2687
|
+
this.focus.setFirst();
|
|
2688
|
+
}, 500);
|
|
2689
|
+
//this._focus.registerElementById("form-column");
|
|
2690
|
+
}
|
|
2691
|
+
else {
|
|
2692
|
+
this.focus.setFirst();
|
|
2693
|
+
}
|
|
2831
2694
|
}
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
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"] }] });
|
|
2835
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutoAddDialogComponent, decorators: [{
|
|
2836
|
-
type: Component,
|
|
2837
|
-
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"] }]
|
|
2838
|
-
}], ctorParameters: function () {
|
|
2839
|
-
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2840
|
-
type: Inject,
|
|
2841
|
-
args: [MAT_DIALOG_DATA]
|
|
2842
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
2843
|
-
} });
|
|
2844
|
-
|
|
2845
|
-
class ProdutoBuscaFiltrosDialogComponent {
|
|
2846
|
-
constructor(d, ws, notification, dialogRef) {
|
|
2847
|
-
this.d = d;
|
|
2848
|
-
this.ws = ws;
|
|
2849
|
-
this.notification = notification;
|
|
2850
|
-
this.dialogRef = dialogRef;
|
|
2851
|
-
this.isBusy = false;
|
|
2852
|
-
this.produtosGrupos = [];
|
|
2853
|
-
this.d.setting.grupos = undefined;
|
|
2695
|
+
ngOnDestroy() {
|
|
2696
|
+
this.focus.unregisterElementById("form-column");
|
|
2854
2697
|
}
|
|
2855
|
-
|
|
2856
|
-
this.
|
|
2698
|
+
trocaPagina() {
|
|
2699
|
+
this.atualiza(this.paginaAtual);
|
|
2857
2700
|
}
|
|
2858
|
-
|
|
2701
|
+
atualiza(pagina) {
|
|
2702
|
+
if (pagina == undefined)
|
|
2703
|
+
this.paginaAtual = 1;
|
|
2704
|
+
else
|
|
2705
|
+
this.paginaAtual = pagina;
|
|
2859
2706
|
this.isBusy = true;
|
|
2860
|
-
this.ws.
|
|
2707
|
+
this.ws.buscaPaginadaProdutos(this.setting, this.paginaAtual, this.quantidadePagina)
|
|
2861
2708
|
.subscribe(r => {
|
|
2862
|
-
this.
|
|
2709
|
+
this.items = r.items;
|
|
2710
|
+
this.result = r;
|
|
2711
|
+
this.selectedItem = null;
|
|
2863
2712
|
console.info(r);
|
|
2864
2713
|
this.isBusy = false;
|
|
2865
2714
|
}, err => {
|
|
@@ -2867,83 +2716,118 @@ class ProdutoBuscaFiltrosDialogComponent {
|
|
|
2867
2716
|
this.notification.showHttpError(err);
|
|
2868
2717
|
});
|
|
2869
2718
|
}
|
|
2870
|
-
|
|
2871
|
-
this.
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2719
|
+
excluir() {
|
|
2720
|
+
const item = this.selectedItem;
|
|
2721
|
+
if (!item)
|
|
2722
|
+
return;
|
|
2723
|
+
confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do produto ${item.nome}?`, () => {
|
|
2724
|
+
this.isBusy = true;
|
|
2725
|
+
this.ws.deleteProduto(item.id)
|
|
2726
|
+
.subscribe(r => {
|
|
2727
|
+
this.notification.showMsg("O produto foi excluído com sucesso.");
|
|
2728
|
+
this.items.remove(item);
|
|
2729
|
+
this.selectedItem = null;
|
|
2730
|
+
this.isBusy = false;
|
|
2731
|
+
}, err => {
|
|
2732
|
+
this.isBusy = false;
|
|
2733
|
+
this.notification.showMsg(err.error);
|
|
2734
|
+
});
|
|
2735
|
+
});
|
|
2876
2736
|
}
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
}], ctorParameters: function () {
|
|
2884
|
-
return [{ type: undefined, decorators: [{
|
|
2885
|
-
type: Inject,
|
|
2886
|
-
args: [MAT_DIALOG_DATA]
|
|
2887
|
-
}] }, { type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialogRef }];
|
|
2888
|
-
} });
|
|
2889
|
-
|
|
2890
|
-
class ProdutoEditDialogComponent {
|
|
2891
|
-
constructor(ws, notification, dataDialog, dialog, elRef, dialogRef, screenHelper) {
|
|
2892
|
-
this.ws = ws;
|
|
2893
|
-
this.notification = notification;
|
|
2894
|
-
this.dataDialog = dataDialog;
|
|
2895
|
-
this.dialog = dialog;
|
|
2896
|
-
this.elRef = elRef;
|
|
2897
|
-
this.dialogRef = dialogRef;
|
|
2898
|
-
this.screenHelper = screenHelper;
|
|
2899
|
-
this.isBusy = false;
|
|
2900
|
-
this.focus = new FocusService();
|
|
2901
|
-
if (dataDialog) {
|
|
2902
|
-
this.model = dataDialog;
|
|
2737
|
+
novo() {
|
|
2738
|
+
let height = (window.innerHeight * 0.90) + 'px';
|
|
2739
|
+
let width = 550 + 'px';
|
|
2740
|
+
if (this.mobile) {
|
|
2741
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
2742
|
+
//height = (window.innerHeight * 0.98) + 'px';
|
|
2903
2743
|
}
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2744
|
+
const dialog = this.dialog.open(ProdutoAddDialogComponent, {
|
|
2745
|
+
width: width,
|
|
2746
|
+
height: height,
|
|
2747
|
+
maxWidth: '100%',
|
|
2748
|
+
panelClass: 'dialog-p0',
|
|
2749
|
+
});
|
|
2750
|
+
dialog.afterClosed().subscribe(result => {
|
|
2751
|
+
if (result === undefined)
|
|
2752
|
+
return;
|
|
2753
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
2754
|
+
this.atualiza();
|
|
2755
|
+
});
|
|
2909
2756
|
}
|
|
2910
|
-
|
|
2911
|
-
|
|
2757
|
+
abreCadastro(item) {
|
|
2758
|
+
let height = undefined;
|
|
2759
|
+
let width = 550 + 'px';
|
|
2760
|
+
if (this.mobile) {
|
|
2761
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
2762
|
+
height = (window.innerHeight * 0.99) + 'px';
|
|
2763
|
+
}
|
|
2764
|
+
const dialog = this.dialog.open(ProdutoEditDialogComponent, {
|
|
2765
|
+
data: item,
|
|
2766
|
+
width: width,
|
|
2767
|
+
height: height,
|
|
2768
|
+
maxWidth: '100%',
|
|
2769
|
+
panelClass: 'dialog-p0',
|
|
2770
|
+
});
|
|
2771
|
+
dialog.afterClosed().subscribe(result => {
|
|
2772
|
+
if (result !== true)
|
|
2773
|
+
return;
|
|
2774
|
+
this.notification.showMsg("Salvo com sucesso.");
|
|
2775
|
+
this.atualiza();
|
|
2776
|
+
});
|
|
2912
2777
|
}
|
|
2913
2778
|
salvar() {
|
|
2914
|
-
if (!this.
|
|
2779
|
+
if (!this.selectedItem)
|
|
2915
2780
|
return;
|
|
2916
|
-
const valMsg =
|
|
2781
|
+
const valMsg = validaProduto(this.selectedItem, this.focus);
|
|
2917
2782
|
if (valMsg) {
|
|
2918
2783
|
this.notification.showMsgError(valMsg);
|
|
2919
2784
|
return;
|
|
2920
2785
|
}
|
|
2921
2786
|
this.isBusy = true;
|
|
2922
|
-
this.ws.saveProduto(this.
|
|
2787
|
+
this.ws.saveProduto(this.selectedItem)
|
|
2923
2788
|
.subscribe(r => {
|
|
2924
|
-
this.isBusy = false;
|
|
2925
2789
|
this.notification.showMsg("Salvo com sucesso.");
|
|
2926
|
-
|
|
2927
|
-
this.dialogRef.close(true);
|
|
2790
|
+
this.isBusy = false;
|
|
2928
2791
|
}, err => {
|
|
2929
2792
|
this.isBusy = false;
|
|
2930
2793
|
this.notification.showMsg(err.error);
|
|
2931
2794
|
});
|
|
2932
2795
|
}
|
|
2796
|
+
filtros() {
|
|
2797
|
+
let height = undefined;
|
|
2798
|
+
let width = 550 + 'px';
|
|
2799
|
+
if (this.mobile) {
|
|
2800
|
+
width = (window.innerWidth * 0.99) + 'px';
|
|
2801
|
+
height = (window.innerHeight * 0.99) + 'px';
|
|
2802
|
+
}
|
|
2803
|
+
const p = {
|
|
2804
|
+
qtd: this.quantidadePagina,
|
|
2805
|
+
setting: this.setting
|
|
2806
|
+
};
|
|
2807
|
+
const dialog = this.dialog.open(ProdutoBuscaFiltrosDialogComponent, {
|
|
2808
|
+
data: p,
|
|
2809
|
+
width: width,
|
|
2810
|
+
height: height,
|
|
2811
|
+
maxWidth: '100%',
|
|
2812
|
+
panelClass: 'dialog-p0',
|
|
2813
|
+
});
|
|
2814
|
+
dialog.afterClosed().subscribe(result => {
|
|
2815
|
+
if (!result)
|
|
2816
|
+
return;
|
|
2817
|
+
const r = result;
|
|
2818
|
+
this.quantidadePagina = r.qtd;
|
|
2819
|
+
this.atualiza();
|
|
2820
|
+
});
|
|
2821
|
+
}
|
|
2933
2822
|
}
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
2823
|
+
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 });
|
|
2824
|
+
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] });
|
|
2825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosComponent, decorators: [{
|
|
2937
2826
|
type: Component,
|
|
2938
|
-
args: [{ selector: '
|
|
2939
|
-
}], ctorParameters: function () {
|
|
2940
|
-
return [{ type: CommonWebService }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
2941
|
-
type: Inject,
|
|
2942
|
-
args: [MAT_DIALOG_DATA]
|
|
2943
|
-
}] }, { type: i3.MatDialog }, { type: i0.ElementRef }, { type: i3.MatDialogRef }, { type: ScreenHelperService }];
|
|
2944
|
-
} });
|
|
2827
|
+
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"] }]
|
|
2828
|
+
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
2945
2829
|
|
|
2946
|
-
class
|
|
2830
|
+
class ProdutosCategoriasCardapioComponent {
|
|
2947
2831
|
constructor(ws, notification, dialog, auth, screenHelper) {
|
|
2948
2832
|
this.ws = ws;
|
|
2949
2833
|
this.notification = notification;
|
|
@@ -2951,33 +2835,14 @@ class ProdutosComponent {
|
|
|
2951
2835
|
this.screenHelper = screenHelper;
|
|
2952
2836
|
this.isBusy = false;
|
|
2953
2837
|
this.items = [];
|
|
2954
|
-
this.
|
|
2955
|
-
finalQtd: 0,
|
|
2956
|
-
inicioQtd: 0,
|
|
2957
|
-
items: [],
|
|
2958
|
-
pagina: 0,
|
|
2959
|
-
quantidade: 0,
|
|
2960
|
-
valor: 0,
|
|
2961
|
-
totalPaginas: 0
|
|
2962
|
-
};
|
|
2963
|
-
this._selectedItem = null;
|
|
2838
|
+
this.selectedItem = null;
|
|
2964
2839
|
this.lazyTrigger = new LazyTrigger(() => { this.atualiza(); });
|
|
2965
|
-
this.setting = new
|
|
2840
|
+
this.setting = new SearchSetting();
|
|
2966
2841
|
this.focus = new FocusService();
|
|
2967
|
-
this.
|
|
2968
|
-
this.
|
|
2969
|
-
this.allowAdd = auth.permissoes.adminProdutoAdd;
|
|
2970
|
-
this.allowExcluir = auth.permissoes.adminProdutoDelete;
|
|
2842
|
+
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
2843
|
+
this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
|
|
2971
2844
|
this.mobile = this.screenHelper.isMedium;
|
|
2972
2845
|
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
2973
|
-
this.setting.exibeNaoControladoEstoque = true;
|
|
2974
|
-
this.setting.exibeImprimiCozinha = true;
|
|
2975
|
-
}
|
|
2976
|
-
get selectedItem() {
|
|
2977
|
-
return this._selectedItem;
|
|
2978
|
-
}
|
|
2979
|
-
set selectedItem(p) {
|
|
2980
|
-
this._selectedItem = p;
|
|
2981
2846
|
}
|
|
2982
2847
|
ngOnInit() {
|
|
2983
2848
|
this.setting.ordem = "nome";
|
|
@@ -2998,19 +2863,11 @@ class ProdutosComponent {
|
|
|
2998
2863
|
ngOnDestroy() {
|
|
2999
2864
|
this.focus.unregisterElementById("form-column");
|
|
3000
2865
|
}
|
|
3001
|
-
|
|
3002
|
-
this.atualiza(this.paginaAtual);
|
|
3003
|
-
}
|
|
3004
|
-
atualiza(pagina) {
|
|
3005
|
-
if (pagina == undefined)
|
|
3006
|
-
this.paginaAtual = 1;
|
|
3007
|
-
else
|
|
3008
|
-
this.paginaAtual = pagina;
|
|
2866
|
+
atualiza() {
|
|
3009
2867
|
this.isBusy = true;
|
|
3010
|
-
this.ws.
|
|
2868
|
+
this.ws.buscaProdutoCategoriaCardapio(this.setting)
|
|
3011
2869
|
.subscribe(r => {
|
|
3012
|
-
this.items = r
|
|
3013
|
-
this.result = r;
|
|
2870
|
+
this.items = r;
|
|
3014
2871
|
this.selectedItem = null;
|
|
3015
2872
|
console.info(r);
|
|
3016
2873
|
this.isBusy = false;
|
|
@@ -3023,11 +2880,11 @@ class ProdutosComponent {
|
|
|
3023
2880
|
const item = this.selectedItem;
|
|
3024
2881
|
if (!item)
|
|
3025
2882
|
return;
|
|
3026
|
-
confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do
|
|
2883
|
+
confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do grupo ${item.nome}?`, () => {
|
|
3027
2884
|
this.isBusy = true;
|
|
3028
|
-
this.ws.
|
|
2885
|
+
this.ws.deleteProdutoCategoriaCardapio(item.id)
|
|
3029
2886
|
.subscribe(r => {
|
|
3030
|
-
this.notification.showMsg("O
|
|
2887
|
+
this.notification.showMsg("O grupo foi excluído com sucesso.");
|
|
3031
2888
|
this.items.remove(item);
|
|
3032
2889
|
this.selectedItem = null;
|
|
3033
2890
|
this.isBusy = false;
|
|
@@ -3044,9 +2901,9 @@ class ProdutosComponent {
|
|
|
3044
2901
|
width = (window.innerWidth * 0.99) + 'px';
|
|
3045
2902
|
//height = (window.innerHeight * 0.98) + 'px';
|
|
3046
2903
|
}
|
|
3047
|
-
const dialog = this.dialog.open(
|
|
2904
|
+
const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
|
|
3048
2905
|
width: width,
|
|
3049
|
-
height: height,
|
|
2906
|
+
//height: height,
|
|
3050
2907
|
maxWidth: '100%',
|
|
3051
2908
|
panelClass: 'dialog-p0',
|
|
3052
2909
|
});
|
|
@@ -3064,10 +2921,10 @@ class ProdutosComponent {
|
|
|
3064
2921
|
width = (window.innerWidth * 0.99) + 'px';
|
|
3065
2922
|
height = (window.innerHeight * 0.99) + 'px';
|
|
3066
2923
|
}
|
|
3067
|
-
const dialog = this.dialog.open(
|
|
2924
|
+
const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
|
|
3068
2925
|
data: item,
|
|
3069
2926
|
width: width,
|
|
3070
|
-
height: height,
|
|
2927
|
+
//height: height,
|
|
3071
2928
|
maxWidth: '100%',
|
|
3072
2929
|
panelClass: 'dialog-p0',
|
|
3073
2930
|
});
|
|
@@ -3081,13 +2938,13 @@ class ProdutosComponent {
|
|
|
3081
2938
|
salvar() {
|
|
3082
2939
|
if (!this.selectedItem)
|
|
3083
2940
|
return;
|
|
3084
|
-
const valMsg =
|
|
2941
|
+
const valMsg = validaProdutoGrupo(this.selectedItem, this.focus);
|
|
3085
2942
|
if (valMsg) {
|
|
3086
2943
|
this.notification.showMsgError(valMsg);
|
|
3087
2944
|
return;
|
|
3088
2945
|
}
|
|
3089
2946
|
this.isBusy = true;
|
|
3090
|
-
this.ws.
|
|
2947
|
+
this.ws.saveProdutoCategoriaCardapio(this.selectedItem)
|
|
3091
2948
|
.subscribe(r => {
|
|
3092
2949
|
this.notification.showMsg("Salvo com sucesso.");
|
|
3093
2950
|
this.isBusy = false;
|
|
@@ -3096,38 +2953,12 @@ class ProdutosComponent {
|
|
|
3096
2953
|
this.notification.showMsg(err.error);
|
|
3097
2954
|
});
|
|
3098
2955
|
}
|
|
3099
|
-
filtros() {
|
|
3100
|
-
let height = undefined;
|
|
3101
|
-
let width = 550 + 'px';
|
|
3102
|
-
if (this.mobile) {
|
|
3103
|
-
width = (window.innerWidth * 0.99) + 'px';
|
|
3104
|
-
height = (window.innerHeight * 0.99) + 'px';
|
|
3105
|
-
}
|
|
3106
|
-
const p = {
|
|
3107
|
-
qtd: this.quantidadePagina,
|
|
3108
|
-
setting: this.setting
|
|
3109
|
-
};
|
|
3110
|
-
const dialog = this.dialog.open(ProdutoBuscaFiltrosDialogComponent, {
|
|
3111
|
-
data: p,
|
|
3112
|
-
width: width,
|
|
3113
|
-
height: height,
|
|
3114
|
-
maxWidth: '100%',
|
|
3115
|
-
panelClass: 'dialog-p0',
|
|
3116
|
-
});
|
|
3117
|
-
dialog.afterClosed().subscribe(result => {
|
|
3118
|
-
if (!result)
|
|
3119
|
-
return;
|
|
3120
|
-
const r = result;
|
|
3121
|
-
this.quantidadePagina = r.qtd;
|
|
3122
|
-
this.atualiza();
|
|
3123
|
-
});
|
|
3124
|
-
}
|
|
3125
2956
|
}
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
2957
|
+
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 });
|
|
2958
|
+
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] });
|
|
2959
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosCategoriasCardapioComponent, decorators: [{
|
|
3129
2960
|
type: Component,
|
|
3130
|
-
args: [{ selector: '
|
|
2961
|
+
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"] }]
|
|
3131
2962
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
3132
2963
|
|
|
3133
2964
|
class MoverGrupoDialogComponent {
|
|
@@ -3174,10 +3005,10 @@ class MoverGrupoDialogComponent {
|
|
|
3174
3005
|
}
|
|
3175
3006
|
}
|
|
3176
3007
|
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 });
|
|
3177
|
-
MoverGrupoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: MoverGrupoDialogComponent, selector: "
|
|
3008
|
+
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"] }] });
|
|
3178
3009
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MoverGrupoDialogComponent, decorators: [{
|
|
3179
3010
|
type: Component,
|
|
3180
|
-
args: [{ selector: '
|
|
3011
|
+
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"] }]
|
|
3181
3012
|
}], ctorParameters: function () {
|
|
3182
3013
|
return [{ type: CommonWebService }, { type: i3.MatDialogRef }, { type: NotificationService }, { type: undefined, decorators: [{
|
|
3183
3014
|
type: Inject,
|
|
@@ -3297,7 +3128,7 @@ class ProdutosGruposComponent {
|
|
|
3297
3128
|
const item = this.selectedItem;
|
|
3298
3129
|
if (!item)
|
|
3299
3130
|
return;
|
|
3300
|
-
const valMsg =
|
|
3131
|
+
const valMsg = validaProdutoGrupo(item, this.focus);
|
|
3301
3132
|
if (valMsg) {
|
|
3302
3133
|
this.notification.showMsgError(valMsg);
|
|
3303
3134
|
return;
|
|
@@ -3335,10 +3166,10 @@ class ProdutosGruposComponent {
|
|
|
3335
3166
|
}
|
|
3336
3167
|
}
|
|
3337
3168
|
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 });
|
|
3338
|
-
ProdutosGruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosGruposComponent, selector: "
|
|
3169
|
+
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] });
|
|
3339
3170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosGruposComponent, decorators: [{
|
|
3340
3171
|
type: Component,
|
|
3341
|
-
args: [{ selector: '
|
|
3172
|
+
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"] }]
|
|
3342
3173
|
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
3343
3174
|
|
|
3344
3175
|
class ProdutosSubgruposComponent {
|
|
@@ -3452,7 +3283,7 @@ class ProdutosSubgruposComponent {
|
|
|
3452
3283
|
salvar() {
|
|
3453
3284
|
if (!this.selectedItem)
|
|
3454
3285
|
return;
|
|
3455
|
-
const valMsg =
|
|
3286
|
+
const valMsg = validaProdutoGrupo(this.selectedItem, this.focus);
|
|
3456
3287
|
if (valMsg) {
|
|
3457
3288
|
this.notification.showMsgError(valMsg);
|
|
3458
3289
|
return;
|
|
@@ -3468,146 +3299,315 @@ class ProdutosSubgruposComponent {
|
|
|
3468
3299
|
});
|
|
3469
3300
|
}
|
|
3470
3301
|
}
|
|
3471
|
-
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 });
|
|
3472
|
-
ProdutosSubgruposComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: ProdutosSubgruposComponent, selector: "
|
|
3473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, decorators: [{
|
|
3302
|
+
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 });
|
|
3303
|
+
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] });
|
|
3304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ProdutosSubgruposComponent, decorators: [{
|
|
3305
|
+
type: Component,
|
|
3306
|
+
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"] }]
|
|
3307
|
+
}], ctorParameters: function () { return [{ type: CommonWebService }, { type: NotificationService }, { type: i3.MatDialog }, { type: AuthDataService }, { type: ScreenHelperService }]; } });
|
|
3308
|
+
|
|
3309
|
+
class ImageViewerComponent {
|
|
3310
|
+
constructor() {
|
|
3311
|
+
this.infos = [];
|
|
3312
|
+
this._isOpen = false;
|
|
3313
|
+
this.paginaAtual = 0;
|
|
3314
|
+
this.disableBack = false;
|
|
3315
|
+
this.disableNext = false;
|
|
3316
|
+
this.isOpenChange = new EventEmitter();
|
|
3317
|
+
}
|
|
3318
|
+
get isOpen() {
|
|
3319
|
+
return this._isOpen;
|
|
3320
|
+
}
|
|
3321
|
+
set isOpen(val) {
|
|
3322
|
+
this._isOpen = val;
|
|
3323
|
+
this.isOpenChange.emit(val);
|
|
3324
|
+
}
|
|
3325
|
+
onClick(e) {
|
|
3326
|
+
//this.isOpen = !this.isOpen;
|
|
3327
|
+
}
|
|
3328
|
+
ngOnInit() {
|
|
3329
|
+
}
|
|
3330
|
+
open(info, infos) {
|
|
3331
|
+
if (infos !== undefined) {
|
|
3332
|
+
for (let i = 0; i < infos.length; i++) {
|
|
3333
|
+
if (infos[i] === info) {
|
|
3334
|
+
this.paginaAtual = i + 1;
|
|
3335
|
+
break;
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
}
|
|
3339
|
+
this.info = info;
|
|
3340
|
+
this.infos = infos;
|
|
3341
|
+
this.isOpen = true;
|
|
3342
|
+
this.updateUI();
|
|
3343
|
+
}
|
|
3344
|
+
goNext() {
|
|
3345
|
+
this.paginaAtual += 1;
|
|
3346
|
+
this.info = this.infos[this.paginaAtual - 1];
|
|
3347
|
+
this.updateUI();
|
|
3348
|
+
}
|
|
3349
|
+
goBack() {
|
|
3350
|
+
this.paginaAtual -= 1;
|
|
3351
|
+
this.info = this.infos[this.paginaAtual - 1];
|
|
3352
|
+
this.updateUI();
|
|
3353
|
+
}
|
|
3354
|
+
updateUI() {
|
|
3355
|
+
this.disableBack = this.paginaAtual == 1;
|
|
3356
|
+
this.disableNext = this.paginaAtual == this.infos.length;
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
ImageViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3360
|
+
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"] }] });
|
|
3361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: ImageViewerComponent, decorators: [{
|
|
3362
|
+
type: Component,
|
|
3363
|
+
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"] }]
|
|
3364
|
+
}], ctorParameters: function () { return []; }, propDecorators: { info: [{
|
|
3365
|
+
type: Input
|
|
3366
|
+
}], infos: [{
|
|
3367
|
+
type: Input
|
|
3368
|
+
}], isOpenChange: [{
|
|
3369
|
+
type: Output
|
|
3370
|
+
}], isOpen: [{
|
|
3371
|
+
type: Input
|
|
3372
|
+
}], onClick: [{
|
|
3373
|
+
type: HostListener,
|
|
3374
|
+
args: ['click', ['$event']]
|
|
3375
|
+
}] } });
|
|
3376
|
+
|
|
3377
|
+
class MonthYearPickerComponent {
|
|
3378
|
+
constructor() {
|
|
3379
|
+
this.anoChange = new EventEmitter();
|
|
3380
|
+
this.mesChange = new EventEmitter();
|
|
3381
|
+
this.changed = new EventEmitter();
|
|
3382
|
+
this._init = false;
|
|
3383
|
+
this._modoAnual = false;
|
|
3384
|
+
this._meses = ["JANEIRO", "FEVEREIRO", "MARÇO", "ABRIL", "MAIO", "JUNHO", "JULHO", "AGOSTO", "SETEMBRO", "OUTUBRO", "NOVEMBRO", "DEZEMBRO"];
|
|
3385
|
+
this.text = '';
|
|
3386
|
+
this.disableNext = false;
|
|
3387
|
+
this.blockFuture = false;
|
|
3388
|
+
let d = new Date();
|
|
3389
|
+
this._ano = d.getFullYear();
|
|
3390
|
+
this._mes = d.getMonth() + 1;
|
|
3391
|
+
}
|
|
3392
|
+
get modoAnual() {
|
|
3393
|
+
return this._modoAnual;
|
|
3394
|
+
}
|
|
3395
|
+
set modoAnual(val) {
|
|
3396
|
+
this._modoAnual = val;
|
|
3397
|
+
if (!this._init)
|
|
3398
|
+
return;
|
|
3399
|
+
this.updateText();
|
|
3400
|
+
this.raiseOnSelectionChanged();
|
|
3401
|
+
}
|
|
3402
|
+
get ano() {
|
|
3403
|
+
return this._ano;
|
|
3404
|
+
}
|
|
3405
|
+
set ano(val) {
|
|
3406
|
+
this._ano = val;
|
|
3407
|
+
if (!this._init)
|
|
3408
|
+
return;
|
|
3409
|
+
this.anoChange.emit(val);
|
|
3410
|
+
this.updateText();
|
|
3411
|
+
}
|
|
3412
|
+
get mes() {
|
|
3413
|
+
return this._mes;
|
|
3414
|
+
}
|
|
3415
|
+
set mes(val) {
|
|
3416
|
+
this._mes = val;
|
|
3417
|
+
if (!this._init)
|
|
3418
|
+
return;
|
|
3419
|
+
this.mesChange.emit(val);
|
|
3420
|
+
this.updateText();
|
|
3421
|
+
}
|
|
3422
|
+
ngOnInit() {
|
|
3423
|
+
this.updateText();
|
|
3424
|
+
this._init = true;
|
|
3425
|
+
}
|
|
3426
|
+
goBack() {
|
|
3427
|
+
if (this.modoAnual) {
|
|
3428
|
+
this.ano -= 1;
|
|
3429
|
+
}
|
|
3430
|
+
else {
|
|
3431
|
+
this.mes--;
|
|
3432
|
+
if (this.mes < 1) {
|
|
3433
|
+
this.ano -= 1;
|
|
3434
|
+
this.mes = 12;
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
this.updateText();
|
|
3438
|
+
this.raiseOnSelectionChanged();
|
|
3439
|
+
}
|
|
3440
|
+
;
|
|
3441
|
+
goNext() {
|
|
3442
|
+
if (this.modoAnual) {
|
|
3443
|
+
this.ano += 1;
|
|
3444
|
+
}
|
|
3445
|
+
else {
|
|
3446
|
+
this.mes++;
|
|
3447
|
+
if (this.mes > 12) {
|
|
3448
|
+
this.ano += 1;
|
|
3449
|
+
this.mes = 1;
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
this.updateText();
|
|
3453
|
+
this.raiseOnSelectionChanged();
|
|
3454
|
+
}
|
|
3455
|
+
;
|
|
3456
|
+
updateText() {
|
|
3457
|
+
if (this.modoAnual)
|
|
3458
|
+
this.text = '' + this._ano;
|
|
3459
|
+
else
|
|
3460
|
+
this.text = this._meses[this._mes - 1] + " DE " + this._ano;
|
|
3461
|
+
if (!this.blockFuture)
|
|
3462
|
+
return;
|
|
3463
|
+
let d = new Date();
|
|
3464
|
+
let ano = d.getFullYear();
|
|
3465
|
+
let mes = d.getMonth() + 1;
|
|
3466
|
+
if (!this.modoAnual)
|
|
3467
|
+
this.disableNext = ano == this.ano && this.mes >= mes;
|
|
3468
|
+
else
|
|
3469
|
+
this.disableNext = ano == this.ano;
|
|
3470
|
+
}
|
|
3471
|
+
;
|
|
3472
|
+
raiseOnSelectionChanged() {
|
|
3473
|
+
let d = { ano: this._ano, mes: this._mes };
|
|
3474
|
+
this.changed.emit(d);
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
MonthYearPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3478
|
+
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"] }] });
|
|
3479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: MonthYearPickerComponent, decorators: [{
|
|
3474
3480
|
type: Component,
|
|
3475
|
-
args: [{ selector: '
|
|
3476
|
-
}], ctorParameters: function () { return [
|
|
3481
|
+
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"] }]
|
|
3482
|
+
}], ctorParameters: function () { return []; }, propDecorators: { anoChange: [{
|
|
3483
|
+
type: Output
|
|
3484
|
+
}], mesChange: [{
|
|
3485
|
+
type: Output
|
|
3486
|
+
}], changed: [{
|
|
3487
|
+
type: Output
|
|
3488
|
+
}], blockFuture: [{
|
|
3489
|
+
type: Input
|
|
3490
|
+
}], modoAnual: [{
|
|
3491
|
+
type: Input
|
|
3492
|
+
}], ano: [{
|
|
3493
|
+
type: Input
|
|
3494
|
+
}], mes: [{
|
|
3495
|
+
type: Input
|
|
3496
|
+
}] } });
|
|
3477
3497
|
|
|
3478
|
-
class
|
|
3479
|
-
constructor(
|
|
3480
|
-
this.
|
|
3481
|
-
this.
|
|
3482
|
-
this.
|
|
3483
|
-
this.
|
|
3484
|
-
this.
|
|
3485
|
-
this.
|
|
3486
|
-
this.
|
|
3487
|
-
this.
|
|
3488
|
-
this.setting = new SearchSetting();
|
|
3489
|
-
this.focus = new FocusService();
|
|
3490
|
-
this.allowAdd = auth.permissoes.adminProdutoGrupoAdd;
|
|
3491
|
-
this.allowExcluir = auth.permissoes.adminProdutoGrupoDelete;
|
|
3492
|
-
this.mobile = this.screenHelper.isMedium;
|
|
3493
|
-
this.screenHelper.changedMediumScreen.subscribe(x => this.mobile = x);
|
|
3498
|
+
class NumericPickerComponent {
|
|
3499
|
+
constructor() {
|
|
3500
|
+
this.valueChange = new EventEmitter();
|
|
3501
|
+
this.change = new EventEmitter();
|
|
3502
|
+
this._value = 0;
|
|
3503
|
+
this._max = 0;
|
|
3504
|
+
this._min = 0;
|
|
3505
|
+
this.text = '';
|
|
3506
|
+
this.disableNext = false;
|
|
3507
|
+
this.disableBack = false;
|
|
3494
3508
|
}
|
|
3495
|
-
|
|
3496
|
-
this.
|
|
3497
|
-
this.atualiza();
|
|
3509
|
+
get value() {
|
|
3510
|
+
return this._value;
|
|
3498
3511
|
}
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
this.focus.setFirst();
|
|
3504
|
-
}, 500);
|
|
3505
|
-
//this._focus.registerElementById("form-column");
|
|
3506
|
-
}
|
|
3507
|
-
else {
|
|
3508
|
-
this.focus.setFirst();
|
|
3509
|
-
}
|
|
3512
|
+
set value(val) {
|
|
3513
|
+
this._value = val;
|
|
3514
|
+
this.valueChange.emit(val);
|
|
3515
|
+
this.refreshUI();
|
|
3510
3516
|
}
|
|
3511
|
-
|
|
3512
|
-
this.
|
|
3517
|
+
get max() {
|
|
3518
|
+
return this._max;
|
|
3513
3519
|
}
|
|
3514
|
-
|
|
3515
|
-
this.
|
|
3516
|
-
this.
|
|
3517
|
-
.subscribe(r => {
|
|
3518
|
-
this.items = r;
|
|
3519
|
-
this.selectedItem = null;
|
|
3520
|
-
console.info(r);
|
|
3521
|
-
this.isBusy = false;
|
|
3522
|
-
}, err => {
|
|
3523
|
-
this.isBusy = false;
|
|
3524
|
-
this.notification.showHttpError(err);
|
|
3525
|
-
});
|
|
3520
|
+
set max(val) {
|
|
3521
|
+
this._max = val;
|
|
3522
|
+
this.refreshUI();
|
|
3526
3523
|
}
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
if (!item)
|
|
3530
|
-
return;
|
|
3531
|
-
confirmaExclusao(this.dialog, `Deseja prosseguir com a exclusão do grupo ${item.nome}?`, () => {
|
|
3532
|
-
this.isBusy = true;
|
|
3533
|
-
this.ws.deleteProdutoCategoriaCardapio(item.id)
|
|
3534
|
-
.subscribe(r => {
|
|
3535
|
-
this.notification.showMsg("O grupo foi excluído com sucesso.");
|
|
3536
|
-
this.items.remove(item);
|
|
3537
|
-
this.selectedItem = null;
|
|
3538
|
-
this.isBusy = false;
|
|
3539
|
-
}, err => {
|
|
3540
|
-
this.isBusy = false;
|
|
3541
|
-
this.notification.showMsg(err.error);
|
|
3542
|
-
});
|
|
3543
|
-
});
|
|
3524
|
+
get min() {
|
|
3525
|
+
return this._min;
|
|
3544
3526
|
}
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
if (this.mobile) {
|
|
3549
|
-
width = (window.innerWidth * 0.99) + 'px';
|
|
3550
|
-
//height = (window.innerHeight * 0.98) + 'px';
|
|
3551
|
-
}
|
|
3552
|
-
const dialog = this.dialog.open(ProdutoCategoriaCardapioAddDialogComponent, {
|
|
3553
|
-
width: width,
|
|
3554
|
-
//height: height,
|
|
3555
|
-
maxWidth: '100%',
|
|
3556
|
-
panelClass: 'dialog-p0',
|
|
3557
|
-
});
|
|
3558
|
-
dialog.afterClosed().subscribe(result => {
|
|
3559
|
-
if (result === undefined)
|
|
3560
|
-
return;
|
|
3561
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
3562
|
-
this.atualiza();
|
|
3563
|
-
});
|
|
3527
|
+
set min(val) {
|
|
3528
|
+
this._min = Number(val);
|
|
3529
|
+
this.refreshUI();
|
|
3564
3530
|
}
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3531
|
+
ngOnInit() {
|
|
3532
|
+
}
|
|
3533
|
+
onTextEdit(ev) {
|
|
3534
|
+
console.info(ev);
|
|
3535
|
+
const i = Number(ev.target.value);
|
|
3536
|
+
if (!this.valida(i))
|
|
3537
|
+
this.text = '' + this.value;
|
|
3538
|
+
else {
|
|
3539
|
+
this.value = i;
|
|
3540
|
+
this.raiseChange();
|
|
3541
|
+
this.refreshUI();
|
|
3571
3542
|
}
|
|
3572
|
-
const dialog = this.dialog.open(ProdutoCategoriaCardapioEditDialogComponent, {
|
|
3573
|
-
data: item,
|
|
3574
|
-
width: width,
|
|
3575
|
-
//height: height,
|
|
3576
|
-
maxWidth: '100%',
|
|
3577
|
-
panelClass: 'dialog-p0',
|
|
3578
|
-
});
|
|
3579
|
-
dialog.afterClosed().subscribe(result => {
|
|
3580
|
-
if (result !== true)
|
|
3581
|
-
return;
|
|
3582
|
-
this.notification.showMsg("Salvo com sucesso.");
|
|
3583
|
-
this.atualiza();
|
|
3584
|
-
});
|
|
3585
3543
|
}
|
|
3586
|
-
|
|
3587
|
-
|
|
3544
|
+
goBack() {
|
|
3545
|
+
const newVal = this.value - 1;
|
|
3546
|
+
if (!this.valida(newVal))
|
|
3588
3547
|
return;
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3548
|
+
this.value = newVal;
|
|
3549
|
+
this.raiseChange();
|
|
3550
|
+
}
|
|
3551
|
+
;
|
|
3552
|
+
goNext() {
|
|
3553
|
+
const newVal = this.value + 1;
|
|
3554
|
+
if (!this.valida(newVal))
|
|
3592
3555
|
return;
|
|
3593
|
-
|
|
3594
|
-
this.
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3556
|
+
this.value = newVal;
|
|
3557
|
+
this.raiseChange();
|
|
3558
|
+
}
|
|
3559
|
+
;
|
|
3560
|
+
refreshUI() {
|
|
3561
|
+
this.text = this.value === undefined ? '--' : '' + this.value;
|
|
3562
|
+
this.disableNext = this.max !== undefined && this.value === this.max;
|
|
3563
|
+
this.disableBack = this.min !== undefined && this.value === this.min;
|
|
3564
|
+
}
|
|
3565
|
+
valida(val) {
|
|
3566
|
+
if (isNaN(val))
|
|
3567
|
+
return false;
|
|
3568
|
+
if (this.max !== undefined && val > this.max)
|
|
3569
|
+
return false;
|
|
3570
|
+
if (this.min !== undefined && val < this.min)
|
|
3571
|
+
return false;
|
|
3572
|
+
return true;
|
|
3573
|
+
}
|
|
3574
|
+
raiseChange() {
|
|
3575
|
+
this.change.emit(this.value);
|
|
3603
3576
|
}
|
|
3604
3577
|
}
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type:
|
|
3578
|
+
NumericPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3579
|
+
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"] }] });
|
|
3580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NumericPickerComponent, decorators: [{
|
|
3608
3581
|
type: Component,
|
|
3609
|
-
args: [{ selector: '
|
|
3610
|
-
}], ctorParameters: function () { return [
|
|
3582
|
+
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"] }]
|
|
3583
|
+
}], ctorParameters: function () { return []; }, propDecorators: { valueChange: [{
|
|
3584
|
+
type: Output
|
|
3585
|
+
}], change: [{
|
|
3586
|
+
type: Output
|
|
3587
|
+
}], value: [{
|
|
3588
|
+
type: Input
|
|
3589
|
+
}], max: [{
|
|
3590
|
+
type: Input
|
|
3591
|
+
}], min: [{
|
|
3592
|
+
type: Input
|
|
3593
|
+
}] } });
|
|
3594
|
+
|
|
3595
|
+
class SafeHtmlPipe {
|
|
3596
|
+
constructor(sanitizer) {
|
|
3597
|
+
this.sanitizer = sanitizer;
|
|
3598
|
+
}
|
|
3599
|
+
transform(html) {
|
|
3600
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
3601
|
+
}
|
|
3602
|
+
}
|
|
3603
|
+
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 });
|
|
3604
|
+
SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
|
|
3605
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
3606
|
+
type: Pipe,
|
|
3607
|
+
args: [{
|
|
3608
|
+
name: 'safeHtml'
|
|
3609
|
+
}]
|
|
3610
|
+
}], ctorParameters: function () { return [{ type: i1$2.DomSanitizer }]; } });
|
|
3611
3611
|
|
|
3612
3612
|
Array.prototype.remove = function (item) {
|
|
3613
3613
|
const index = this.indexOf(item);
|
|
@@ -3946,5 +3946,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
3946
3946
|
* Generated bundle index. Do not edit.
|
|
3947
3947
|
*/
|
|
3948
3948
|
|
|
3949
|
-
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 };
|
|
3949
|
+
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 };
|
|
3950
3950
|
//# sourceMappingURL=oxpi-nglib.mjs.map
|