oxpi-nglib 1.0.24 → 1.0.25
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/providers/common-web-service.mjs +27 -1
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/oxpi-nglib.mjs +47 -5
- package/fesm2015/oxpi-nglib.mjs.map +1 -1
- package/fesm2020/oxpi-nglib.mjs +47 -5
- package/fesm2020/oxpi-nglib.mjs.map +1 -1
- package/lib/models/entidades/operador.d.ts +10 -0
- package/lib/providers/common-web-service.d.ts +8 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -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,7 @@ 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 = '';
|
|
149
150
|
}
|
|
150
151
|
setToken(token) {
|
|
151
152
|
this.token = token;
|
|
@@ -166,6 +167,7 @@ class CommonWebService {
|
|
|
166
167
|
this.MEDIA_PRODUTO_IMAGEM_URL = this.GERENCIAL_URL + 'GetProdutoImagem/';
|
|
167
168
|
this.FORNECEDOR_BASE_URL = this.FINANCAS_URL + 'Fornecedor/';
|
|
168
169
|
this.CLIENTE_BASE_URL = this.FINANCAS_URL + 'Cliente/';
|
|
170
|
+
this.OPERADOR_BASE_URL = this.ROOT_URL + "Operador/";
|
|
169
171
|
}
|
|
170
172
|
getFuncionarios() {
|
|
171
173
|
const url = this.FUNCIONARIO_BASE_URL;
|
|
@@ -361,6 +363,30 @@ class CommonWebService {
|
|
|
361
363
|
const url = this.FORNECEDOR_BASE_URL + id;
|
|
362
364
|
return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
|
|
363
365
|
}
|
|
366
|
+
getOperadores() {
|
|
367
|
+
const url = this.OPERADOR_BASE_URL;
|
|
368
|
+
return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
|
|
369
|
+
}
|
|
370
|
+
buscaOperador(setting) {
|
|
371
|
+
const url = this.OPERADOR_BASE_URL + CommonWebService.URL_PART_BUSCA;
|
|
372
|
+
return this.http.post(url, JSON.stringify(setting), this.getHttpOptions()).pipe(map(data => data));
|
|
373
|
+
}
|
|
374
|
+
getNextIdOperador() {
|
|
375
|
+
const url = this.OPERADOR_BASE_URL + CommonWebService.URL_PART_NEXT_ID;
|
|
376
|
+
return this.http.get(url, this.getHttpOptions()).pipe(map(data => data));
|
|
377
|
+
}
|
|
378
|
+
saveOperador(s) {
|
|
379
|
+
const url = this.OPERADOR_BASE_URL;
|
|
380
|
+
return this.http.post(url, JSON.stringify(s), this.getHttpOptions()).pipe(map(data => data));
|
|
381
|
+
}
|
|
382
|
+
addOperador(p) {
|
|
383
|
+
const url = this.OPERADOR_BASE_URL;
|
|
384
|
+
return this.http.put(url, JSON.stringify(p), this.getHttpOptions()).pipe(map(data => data));
|
|
385
|
+
}
|
|
386
|
+
deleteOperador(id) {
|
|
387
|
+
const url = this.OPERADOR_BASE_URL + id;
|
|
388
|
+
return this.http.delete(url, this.getHttpOptions()).pipe(map(data => data));
|
|
389
|
+
}
|
|
364
390
|
getHttpOptions(parameters) {
|
|
365
391
|
return {
|
|
366
392
|
headers: new HttpHeaders({
|
|
@@ -605,7 +631,7 @@ class FuncionarioAddDialogComponent {
|
|
|
605
631
|
salvar() {
|
|
606
632
|
if (this.model)
|
|
607
633
|
return;
|
|
608
|
-
const valMsg = valida(this.model, this.focus);
|
|
634
|
+
const valMsg = valida$1(this.model, this.focus);
|
|
609
635
|
if (valMsg) {
|
|
610
636
|
this.notification.showMsgError(valMsg);
|
|
611
637
|
return;
|
|
@@ -659,7 +685,7 @@ class FuncionarioEditDialogComponent {
|
|
|
659
685
|
salvar() {
|
|
660
686
|
if (!this.model)
|
|
661
687
|
return;
|
|
662
|
-
const valMsg = valida(this.model, this.focus);
|
|
688
|
+
const valMsg = valida$1(this.model, this.focus);
|
|
663
689
|
if (valMsg) {
|
|
664
690
|
this.notification.showMsgError(valMsg);
|
|
665
691
|
return;
|
|
@@ -1207,7 +1233,7 @@ class FuncionariosComponent {
|
|
|
1207
1233
|
const item = this.selectedItem;
|
|
1208
1234
|
if (!item)
|
|
1209
1235
|
return;
|
|
1210
|
-
const valMsg = valida(item, this.focus);
|
|
1236
|
+
const valMsg = valida$1(item, this.focus);
|
|
1211
1237
|
if (valMsg) {
|
|
1212
1238
|
this.notification.showMsgError(valMsg);
|
|
1213
1239
|
return;
|
|
@@ -4924,6 +4950,22 @@ function validaSetorEstoque(item, focus) {
|
|
|
4924
4950
|
return null;
|
|
4925
4951
|
}
|
|
4926
4952
|
|
|
4953
|
+
function valida(item, focus) {
|
|
4954
|
+
if (valTextEmpty(item.login)) {
|
|
4955
|
+
focus.set('login');
|
|
4956
|
+
return 'Digite um login válido.';
|
|
4957
|
+
}
|
|
4958
|
+
if (valTextEmpty(item.nome)) {
|
|
4959
|
+
focus.set('nome');
|
|
4960
|
+
return 'Digite um nome válido.';
|
|
4961
|
+
}
|
|
4962
|
+
if (valTextEmpty(item.senha)) {
|
|
4963
|
+
focus.set('senha');
|
|
4964
|
+
return 'Digite uma senha válido.';
|
|
4965
|
+
}
|
|
4966
|
+
return null;
|
|
4967
|
+
}
|
|
4968
|
+
|
|
4927
4969
|
class BusyState {
|
|
4928
4970
|
constructor() {
|
|
4929
4971
|
this.isBusy = false;
|
|
@@ -5121,5 +5163,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
|
|
|
5121
5163
|
* Generated bundle index. Do not edit.
|
|
5122
5164
|
*/
|
|
5123
5165
|
|
|
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 };
|
|
5166
|
+
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
5167
|
//# sourceMappingURL=oxpi-nglib.mjs.map
|