@seniorsistemas/yms-integration 1.28.0 → 1.29.1

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.
Files changed (27) hide show
  1. package/bundles/seniorsistemas-yms-integration.umd.js +120 -1
  2. package/bundles/seniorsistemas-yms-integration.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-yms-integration.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-yms-integration.umd.min.js.map +1 -1
  5. package/esm2015/index.js +3 -1
  6. package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +6 -2
  7. package/esm2015/src/wms/components/document-list/document-list.component.js +88 -0
  8. package/esm2015/src/wms/components/document-list/document-list.module.js +32 -0
  9. package/esm2015/src/wms/entities/agenda/agenda-dto.js +1 -0
  10. package/esm2015/src/wms/entities/document/document.service.js +4 -1
  11. package/esm5/index.js +3 -1
  12. package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +6 -2
  13. package/esm5/src/wms/components/document-list/document-list.component.js +93 -0
  14. package/esm5/src/wms/components/document-list/document-list.module.js +33 -0
  15. package/esm5/src/wms/entities/agenda/agenda-dto.js +1 -0
  16. package/esm5/src/wms/entities/document/document.service.js +4 -1
  17. package/fesm2015/seniorsistemas-yms-integration.js +113 -2
  18. package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
  19. package/fesm5/seniorsistemas-yms-integration.js +119 -2
  20. package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
  21. package/index.d.ts +2 -0
  22. package/package.json +1 -1
  23. package/seniorsistemas-yms-integration.metadata.json +1 -1
  24. package/src/wms/components/document-list/document-list.component.d.ts +26 -0
  25. package/src/wms/components/document-list/document-list.module.d.ts +5 -0
  26. package/src/wms/entities/agenda/agenda-dto.d.ts +12 -0
  27. package/src/wms/entities/document/document.service.d.ts +1 -0
@@ -3187,6 +3187,9 @@
3187
3187
  DocumentService.prototype.findDocuments = function (input) {
3188
3188
  return this.http.post('yms_int/wms/queries/findDocuments', input);
3189
3189
  };
