oxpi-nglib 1.0.23 → 1.0.26
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/models/entidades/operador.mjs +17 -0
- package/esm2020/lib/models/entidades/suite-base.mjs +2 -0
- package/esm2020/lib/providers/common-web-service.mjs +33 -1
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/oxpi-nglib.mjs +53 -5
- package/fesm2015/oxpi-nglib.mjs.map +1 -1
- package/fesm2020/oxpi-nglib.mjs +53 -5
- package/fesm2020/oxpi-nglib.mjs.map +1 -1
- package/lib/models/entidades/operador.d.ts +10 -0
- package/lib/models/entidades/suite-base.d.ts +10 -0
- package/lib/providers/common-web-service.d.ts +12 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
package/fesm2020/oxpi-nglib.mjs
CHANGED
|
@@ -46,7 +46,7 @@ function valNumberMin(v, min) {
|
|
|
46
46
|
return v <= min;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
function valida(item, focus) {
|
|
49
|
+
function valida$1(item, focus) {
|
|
50
50
|
if (valTextEmpty(item.nome)) {
|
|
51
51
|
focus.set('nome');
|
|
52
52
|
return 'Digite um nome válido.';
|
|
@@ -146,6 +146,8 @@ class CommonWebService {
|
|
|
146
146
|
this.PRODUTO_COMPOSICAO_BASE_URL = '';
|
|
147
147
|
this.FORNECEDOR_BASE_URL = '';
|
|
148
148
|
this.CLIENTE_BASE_URL = '';
|
|
149
|
+
this.OPERADOR_BASE_URL = '';
|
|
150
|
+
this.SUITE_BASE_URL = '';
|
|
149
151
|
}
|
|
150
152
|
setToken(token) {
|
|
151
153
|
this.token = token;
|
|
@@ -166,6 +168,8 @@ class CommonWebService {
|
|
|
166
168
|
this.MEDIA_PRODUTO_IMAGEM_URL = this.GERENCIAL_URL + 'GetProdutoImagem/';
|
|
167
169
|
this.FORNECEDOR_BASE_URL = this.FINANCAS_URL + 'Fornecedor/';
|
|
168
170
|
this.CLIENTE_BASE_URL = this.FINANCAS_URL + 'Cliente/';
|
|
171
|
+
this.OPERADOR_BASE_URL = this.ROOT_URL + "Operador/";
|
|
172
|
+
this.SUITE_BASE_URL = this.ROOT_URL + "SuiteBase/";
|
|
169
173
|
}
|
|
170
174
|
getFuncionarios() {
|
|
171
175
|
const url = this.FUNCIONARIO_BASE_URL;
|
|
@@ -361,6 +365,34 @@ class CommonWebService {
|
|
|
361
365
|
const url = this.FORNECEDOR_BASE_URL + id;
|
|
362
366
|
return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
|
|
363
367
|
}
|
|
368
|
+
getOperadores() {
|
|
369
|
+
const url = this.OPERADOR_BASE_URL;
|
|
370
|
+
return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
|
|
371
|
+
}
|
|
372
|
+
buscaOperador(setting) {
|
|
373
|
+
const url = this.OPERADOR_BASE_URL + CommonWebService.URL_PART_BUSCA;
|
|
374
|
+
return this.http.post(url, JSON.stringify(setting), this.getHttpOptions()).pipe(map(data => data));
|
|
375
|
+
}
|
|
376
|
+
getNextIdOperador() {
|
|
377
|
+
const url = this.OPERADOR_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
|
|
378
|
+
return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
|
|
379
|
+
}
|
|
380
|
+
saveOperador(s) {
|
|
381
|
+
const url = this.OPERADOR_BASE_URL;
|
|
382
|
+
return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
|
|
383
|
+
}
|
|
384
|
+
addOperador(p) {
|
|
385
|
+
const url = this.OPERADOR_BASE_URL;
|
|
386
|
+
return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
|
|
387
|
+
}
|
|
388
|
+
deleteOperador(id) {
|
|
389
|
+
const url = this.OPERADOR_BASE_URL + id;
|
|
390
|
+
return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
|
|
391
|
+
}
|
|
392
|
+
getSuites() {
|
|
393
|
+
const url = this.SUITE_BASE_URL;
|
|
394
|
+
return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
|
|
395
|
+
}
|
|
364
396
|
getHttpOptions(parameters) {
|
|
365
397
|
return {
|
|
366
398
|
headers: new HttpHeaders({
|
|
@@ -605,7 +637,7 @@ class FuncionarioAddDialogComponent {
|
|
|
605
637
|
salvar() {
|
|
606
638
|
if (this.model)
|
|
607
639
|
return;
|
|
608
|
-
const valMsg = valida(this.model, this.focus);
|
|
640
|
+
const valMsg = valida$1(this.model, this.focus);
|
|
609
641
|
if (valMsg) {
|
|
610
642
|
this.notification.showMsgError(valMsg);
|
|
611
643
|
return;
|
|
@@ -659,7 +691,7 @@ class FuncionarioEditDialogComponent {
|
|
|
659
691
|
salvar() {
|
|
660
692
|
if (!this.model)
|
|
661
693
|
return;
|
|
662
|
-
const valMsg = valida(this.model, this.focus);
|
|
694
|
+
const valMsg = valida$1(this.model, this.focus);
|
|
663
695
|
if (valMsg) {
|
|
664
696
|
this.notification.showMsgError(valMsg);
|
|
665
697
|
return;
|
|
@@ -1207,7 +1239,7 @@ class FuncionariosComponent {
|
|
|
1207
1239
|
const item = this.selectedItem;
|
|
1208
1240
|
if (!item)
|
|
1209
1241
|
return;
|
|
1210
|
-
const valMsg = valida(item, this.focus);
|
|
1242
|
+
const valMsg = valida$1(item, this.focus);
|
|
1211
1243
|
if (valMsg) {
|
|
1212
1244
|
this.notification.showMsgError(valMsg);
|
|
1213
1245
|
return;
|
|
@@ -4924,6 +4956,22 @@ function validaSetorEstoque(item, focus) {
|
|
|
4924
4956
|
return null;
|
|
4925
4957
|
}
|
|
4926
4958
|
|
|
4959
|
+
function valida(item, focus) {
|
|
4960
|
+
if (valTextEmpty(item.login)) {
|
|
4961
|
+
focus.set('login');
|
|
4962
|
+
return 'Digite um login válido.';
|
|
4963
|
+
}
|
|
4964
|
+
if (valTextEmpty(item.nome)) {
|
|
4965
|
+
focus.set('nome');
|
|
4966
|
+
return 'Digite um nome válido.';
|
|
4967
|
+
}
|
|
4968
|
+
if (valTextEmpty(item.senha)) {
|
|
4969
|
+
focus.set('senha');
|
|
4970
|
+
return 'Digite uma senha válido.';
|
|
4971
|
+
}
|
|
4972
|
+
return null;
|
|
4973
|
+
}
|
|
4974
|
+
|
|
4927
4975
|
class BusyState {
|
|
4928
4976
|
constructor() {
|
|
4929
4977
|
this.isBusy = false;
|
|
@@ -5121,5 +5169,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
5121
5169
|
* Generated bundle index. Do not edit.
|
|
5122
5170
|
*/
|
|
5123
5171
|
|
|
5124
|
-
export { AlertDialogComponent, AuthDataService, BusyIndicatorComponent, BusyState, CheckButtonComponent, ClientesAddDialogComponent, ClientesComponent, ClientesEditDialogComponent, ClientesFormComponent, CommonWebService, ConsumoProdutoSearchSetting, DuplicataSearchSetting, ExportFileService, FocusService, FornecedoresAddDialogComponent, FornecedoresComponent, FornecedoresEditDialogComponent, FornecedoresFormComponent, 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, ProdutoComposicaoAddDialogComponent, ProdutoComposicaoComponent, ProdutoEditDialogComponent, ProdutoFormComponent, ProdutoGrupoAddDialogComponent, ProdutoGrupoEditDialogComponent, ProdutoGrupoFormComponent, ProdutoGrupoSelecaoDialogComponent, ProdutoSearchSetting, ProdutoSelecaoDialogComponent, ProdutoSubgrupoAddDialogComponent, ProdutoSubgrupoEditDialogComponent, ProdutoSubgrupoSelecaoDialogComponent, ProdutosCategoriasCardapioComponent, ProdutosComponent, ProdutosGruposComponent, ProdutosNcmDialogComponent, ProdutosSubgruposComponent, RadioButtonGroupComponent, SafeHtmlPipe, ScreenHelperService, SearchMode, SearchSetting, SelecaoClienteDialogComponent, SelecaoFornecedorDialogComponent, SuitesIntervencoesSetting, confirmaExclusao, createProduct, fadeAnimation, lateralAnimation, menuLateralAnimation, printHtml, printTxt, selectText, valNumberEmpty, valNumberMin, valTextEmpty, valTextMax, validaPessoa, validaProduto, validaProdutoComposicao, validaProdutoGrupo, validaSetorEstoque };
|
|
5172
|
+
export { AlertDialogComponent, AuthDataService, BusyIndicatorComponent, BusyState, CheckButtonComponent, ClientesAddDialogComponent, ClientesComponent, ClientesEditDialogComponent, ClientesFormComponent, CommonWebService, ConsumoProdutoSearchSetting, DuplicataSearchSetting, ExportFileService, FocusService, FornecedoresAddDialogComponent, FornecedoresComponent, FornecedoresEditDialogComponent, FornecedoresFormComponent, 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, ProdutoComposicaoAddDialogComponent, ProdutoComposicaoComponent, ProdutoEditDialogComponent, ProdutoFormComponent, ProdutoGrupoAddDialogComponent, ProdutoGrupoEditDialogComponent, ProdutoGrupoFormComponent, ProdutoGrupoSelecaoDialogComponent, ProdutoSearchSetting, ProdutoSelecaoDialogComponent, ProdutoSubgrupoAddDialogComponent, ProdutoSubgrupoEditDialogComponent, ProdutoSubgrupoSelecaoDialogComponent, ProdutosCategoriasCardapioComponent, ProdutosComponent, ProdutosGruposComponent, ProdutosNcmDialogComponent, ProdutosSubgruposComponent, RadioButtonGroupComponent, SafeHtmlPipe, ScreenHelperService, SearchMode, SearchSetting, SelecaoClienteDialogComponent, SelecaoFornecedorDialogComponent, SuitesIntervencoesSetting, confirmaExclusao, createProduct, fadeAnimation, lateralAnimation, menuLateralAnimation, printHtml, printTxt, selectText, valNumberEmpty, valNumberMin, valTextEmpty, valTextMax, valida, validaPessoa, validaProduto, validaProdutoComposicao, validaProdutoGrupo, validaSetorEstoque };
|
|
5125
5173
|
//# sourceMappingURL=oxpi-nglib.mjs.map
|