3190
+ DocumentService.prototype.getSystemIntegration = function () {
3191
+ return this.http.get('yms_int/wms/queries/getSystemIntegration');
3192
+ };
3190
3193
  DocumentService = __decorate([
3191
3194
  core.Injectable(),
3192
3195
  __metadata("design:paramtypes", [http.HttpClient, api.MessageService])
@@ -3666,7 +3669,11 @@
3666
3669
  var _this = this;
3667
3670
  var key = {
3668
3671
  documentKeys: [this.formGroup.get('key').value],
3669
- invoices: undefined,
3672
+ invoices: [{
3673
+ number: this.formGroup.get('invoiceNumber').value,
3674
+ serialNumber: this.formGroup.get('invoiceSerie').value,
3675
+ partnerDocument: this.formGroup.get('partnerDocument').value
3676
+ }],
3670
3677
  logistcUnitName: undefined,
3671
3678
  size: 0,
3672
3679
  offset: 0
@@ -3818,6 +3825,116 @@
3818
3825
  return WmsModule;
3819
3826
  }());
3820
3827
 
3828
+ var INFORMACAOES_ADICIONAIS_HEADER$1 = "Informações adicionais";
3829
+ var DocumentListDescritor = /** @class */ (function () {
3830
+ function DocumentListDescritor() {
3831
+ }
3832
+ DocumentListDescritor = __decorate([
3833
+ ymsRoutines.ControleCircuito({
3834
+ header: INFORMACAOES_ADICIONAIS_HEADER$1,
3835
+ name: 'yms.integracao.wms'
3836
+ })
3837
+ ], DocumentListDescritor);
3838
+ return DocumentListDescritor;
3839
+ }());
3840
+ var DocumentListComponent = /** @class */ (function (_super) {
3841
+ __extends(DocumentListComponent, _super);
3842
+ function DocumentListComponent(documentService) {
3843
+ var _this = _super.call(this) || this;
3844
+ _this.documentService = documentService;
3845
+ _this.getColumns = [];
3846
+ _this.documents = [];
3847
+ _this.labels = [];
3848
+ return _this;
3849
+ }
3850
+ DocumentListComponent.prototype.ngOnInit = function () {
3851
+ this.getSystemIntegration();
3852
+ };
3853
+ DocumentListComponent.prototype.getSystemIntegration = function () {
3854
+ var _this = this;
3855
+ this.documentService.getSystemIntegration().subscribe(function (system) {
3856
+ _this.wmsSystem = system.system;
3857
+ _this.getDocumentBySchedulingId();
3858
+ });
3859
+ };
3860
+ DocumentListComponent.prototype.getDocumentBySchedulingId = function () {
3861
+ var _this = this;
3862
+ this.documentService.list({
3863
+ filterQuery: "schedulingId eq '" + this.agenda.id + "'"
3864
+ }).subscribe(function (contents) {
3865
+ if (contents.totalElements > 0) {
3866
+ _this.documents = contents.contents;
3867
+ _this.getColumns = _this.getColumnLabels();
3868
+ }
3869
+ });
3870
+ };
3871
+ DocumentListComponent.prototype.getColumnLabels = function () {
3872
+ if (this.isWmsWIS()) {
3873
+ return __spread(this.getLabelsInvoice());
3874
+ }
3875
+ if (this.isWmsSeniorConnect()) {
3876
+ return [
3877
+ { label: 'yms.int.wms_purchaseOrder' },
3878
+ { label: 'yms.int.wms_register_document_partner_name' },
3879
+ { label: 'yms.int.wms_register_document_partner_document' }
3880
+ ];
3881
+ }
3882
+ return __spread([
3883
+ { label: 'yms.int.wms_register_document_invoice_key' }
3884
+ ], this.getLabelsInvoice());
3885
+ };
3886
+ DocumentListComponent.prototype.isWmsSeniorConnect = function () {
3887
+ return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
3888
+ };
3889
+ DocumentListComponent.prototype.isWmsWIS = function () {
3890
+ return this.wmsSystem === WmsSystem.WIS;
3891
+ };
3892
+ DocumentListComponent.prototype.getLabelsInvoice = function () {
3893
+ return [
3894
+ { label: 'yms.int.wms_register_document_invoice_number' },
3895
+ { label: 'yms.int.wms_register_document_invoice_serial_number' }
3896
+ ];
3897
+ };
3898
+ __decorate([
3899
+ core.Input(),
3900
+ __metadata("design:type", Object)
3901
+ ], DocumentListComponent.prototype, "agenda", void 0);
3902
+ __decorate([
3903
+ core.Input(),
3904
+ __metadata("design:type", String)
3905
+ ], DocumentListComponent.prototype, "wmsSystem", void 0);
3906
+ DocumentListComponent = __decorate([
3907
+ core.Component({
3908
+ template: "<div> \n <p-table [value]=\"documents\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th id=\"columns\" *ngFor=\"let column of getColumns\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ column.label | translate }}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template let-rowData pTemplate=\"body\">\n <tr *ngIf=\"isWmsWIS()\">\n <td id=\"\">{{rowData?.invoiceNumber}}</td>\n <td id=\"\">{{rowData?.invoiceSerialNumber}}</td>\n </tr>\n <tr *ngIf=\"isWmsSeniorConnect()\">\n <td id=\"\">{{rowData?.key}}</td>\n <td id=\"\">{{rowData?.partnerName}}</td>\n <td id=\"\">{{rowData?.partnerDocument}}</td>\n </tr>\n <tr *ngIf=\"!isWmsWIS() && !isWmsSeniorConnect()\">\n <td id=\"\">{{rowData?.invoiceKey}}</td>\n <td id=\"\">{{rowData?.invoiceNumber}}</td>\n <td id=\"\">{{rowData?.invoiceSerialNumber}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>"
3909
+ }),
3910
+ __metadata("design:paramtypes", [DocumentService])
3911
+ ], DocumentListComponent);
3912
+ return DocumentListComponent;
3913
+ }(DocumentListDescritor));
3914
+
3915
+ var DocumentListModule = /** @class */ (function () {
3916
+ function DocumentListModule(dispatcher) {
3917
+ this.dispatcher = dispatcher;
3918
+ this.dispatcher.dispatch(DocumentListComponent);
3919
+ }
3920
+ DocumentListModule = __decorate([
3921
+ core.NgModule({
3922
+ imports: [
3923
+ common.CommonModule,
3924
+ core$1.TranslateModule,
3925
+ angularComponents.LoadingStateModule,
3926
+ table.TableModule
3927
+ ],
3928
+ declarations: [DocumentListComponent],
3929
+ entryComponents: [DocumentListComponent],
3930
+ exports: [DocumentListComponent],
3931
+ providers: [DocumentService]
3932
+ }),
3933
+ __metadata("design:paramtypes", [ymsRoutines.IntegrationDispatcher])
3934
+ ], DocumentListModule);
3935
+ return DocumentListModule;
3936
+ }());
3937
+
3821
3938
  var EntityService$1 = /** @class */ (function () {
3822
3939
  function EntityService(http, messageService, entityUrl, actionsUrl) {
3823
3940
  this.http = http;
@@ -14027,6 +14144,8 @@
14027
14144
  exports.CoreModule = CoreModule;
14028
14145
  exports.DockModule = DockModule;
14029
14146
  exports.DockService = DockService;
14147
+ exports.DocumentListComponent = DocumentListComponent;
14148
+ exports.DocumentListModule = DocumentListModule;
14030
14149
  exports.ERP_ENVIRONMENT = ERP_ENVIRONMENT;
14031
14150
  exports.ERP_SENIOR_HEADER = ERP_SENIOR_HEADER;
14032
14151
  exports.EmpresaModule = EmpresaModule;