@senior-agronegocio/angular-components 1.0.4 → 1.0.5
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/components/agro-workspace/agro-lookup/agro-lookup.component.d.ts +19 -0
- package/components/agro-workspace/agro-workspace-switch.interface.d.ts +5 -0
- package/components/agro-workspace/agro-workspace-switch.service.d.ts +46 -0
- package/components/agro-workspace/agro-workspace-switch.service.interface.d.ts +19 -0
- package/components/agro-workspace/agro-workspace.component.d.ts +36 -0
- package/components/agro-workspace/agro-workspace.model.d.ts +6 -0
- package/components/agro-workspace/agro-workspace.module.d.ts +17 -0
- package/components/agro-workspace/e070emp/e070emp-dto.d.ts +10 -0
- package/components/agro-workspace/e070emp/e070emp.d.ts +13 -0
- package/components/agro-workspace/e070emp/e070emp.module.d.ts +7 -0
- package/components/agro-workspace/e070emp/e070emp.service.d.ts +15 -0
- package/components/agro-workspace/e070fil/e070fil-dto.d.ts +14 -0
- package/components/agro-workspace/e070fil/e070fil.d.ts +17 -0
- package/components/agro-workspace/e070fil/e070fil.module.d.ts +7 -0
- package/components/agro-workspace/e070fil/e070fil.service.d.ts +19 -0
- package/components/agro-workspace/index.d.ts +6 -0
- package/components/index.d.ts +2 -0
- package/components/modal-beauty-events/index.d.ts +4 -0
- package/components/modal-beauty-events/modal-beauty-events-config.d.ts +15 -0
- package/components/modal-beauty-events/modal-beauty-events.component.d.ts +29 -0
- package/components/modal-beauty-events/modal-beauty-events.service.d.ts +16 -0
- package/components/producer-list-modal/index.d.ts +2 -0
- package/components/producer-list-modal/producer-list-modal.component.d.ts +7 -5
- package/components/producer-list-modal/producer-list-modal.module.d.ts +1 -3
- package/components/producer-list-modal/producer-list-modal.service.d.ts +42 -0
- package/esm2022/components/agro-workspace/agro-lookup/agro-lookup.component.mjs +62 -0
- package/esm2022/components/agro-workspace/agro-workspace-switch.interface.mjs +2 -0
- package/esm2022/components/agro-workspace/agro-workspace-switch.service.interface.mjs +2 -0
- package/esm2022/components/agro-workspace/agro-workspace-switch.service.mjs +195 -0
- package/esm2022/components/agro-workspace/agro-workspace.component.mjs +152 -0
- package/esm2022/components/agro-workspace/agro-workspace.model.mjs +2 -0
- package/esm2022/components/agro-workspace/agro-workspace.module.mjs +55 -0
- package/esm2022/components/agro-workspace/e070emp/e070emp-dto.mjs +2 -0
- package/esm2022/components/agro-workspace/e070emp/e070emp.mjs +37 -0
- package/esm2022/components/agro-workspace/e070emp/e070emp.module.mjs +34 -0
- package/esm2022/components/agro-workspace/e070emp/e070emp.service.mjs +30 -0
- package/esm2022/components/agro-workspace/e070fil/e070fil-dto.mjs +2 -0
- package/esm2022/components/agro-workspace/e070fil/e070fil.mjs +44 -0
- package/esm2022/components/agro-workspace/e070fil/e070fil.module.mjs +49 -0
- package/esm2022/components/agro-workspace/e070fil/e070fil.service.mjs +36 -0
- package/esm2022/components/agro-workspace/index.mjs +4 -0
- package/esm2022/components/cancel-event-dialog/cancel-event-dialog.component.mjs +1 -1
- package/esm2022/components/event-control-board/event-control-board.component.mjs +1 -1
- package/esm2022/components/financial-title-table/financial-title-table.component.mjs +1 -1
- package/esm2022/components/index.mjs +3 -1
- package/esm2022/components/modal-beauty-events/index.mjs +3 -0
- package/esm2022/components/modal-beauty-events/modal-beauty-events-config.mjs +2 -0
- package/esm2022/components/modal-beauty-events/modal-beauty-events.component.mjs +47 -0
- package/esm2022/components/modal-beauty-events/modal-beauty-events.service.mjs +31 -0
- package/esm2022/components/modal-invoice-pj/for-contracts/modal-invoice-pj-for-contracts.component.mjs +1 -1
- package/esm2022/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.component.mjs +1 -1
- package/esm2022/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.component.mjs +1 -1
- package/esm2022/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.component.mjs +1 -1
- package/esm2022/components/producer-list-modal/index.mjs +2 -1
- package/esm2022/components/producer-list-modal/producer-list-modal.component.mjs +31 -27
- package/esm2022/components/producer-list-modal/producer-list-modal.module.mjs +4 -7
- package/esm2022/components/producer-list-modal/producer-list-modal.service.mjs +53 -0
- package/fesm2022/senior-agronegocio-angular-components.mjs +735 -61
- package/fesm2022/senior-agronegocio-angular-components.mjs.map +1 -1
- package/package.json +17 -11
|
@@ -2,13 +2,13 @@ import moment from 'moment';
|
|
|
2
2
|
import * as i6 from '@angular/common';
|
|
3
3
|
import { CommonModule, registerLocaleData, DecimalPipe, DatePipe, CurrencyPipe } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { NgModule, EventEmitter, Component, Input, Output, Injectable, Pipe, LOCALE_ID, Directive, ViewChild, ChangeDetectionStrategy, InjectionToken } from '@angular/core';
|
|
5
|
+
import { NgModule, EventEmitter, Component, Input, Output, Injectable, Pipe, LOCALE_ID, Directive, ViewChild, inject, ChangeDetectorRef, ChangeDetectionStrategy, InjectionToken } from '@angular/core';
|
|
6
6
|
import * as i11 from '@angular/forms';
|
|
7
7
|
import { FormsModule, ReactiveFormsModule, Validators, FormControl, FormGroup, FormArray } from '@angular/forms';
|
|
8
8
|
import * as i18 from '@seniorsistemas/angular-components/badge';
|
|
9
9
|
import { BadgeModule } from '@seniorsistemas/angular-components/badge';
|
|
10
10
|
import * as i3 from '@seniorsistemas/angular-components/button';
|
|
11
|
-
import { ButtonModule } from '@seniorsistemas/angular-components/button';
|
|
11
|
+
import { ButtonModule, ButtonComponent } from '@seniorsistemas/angular-components/button';
|
|
12
12
|
import * as i15$1 from '@seniorsistemas/angular-components/control-errors';
|
|
13
13
|
import { ControlErrorsModule } from '@seniorsistemas/angular-components/control-errors';
|
|
14
14
|
import * as i6$1 from '@seniorsistemas/angular-components/dynamic-form';
|
|
@@ -49,21 +49,22 @@ import { TooltipModule } from 'primeng/tooltip';
|
|
|
49
49
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
50
50
|
import localePt from '@angular/common/locales/pt';
|
|
51
51
|
import { StepState as StepState$1 } from '@seniorsistemas/angular-components/stepper';
|
|
52
|
-
import { of, Subject, BehaviorSubject, throwError, scheduled, asyncScheduler, timer, EMPTY } from 'rxjs';
|
|
52
|
+
import { of, Subject, BehaviorSubject, throwError, scheduled, asyncScheduler, timer, EMPTY, filter as filter$1, firstValueFrom } from 'rxjs';
|
|
53
53
|
import { filter, take, finalize, switchMap, map, catchError, takeUntil, concatMap, tap, scan, defaultIfEmpty, debounceTime } from 'rxjs/operators';
|
|
54
54
|
import * as i2$1 from 'primeng/dynamicdialog';
|
|
55
55
|
import { Client, FrameImpl } from '@stomp/stompjs';
|
|
56
56
|
import SockJS from 'sockjs-client';
|
|
57
57
|
import { get } from 'js-cookie';
|
|
58
58
|
import * as i1 from '@angular/common/http';
|
|
59
|
-
import { HttpParams, HttpClientModule } from '@angular/common/http';
|
|
59
|
+
import { HttpParams, HttpClientModule, HttpClient } from '@angular/common/http';
|
|
60
60
|
import { user } from '@seniorsistemas/senior-platform-data';
|
|
61
61
|
import * as i12 from 'primeng/dialog';
|
|
62
62
|
import { DialogModule } from 'primeng/dialog';
|
|
63
63
|
import * as i3$1 from '@seniorsistemas/angular-components/locale';
|
|
64
64
|
import { LocaleModule, LocalizedDatePipe } from '@seniorsistemas/angular-components/locale';
|
|
65
65
|
import { FieldsetModule as FieldsetModule$1 } from '@seniorsistemas/angular-components/fieldset';
|
|
66
|
-
import
|
|
66
|
+
import * as i1$2 from '@seniorsistemas/angular-components/dialog';
|
|
67
|
+
import { DialogService, ActiveDialog, DialogComponent } from '@seniorsistemas/angular-components/dialog';
|
|
67
68
|
import * as i8$1 from '@seniorsistemas/angular-components/bignumber-input';
|
|
68
69
|
import { BignumberInputModule } from '@seniorsistemas/angular-components/bignumber-input';
|
|
69
70
|
import * as i18$1 from '@seniorsistemas/angular-components/table-header';
|
|
@@ -73,6 +74,11 @@ import { MessagesModule } from 'primeng/messages';
|
|
|
73
74
|
import * as i13$2 from '@seniorsistemas/angular-components/structure';
|
|
74
75
|
import { StructureModule } from '@seniorsistemas/angular-components/structure';
|
|
75
76
|
import { ObserversModule } from '@angular/cdk/observers';
|
|
77
|
+
import * as i2$3 from '@seniorsistemas/angular-components/template';
|
|
78
|
+
import { TemplateModule } from '@seniorsistemas/angular-components/template';
|
|
79
|
+
import { PanelModule as PanelModule$1 } from '@seniorsistemas/angular-components/panel';
|
|
80
|
+
import * as i4 from '@seniorsistemas/angular-components/workspace-switch';
|
|
81
|
+
import { WorkspaceSwitchModule } from '@seniorsistemas/angular-components/workspace-switch';
|
|
76
82
|
|
|
77
83
|
var AgroEntityStatus;
|
|
78
84
|
(function (AgroEntityStatus) {
|
|
@@ -4580,7 +4586,7 @@ class CancelEventDialogComponent {
|
|
|
4580
4586
|
this.ref.close();
|
|
4581
4587
|
}
|
|
4582
4588
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CancelEventDialogComponent, deps: [{ token: i11.FormBuilder }, { token: i2$1.DynamicDialogConfig }, { token: i2$1.DynamicDialogRef }, { token: LibTranslationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4583
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CancelEventDialogComponent, selector: "s-cancel-event-dialog", inputs: { cancelEventDialogConfig: "cancelEventDialogConfig" }, ngImport: i0, template: "<div\r\n class=\"content\"\r\n *sLoadingState=\"loading\"\r\n>\r\n <div class=\"top\">\r\n <div\r\n *ngIf=\"cancelEventDialogConfig.message\"\r\n class=\"message-container\"\r\n >\r\n <span>{{ cancelEventDialogConfig.message }}</span>\r\n </div>\r\n <div\r\n class=\"form-container\"\r\n *ngIf=\"cancelEventDialogConfig.withReason\"\r\n >\r\n <s-dynamic-form\r\n [fields]=\"formFields\"\r\n [form]=\"formGroup\"\r\n [errorMessages]=\"translations\"\r\n >\r\n </s-dynamic-form>\r\n </div>\r\n </div>\r\n <div class=\"footer\">\r\n <s-button\r\n [priority]=\"'secondary'\"\r\n (keydown.enter)=\"handleCancelClick()\"\r\n label=\"{{ 'agro.angular_components.no' | libTranslate }}\"\r\n (click)=\"handleCancelClick()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"'primary'\"\r\n (keydown.enter)=\"handleConfirmClick()\"\r\n label=\"{{ 'agro.angular_components.yes' | libTranslate }}\"\r\n (click)=\"handleConfirmClick()\"\r\n ></s-button>\r\n </div>\r\n</div>\r\n", styles: [".message-container{padding:.5rem}.footer{display:flex;width:100%;flex-direction:row;justify-content:flex-end;padding:.5rem}.content{display:flex;flex-direction:column;height:100%;box-sizing:border-box}.content.loading{min-height:150px;display:flex;width:100%}.content .top{display:flex;flex-direction:column;justify-content:space-between}@media screen and (max-width: 760px){.content{justify-content:space-between}.content .top{display:flex;flex-direction:column;justify-content:space-between}}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"
|
|
4589
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CancelEventDialogComponent, selector: "s-cancel-event-dialog", inputs: { cancelEventDialogConfig: "cancelEventDialogConfig" }, ngImport: i0, template: "<div\r\n class=\"content\"\r\n *sLoadingState=\"loading\"\r\n>\r\n <div class=\"top\">\r\n <div\r\n *ngIf=\"cancelEventDialogConfig.message\"\r\n class=\"message-container\"\r\n >\r\n <span>{{ cancelEventDialogConfig.message }}</span>\r\n </div>\r\n <div\r\n class=\"form-container\"\r\n *ngIf=\"cancelEventDialogConfig.withReason\"\r\n >\r\n <s-dynamic-form\r\n [fields]=\"formFields\"\r\n [form]=\"formGroup\"\r\n [errorMessages]=\"translations\"\r\n >\r\n </s-dynamic-form>\r\n </div>\r\n </div>\r\n <div class=\"footer\">\r\n <s-button\r\n [priority]=\"'secondary'\"\r\n (keydown.enter)=\"handleCancelClick()\"\r\n label=\"{{ 'agro.angular_components.no' | libTranslate }}\"\r\n (click)=\"handleCancelClick()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"'primary'\"\r\n (keydown.enter)=\"handleConfirmClick()\"\r\n label=\"{{ 'agro.angular_components.yes' | libTranslate }}\"\r\n (click)=\"handleConfirmClick()\"\r\n ></s-button>\r\n </div>\r\n</div>\r\n", styles: [".message-container{padding:.5rem}.footer{display:flex;width:100%;flex-direction:row;justify-content:flex-end;padding:.5rem}.content{display:flex;flex-direction:column;height:100%;box-sizing:border-box}.content.loading{min-height:150px;display:flex;width:100%}.content .top{display:flex;flex-direction:column;justify-content:space-between}@media screen and (max-width: 760px){.content{justify-content:space-between}.content .top{display:flex;flex-direction:column;justify-content:space-between}}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: i6$1.DynamicFormComponent, selector: "s-dynamic-form", inputs: ["id", "configs", "fields", "form", "errorMessages"] }, { kind: "directive", type: i14.LoadingStateDirective, selector: "[sLoadingState]", inputs: ["sLoadingState"] }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
4584
4590
|
}
|
|
4585
4591
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CancelEventDialogComponent, decorators: [{
|
|
4586
4592
|
type: Component,
|
|
@@ -6088,7 +6094,7 @@ class EventControlBoardComponent {
|
|
|
6088
6094
|
this.showSidebar = false;
|
|
6089
6095
|
}
|
|
6090
6096
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EventControlBoardComponent, deps: [{ token: LibTranslationService }, { token: i11.FormBuilder }, { token: WebsocketService }, { token: EventControlService }, { token: PaginatorStorageService }, { token: EventControlItemService }, { token: ProducerInvoiceService }, { token: i2$2.MessageService }, { token: i2$1.DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6091
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EventControlBoardComponent, selector: "s-event-control-board", inputs: { company: "company", branch: "branch", controlCode: "controlCode", eventOrigin: "eventOrigin", eventStatus: "eventStatus", externalId: "externalId", createdDate: "createdDate", standalone: "standalone", showCancelButton: "showCancelButton", cancelEventDialogConfig: "cancelEventDialogConfig" }, outputs: { processedEvent: "processedEvent" }, providers: [{ provide: LOCALE_ID, useValue: "pt-BR" }], usesOnChanges: true, ngImport: i0, template: "<ng-container *sLoadingState=\"gridLoading\">\r\n <p-panel>\r\n <p-header>\r\n {{ \"agro.angular_components.event_control_header\" | libTranslate }}\r\n </p-header>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12\">\r\n <s-button\r\n id=\"refresh-button\"\r\n [priority]=\"ButtonPriority.Primary\"\r\n iconClass=\"fa fa-refresh\"\r\n [label]=\"'agro.angular_components.refresh' | libTranslate\"\r\n (click)=\"onSearch()\"\r\n >\r\n </s-button>\r\n <s-button\r\n *ngIf=\"standalone && showCancelButton\"\r\n id=\"cancel-button-agro-events-lib\"\r\n iconClass=\"fa fa-times\"\r\n [label]=\"'agro.angular_components.cancel' | libTranslate\"\r\n (click)=\"openCancelModal()\"\r\n >\r\n </s-button>\r\n </div>\r\n </div>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 ui-md-12\" *ngIf=\"!gridData || gridData?.length === 0\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.nothing_found' | libTranslate }}\"\r\n [showPrimaryAction]=\"false\"\r\n description=\"{{ 'agro.angular_components.table_empty_description' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </div>\r\n <ng-container *ngIf=\"gridData.length > 0\">\r\n <p-table\r\n stylelass=\"custom-table\"\r\n #eventControlTable\r\n [value]=\"gridDataResolved\"\r\n [columns]=\"gridColumns\"\r\n dataKey=\"id\"\r\n [lazy]=\"true\"\r\n [scrollable]=\"true\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"!standalone\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [rows]=\"10\"\r\n [responsive]=\"true\"\r\n (onLazyLoad)=\"onGridChange($event)\"\r\n [sortOrder]=\"getSortOrder()\"\r\n [first]=\"getRowIndex()\"\r\n [lazyLoadOnInit]=\"false\"\r\n sortMode=\"multiple\"\r\n [rows]=\"getPageSize()\"\r\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <ng-container *ngIf=\"!standalone\">\r\n <th *ngFor=\"let col of columns\" class=\"ui-lg-1 ui-md-1\" [pSortableColumn]=\"col.field\" scope=\"col\">\r\n <div class=\"senior-header\">\r\n <span class=\"senior-header-title\">{{ col.header }}</span>\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <th class=\"ui-lg-8 ui-md-7\" scope=\"col\">\r\n {{ \"agro.angular_components.panel_title_events_events\" | libTranslate }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr>\r\n <ng-container *ngIf=\"!standalone\">\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n {{ rowData.e070emp?.nomEmp }}\r\n </td>\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n {{ rowData.e070fil?.nomFil }}\r\n </td>\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n <ng-container [ngSwitch]=\"rowData.eventOrigin\">\r\n <span *ngSwitchCase=\"'BALANCE_ENTRY_CONTROL'\">\r\n {{ \"agro.angular_components.balance_entry_control_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'TICKET'\">\r\n {{ \"agro.angular_components.ticket_maintenance_header\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'TRANSFER'\">\r\n {{ \"agro.angular_components.transfer_origin_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'INVOICE'\">\r\n {{ \"agro.angular_components.CREATE_INVOICE_FIXATION\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'CHANGE_REQUEST'\">\r\n {{ \"agro.angular_components.change_request_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'FIXATION'\">\r\n {{ \"agro.angular_components.fixation_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'CANCEL_FIXATION'\">\r\n {{ \"agro.angular_components.cancel_fixation_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'TRANSFER_CANCELLATION'\">\r\n {{ \"agro.angular_components.transfer_cancellation_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'AGRONOMIC_PRESCRIPTION'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'PRESCRIPTION_INTEGRATION_HUB'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n <td class=\"ui-lg-1 ui ui-md-1\">\r\n {{ rowData.controlCode || \"\" }}\r\n </td>\r\n </ng-container>\r\n <td class=\"ui-lg-8 ui-md-7\">\r\n <ng-container *ngFor=\"let group of rowData.groups\">\r\n <s-event-steps\r\n [steps]=\"group.steps || []\"\r\n [activeIndex]=\"group.activeIndex\"\r\n (stepSelected)=\"stepSelected($event)\"\r\n >\r\n </s-event-steps>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template *ngIf=\"!standalone\" pTemplate=\"paginatorright\" class=\"custom-table\">\r\n <span>\r\n {{ \"agro.angular_components.registers_found\" | libTranslate: { total: gridTotalRecords } }}\r\n </span>\r\n </ng-template>\r\n </p-table>\r\n </ng-container>\r\n </div>\r\n </p-panel>\r\n</ng-container>\r\n<s-sidebar\r\n [visible]=\"showSidebar\"\r\n (visibleChange)=\"closeSidebar()\"\r\n header=\"{{ 'agro.angular_components.event_details_header' | libTranslate }}\"\r\n>\r\n <div class=\"ui-fluid\">\r\n <p-fieldset [legend]=\"sidebarTitle\" [toggleable]=\"false\">\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.event_origin_label\" | libTranslate }}</strong></span\r\n >\r\n <ng-container [ngSwitch]=\"selectedStep?.eventType\">\r\n <p *ngSwitchCase=\"'BALANCE_ENTRY_CONTROL'\">\r\n {{ \"agro.angular_components.balance_entry_control_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TICKET'\">\r\n {{ \"agro.angular_components.ticket_maintenance_header\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TRANSFER'\">\r\n {{ \"agro.angular_components.transfer_origin_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'INVOICE'\">\r\n {{ \"agro.angular_components.CREATE_INVOICE_FIXATION\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'CHANGE_REQUEST'\">\r\n {{ \"agro.angular_components.change_request_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'FIXATION'\">\r\n {{ \"agro.angular_components.fixation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'CANCEL_FIXATION'\">\r\n {{ \"agro.angular_components.cancel_fixation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TRANSFER_CANCELLATION'\">\r\n {{ \"agro.angular_components.transfer_cancellation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'AGRONOMIC_PRESCRIPTION'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'PRESCRIPTION_INTEGRATION_HUB'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"producerInvoice?.producerBalanceEntryControl.producer.e001pes.nomPes\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.supplier\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ producerInvoice?.producerBalanceEntryControl.producer.e001pes.nomPes }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"producerInvoice?.producerBalanceEntryControl.ruralEstate.name\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.rural_estate\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ producerInvoice?.producerBalanceEntryControl.ruralEstate.name }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"selectedStep?.controlCode\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.control_code\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.controlCode }}</p>\r\n </div>\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.status_label\" | libTranslate }}</strong></span\r\n >\r\n <ng-container [ngSwitch]=\"selectedStep?.item.status\">\r\n <p *ngSwitchCase=\"'SUCCESS'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Green\"\r\n text=\"{{ 'agro.angular_components.panel_title_events_completed_successfully' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'PROCESSING'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Orange\"\r\n text=\"{{ 'agro.angular_components.processing' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'FAILED'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Red\"\r\n text=\"{{ 'agro.angular_components.panel_title_events_ended_with_error' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'PENDING'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Gray\"\r\n text=\"{{ 'agro.angular_components.pending' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.last_update_date\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.item.lastModifiedDate | date: \"dd/MM/yyyy HH:mm:ss\" }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"selectedStep?.item.status === 'FAILED'\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.event_error_message\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.item.message || \"-\" }}</p>\r\n </div>\r\n </div>\r\n </p-fieldset>\r\n </div>\r\n <div class=\"s-footer\">\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 width-fit\">\r\n <s-button\r\n id=\"sidebar-close-button\"\r\n [priority]=\"ButtonPriority.Primary\"\r\n [label]=\"'agro.angular_components.events_close' | libTranslate\"\r\n [auxiliary]=\"false\"\r\n (click)=\"closeSidebar()\"\r\n >\r\n </s-button>\r\n <s-button\r\n *ngIf=\"showReprocessButton\"\r\n id=\"sidebar-reprocess-button\"\r\n [priority]=\"ButtonPriority.Secondary\"\r\n iconClass=\"fa fa-refresh\"\r\n [label]=\"'agro.angular_components.reprocess_event' | libTranslate\"\r\n [auxiliary]=\"false\"\r\n (click)=\"openModal()\"\r\n >\r\n </s-button>\r\n </div>\r\n </div>\r\n </div>\r\n</s-sidebar>\r\n\r\n<p-dialog [header]=\"'agro.angular_components.event_modal_title' | libTranslate\" [(visible)]=\"displayModal\" [modal]=\"true\" class=\"dialog\">\r\n <div class=\"event-modal-text\">{{ \"agro.angular_components.event_modal\" | libTranslate }}</div>\r\n <p-footer>\r\n <div class=\"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix\">\r\n <button\r\n id=\"modal-yes\"\r\n type=\"button\"\r\n pButton\r\n icon=\"fa fa-check\"\r\n (click)=\"confirmModal()\"\r\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\"\r\n >\r\n {{ 'agro.angular_components.yes' | libTranslate }}\r\n </button>\r\n <button\r\n id=\"modal-no\"\r\n type=\"button\"\r\n pButton\r\n icon=\"fa fa-close\"\r\n (click)=\"cancelModal()\"\r\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\"\r\n >\r\n {{ 'agro.angular_components.no' | libTranslate }}\r\n </button>\r\n </div>\r\n </p-footer>\r\n</p-dialog>\r\n", styles: [".frozen{border-left:2px solid #dddddd}.dialog{width:\"600px\";height:\"300px\";z-index:100000}:host ::ng-deep #cancel-button-agro-events-lib{background-color:#9c3a3a!important;border-color:#9c3a3a!important}:host ::ng-deep #cancel-button-agro-events-lib:hover{background-color:#642525!important}\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: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "component", type: i13.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i2$2.Header, selector: "p-header" }, { kind: "component", type: i2$2.Footer, selector: "p-footer" }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i14$1.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i16.SidebarComponent, selector: "s-sidebar", inputs: ["visible", "closable", "dismissible", "closeOnEscape", "header", "largeSized", "cache", "registerConfirmClose"], outputs: ["visibleChange"] }, { kind: "directive", type: i14.LoadingStateDirective, selector: "[sLoadingState]", inputs: ["sLoadingState"] }, { kind: "component", type: i18.BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign", "enableTruncateText"], outputs: ["selected"] }, { kind: "component", type: EventStepsComponent, selector: "s-event-steps", inputs: ["id", "steps", "activeIndex"], outputs: ["stepSelected"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: i6.DatePipe, name: "date" }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
6097
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EventControlBoardComponent, selector: "s-event-control-board", inputs: { company: "company", branch: "branch", controlCode: "controlCode", eventOrigin: "eventOrigin", eventStatus: "eventStatus", externalId: "externalId", createdDate: "createdDate", standalone: "standalone", showCancelButton: "showCancelButton", cancelEventDialogConfig: "cancelEventDialogConfig" }, outputs: { processedEvent: "processedEvent" }, providers: [{ provide: LOCALE_ID, useValue: "pt-BR" }], usesOnChanges: true, ngImport: i0, template: "<ng-container *sLoadingState=\"gridLoading\">\r\n <p-panel>\r\n <p-header>\r\n {{ \"agro.angular_components.event_control_header\" | libTranslate }}\r\n </p-header>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12\">\r\n <s-button\r\n id=\"refresh-button\"\r\n [priority]=\"ButtonPriority.Primary\"\r\n iconClass=\"fa fa-refresh\"\r\n [label]=\"'agro.angular_components.refresh' | libTranslate\"\r\n (click)=\"onSearch()\"\r\n >\r\n </s-button>\r\n <s-button\r\n *ngIf=\"standalone && showCancelButton\"\r\n id=\"cancel-button-agro-events-lib\"\r\n iconClass=\"fa fa-times\"\r\n [label]=\"'agro.angular_components.cancel' | libTranslate\"\r\n (click)=\"openCancelModal()\"\r\n >\r\n </s-button>\r\n </div>\r\n </div>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 ui-md-12\" *ngIf=\"!gridData || gridData?.length === 0\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.nothing_found' | libTranslate }}\"\r\n [showPrimaryAction]=\"false\"\r\n description=\"{{ 'agro.angular_components.table_empty_description' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </div>\r\n <ng-container *ngIf=\"gridData.length > 0\">\r\n <p-table\r\n stylelass=\"custom-table\"\r\n #eventControlTable\r\n [value]=\"gridDataResolved\"\r\n [columns]=\"gridColumns\"\r\n dataKey=\"id\"\r\n [lazy]=\"true\"\r\n [scrollable]=\"true\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"!standalone\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [rows]=\"10\"\r\n [responsive]=\"true\"\r\n (onLazyLoad)=\"onGridChange($event)\"\r\n [sortOrder]=\"getSortOrder()\"\r\n [first]=\"getRowIndex()\"\r\n [lazyLoadOnInit]=\"false\"\r\n sortMode=\"multiple\"\r\n [rows]=\"getPageSize()\"\r\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <ng-container *ngIf=\"!standalone\">\r\n <th *ngFor=\"let col of columns\" class=\"ui-lg-1 ui-md-1\" [pSortableColumn]=\"col.field\" scope=\"col\">\r\n <div class=\"senior-header\">\r\n <span class=\"senior-header-title\">{{ col.header }}</span>\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <th class=\"ui-lg-8 ui-md-7\" scope=\"col\">\r\n {{ \"agro.angular_components.panel_title_events_events\" | libTranslate }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr>\r\n <ng-container *ngIf=\"!standalone\">\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n {{ rowData.e070emp?.nomEmp }}\r\n </td>\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n {{ rowData.e070fil?.nomFil }}\r\n </td>\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n <ng-container [ngSwitch]=\"rowData.eventOrigin\">\r\n <span *ngSwitchCase=\"'BALANCE_ENTRY_CONTROL'\">\r\n {{ \"agro.angular_components.balance_entry_control_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'TICKET'\">\r\n {{ \"agro.angular_components.ticket_maintenance_header\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'TRANSFER'\">\r\n {{ \"agro.angular_components.transfer_origin_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'INVOICE'\">\r\n {{ \"agro.angular_components.CREATE_INVOICE_FIXATION\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'CHANGE_REQUEST'\">\r\n {{ \"agro.angular_components.change_request_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'FIXATION'\">\r\n {{ \"agro.angular_components.fixation_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'CANCEL_FIXATION'\">\r\n {{ \"agro.angular_components.cancel_fixation_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'TRANSFER_CANCELLATION'\">\r\n {{ \"agro.angular_components.transfer_cancellation_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'AGRONOMIC_PRESCRIPTION'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'PRESCRIPTION_INTEGRATION_HUB'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n <td class=\"ui-lg-1 ui ui-md-1\">\r\n {{ rowData.controlCode || \"\" }}\r\n </td>\r\n </ng-container>\r\n <td class=\"ui-lg-8 ui-md-7\">\r\n <ng-container *ngFor=\"let group of rowData.groups\">\r\n <s-event-steps\r\n [steps]=\"group.steps || []\"\r\n [activeIndex]=\"group.activeIndex\"\r\n (stepSelected)=\"stepSelected($event)\"\r\n >\r\n </s-event-steps>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template *ngIf=\"!standalone\" pTemplate=\"paginatorright\" class=\"custom-table\">\r\n <span>\r\n {{ \"agro.angular_components.registers_found\" | libTranslate: { total: gridTotalRecords } }}\r\n </span>\r\n </ng-template>\r\n </p-table>\r\n </ng-container>\r\n </div>\r\n </p-panel>\r\n</ng-container>\r\n<s-sidebar\r\n [visible]=\"showSidebar\"\r\n (visibleChange)=\"closeSidebar()\"\r\n header=\"{{ 'agro.angular_components.event_details_header' | libTranslate }}\"\r\n>\r\n <div class=\"ui-fluid\">\r\n <p-fieldset [legend]=\"sidebarTitle\" [toggleable]=\"false\">\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.event_origin_label\" | libTranslate }}</strong></span\r\n >\r\n <ng-container [ngSwitch]=\"selectedStep?.eventType\">\r\n <p *ngSwitchCase=\"'BALANCE_ENTRY_CONTROL'\">\r\n {{ \"agro.angular_components.balance_entry_control_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TICKET'\">\r\n {{ \"agro.angular_components.ticket_maintenance_header\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TRANSFER'\">\r\n {{ \"agro.angular_components.transfer_origin_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'INVOICE'\">\r\n {{ \"agro.angular_components.CREATE_INVOICE_FIXATION\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'CHANGE_REQUEST'\">\r\n {{ \"agro.angular_components.change_request_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'FIXATION'\">\r\n {{ \"agro.angular_components.fixation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'CANCEL_FIXATION'\">\r\n {{ \"agro.angular_components.cancel_fixation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TRANSFER_CANCELLATION'\">\r\n {{ \"agro.angular_components.transfer_cancellation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'AGRONOMIC_PRESCRIPTION'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'PRESCRIPTION_INTEGRATION_HUB'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"producerInvoice?.producerBalanceEntryControl.producer.e001pes.nomPes\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.supplier\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ producerInvoice?.producerBalanceEntryControl.producer.e001pes.nomPes }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"producerInvoice?.producerBalanceEntryControl.ruralEstate.name\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.rural_estate\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ producerInvoice?.producerBalanceEntryControl.ruralEstate.name }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"selectedStep?.controlCode\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.control_code\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.controlCode }}</p>\r\n </div>\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.status_label\" | libTranslate }}</strong></span\r\n >\r\n <ng-container [ngSwitch]=\"selectedStep?.item.status\">\r\n <p *ngSwitchCase=\"'SUCCESS'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Green\"\r\n text=\"{{ 'agro.angular_components.panel_title_events_completed_successfully' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'PROCESSING'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Orange\"\r\n text=\"{{ 'agro.angular_components.processing' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'FAILED'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Red\"\r\n text=\"{{ 'agro.angular_components.panel_title_events_ended_with_error' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'PENDING'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Gray\"\r\n text=\"{{ 'agro.angular_components.pending' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.last_update_date\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.item.lastModifiedDate | date: \"dd/MM/yyyy HH:mm:ss\" }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"selectedStep?.item.status === 'FAILED'\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.event_error_message\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.item.message || \"-\" }}</p>\r\n </div>\r\n </div>\r\n </p-fieldset>\r\n </div>\r\n <div class=\"s-footer\">\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 width-fit\">\r\n <s-button\r\n id=\"sidebar-close-button\"\r\n [priority]=\"ButtonPriority.Primary\"\r\n [label]=\"'agro.angular_components.events_close' | libTranslate\"\r\n [auxiliary]=\"false\"\r\n (click)=\"closeSidebar()\"\r\n >\r\n </s-button>\r\n <s-button\r\n *ngIf=\"showReprocessButton\"\r\n id=\"sidebar-reprocess-button\"\r\n [priority]=\"ButtonPriority.Secondary\"\r\n iconClass=\"fa fa-refresh\"\r\n [label]=\"'agro.angular_components.reprocess_event' | libTranslate\"\r\n [auxiliary]=\"false\"\r\n (click)=\"openModal()\"\r\n >\r\n </s-button>\r\n </div>\r\n </div>\r\n </div>\r\n</s-sidebar>\r\n\r\n<p-dialog [header]=\"'agro.angular_components.event_modal_title' | libTranslate\" [(visible)]=\"displayModal\" [modal]=\"true\" class=\"dialog\">\r\n <div class=\"event-modal-text\">{{ \"agro.angular_components.event_modal\" | libTranslate }}</div>\r\n <p-footer>\r\n <div class=\"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix\">\r\n <button\r\n id=\"modal-yes\"\r\n type=\"button\"\r\n pButton\r\n icon=\"fa fa-check\"\r\n (click)=\"confirmModal()\"\r\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\"\r\n >\r\n {{ 'agro.angular_components.yes' | libTranslate }}\r\n </button>\r\n <button\r\n id=\"modal-no\"\r\n type=\"button\"\r\n pButton\r\n icon=\"fa fa-close\"\r\n (click)=\"cancelModal()\"\r\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\"\r\n >\r\n {{ 'agro.angular_components.no' | libTranslate }}\r\n </button>\r\n </div>\r\n </p-footer>\r\n</p-dialog>\r\n", styles: [".frozen{border-left:2px solid #dddddd}.dialog{width:\"600px\";height:\"300px\";z-index:100000}:host ::ng-deep #cancel-button-agro-events-lib{background-color:#9c3a3a!important;border-color:#9c3a3a!important}:host ::ng-deep #cancel-button-agro-events-lib:hover{background-color:#642525!important}\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: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "component", type: i13.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i2$2.Header, selector: "p-header" }, { kind: "component", type: i2$2.Footer, selector: "p-footer" }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i14$1.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i16.SidebarComponent, selector: "s-sidebar", inputs: ["visible", "closable", "dismissible", "closeOnEscape", "header", "largeSized", "cache", "registerConfirmClose"], outputs: ["visibleChange"] }, { kind: "directive", type: i14.LoadingStateDirective, selector: "[sLoadingState]", inputs: ["sLoadingState"] }, { kind: "component", type: i18.BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign", "enableTruncateText"], outputs: ["selected"] }, { kind: "component", type: EventStepsComponent, selector: "s-event-steps", inputs: ["id", "steps", "activeIndex"], outputs: ["stepSelected"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: i6.DatePipe, name: "date" }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
6092
6098
|
}
|
|
6093
6099
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EventControlBoardComponent, decorators: [{
|
|
6094
6100
|
type: Component,
|
|
@@ -6240,7 +6246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
6240
6246
|
type: Injectable
|
|
6241
6247
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }] });
|
|
6242
6248
|
|
|
6243
|
-
class E070EmpService extends AgroEntityService {
|
|
6249
|
+
let E070EmpService$1 = class E070EmpService extends AgroEntityService {
|
|
6244
6250
|
http;
|
|
6245
6251
|
messageService;
|
|
6246
6252
|
translate;
|
|
@@ -6259,23 +6265,23 @@ class E070EmpService extends AgroEntityService {
|
|
|
6259
6265
|
}
|
|
6260
6266
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6261
6267
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpService });
|
|
6262
|
-
}
|
|
6263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpService, decorators: [{
|
|
6268
|
+
};
|
|
6269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpService$1, decorators: [{
|
|
6264
6270
|
type: Injectable
|
|
6265
6271
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }] });
|
|
6266
6272
|
|
|
6267
|
-
class E070EmpModule {
|
|
6273
|
+
let E070EmpModule$1 = class E070EmpModule {
|
|
6268
6274
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6269
6275
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule, imports: [i1$1.PermissionsModule] });
|
|
6270
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule, providers: [E070EmpService], imports: [PermissionsModule.forChild([
|
|
6276
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule, providers: [E070EmpService$1], imports: [PermissionsModule.forChild([
|
|
6271
6277
|
{
|
|
6272
6278
|
name: "e070emp",
|
|
6273
6279
|
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
6274
6280
|
uri: `res://senior.com.br/agro/origination/entities/e070emp`,
|
|
6275
6281
|
},
|
|
6276
6282
|
])] });
|
|
6277
|
-
}
|
|
6278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule, decorators: [{
|
|
6283
|
+
};
|
|
6284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule$1, decorators: [{
|
|
6279
6285
|
type: NgModule,
|
|
6280
6286
|
args: [{
|
|
6281
6287
|
imports: [
|
|
@@ -6287,13 +6293,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
6287
6293
|
},
|
|
6288
6294
|
]),
|
|
6289
6295
|
],
|
|
6290
|
-
providers: [E070EmpService],
|
|
6296
|
+
providers: [E070EmpService$1],
|
|
6291
6297
|
declarations: [],
|
|
6292
6298
|
exports: [],
|
|
6293
6299
|
}]
|
|
6294
6300
|
}] });
|
|
6295
6301
|
|
|
6296
|
-
class E070FilService extends AgroEntityService {
|
|
6302
|
+
let E070FilService$1 = class E070FilService extends AgroEntityService {
|
|
6297
6303
|
http;
|
|
6298
6304
|
messageService;
|
|
6299
6305
|
translate;
|
|
@@ -6312,23 +6318,23 @@ class E070FilService extends AgroEntityService {
|
|
|
6312
6318
|
}
|
|
6313
6319
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6314
6320
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilService });
|
|
6315
|
-
}
|
|
6316
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilService, decorators: [{
|
|
6321
|
+
};
|
|
6322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilService$1, decorators: [{
|
|
6317
6323
|
type: Injectable
|
|
6318
6324
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }] });
|
|
6319
6325
|
|
|
6320
|
-
class E070FilModule {
|
|
6326
|
+
let E070FilModule$1 = class E070FilModule {
|
|
6321
6327
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6322
6328
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule, imports: [i1$1.PermissionsModule] });
|
|
6323
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule, providers: [E070FilService], imports: [PermissionsModule.forChild([
|
|
6329
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule, providers: [E070FilService$1], imports: [PermissionsModule.forChild([
|
|
6324
6330
|
{
|
|
6325
6331
|
name: "e070fil",
|
|
6326
6332
|
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
6327
6333
|
uri: `res://senior.com.br/agro/origination/entities/e070fil`,
|
|
6328
6334
|
},
|
|
6329
6335
|
])] });
|
|
6330
|
-
}
|
|
6331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule, decorators: [{
|
|
6336
|
+
};
|
|
6337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule$1, decorators: [{
|
|
6332
6338
|
type: NgModule,
|
|
6333
6339
|
args: [{
|
|
6334
6340
|
imports: [
|
|
@@ -6340,7 +6346,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
6340
6346
|
},
|
|
6341
6347
|
]),
|
|
6342
6348
|
],
|
|
6343
|
-
providers: [E070FilService],
|
|
6349
|
+
providers: [E070FilService$1],
|
|
6344
6350
|
declarations: [],
|
|
6345
6351
|
exports: [],
|
|
6346
6352
|
}]
|
|
@@ -6906,8 +6912,8 @@ class EventControlBoardModule {
|
|
|
6906
6912
|
BadgeModule,
|
|
6907
6913
|
E001pesModule,
|
|
6908
6914
|
E001TnsModule,
|
|
6909
|
-
E070EmpModule,
|
|
6910
|
-
E070FilModule,
|
|
6915
|
+
E070EmpModule$1,
|
|
6916
|
+
E070FilModule$1,
|
|
6911
6917
|
TransferModule,
|
|
6912
6918
|
E075DerModule,
|
|
6913
6919
|
EventControlModule,
|
|
@@ -6931,8 +6937,8 @@ class EventControlBoardModule {
|
|
|
6931
6937
|
BadgeModule,
|
|
6932
6938
|
E001pesModule,
|
|
6933
6939
|
E001TnsModule,
|
|
6934
|
-
E070EmpModule,
|
|
6935
|
-
E070FilModule,
|
|
6940
|
+
E070EmpModule$1,
|
|
6941
|
+
E070FilModule$1,
|
|
6936
6942
|
TransferModule,
|
|
6937
6943
|
E075DerModule,
|
|
6938
6944
|
EventControlModule,
|
|
@@ -6960,8 +6966,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
6960
6966
|
BadgeModule,
|
|
6961
6967
|
E001pesModule,
|
|
6962
6968
|
E001TnsModule,
|
|
6963
|
-
E070EmpModule,
|
|
6964
|
-
E070FilModule,
|
|
6969
|
+
E070EmpModule$1,
|
|
6970
|
+
E070FilModule$1,
|
|
6965
6971
|
TransferModule,
|
|
6966
6972
|
E075DerModule,
|
|
6967
6973
|
EventControlModule,
|
|
@@ -7353,7 +7359,7 @@ class ModalInvoicePjForOriginationComponent extends ModalInvoicePjBase {
|
|
|
7353
7359
|
return Promise.resolve();
|
|
7354
7360
|
}
|
|
7355
7361
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalInvoicePjForOriginationComponent, deps: [{ token: LibTranslationService }, { token: AgroInvoiceService }, { token: i3$1.LocaleService }, { token: KilogramPipe }, { token: i2$2.MessageService }, { token: i6.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
7356
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalInvoicePjForOriginationComponent, selector: "s-modal-invoice-pj-for-origination", inputs: { options: "options" }, outputs: { whenSelectInvoices: "whenSelectInvoices" }, usesInheritance: true, ngImport: i0, template: "<p-dialog\r\n header=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [(visible)]=\"visible\"\r\n [modal]=\"true\"\r\n class=\"add-invoice-modal\"\r\n [closeOnEscape]=\"false\"\r\n (onHide)=\"cancelPooling()\"\r\n [dismissableMask]=\"false\"\r\n>\r\n <ng-container *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"ui-g\">\r\n <label for=\"invoiceSearchInput\">{{ 'agro.angular_components.number' | libTranslate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"invoiceSearchInput\"\r\n pInputText\r\n [formControl]=\"searchValue\"\r\n [placeholder]=\"'' | libTranslate\"\r\n [required]=\"false\"\r\n />\r\n <div class=\"ui-g-12\">\r\n <p-table\r\n [(selection)]=\"selected\"\r\n [value]=\"tableDataSource\"\r\n [columns]=\"gridColumns\"\r\n [scrollable]=\"true\"\r\n dataKey=\"externalInvoiceId\"\r\n [rows]=\"10\"\r\n [paginator]=\"true\"\r\n [lazyLoadOnInit]=\"false\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"updateGridData($event)\"\r\n [resizableColumns]=\"true\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"gridLoading ? null : 'multiple'\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"checkbox\" scope=\"col\">\r\n <p-tableHeaderCheckbox [disabled]=\"gridLoading\"></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th\r\n *ngIf=\"col.sortable === undefined || col.sortable\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n >\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n <th *ngIf=\"col.sortable === false || col.sortable === null\" scope=\"col\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr [class.loading-row]=\"rowData.__isPlaceholder\">\r\n <td class=\"checkbox\" tabindex=\"0\">\r\n <ng-container *ngIf=\"!rowData.__isPlaceholder\">\r\n <p-tableCheckbox [value]=\"rowData\" [disabled]=\"gridLoading\"></p-tableCheckbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData.__isPlaceholder\">\r\n <div class=\"loading-cell-placeholder\"></div>\r\n </ng-container>\r\n </td>\r\n <td\r\n [pSelectableRow]=\"rowData.__isPlaceholder ? null : rowData\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n *ngFor=\"let col of columns\"\r\n class=\"column\"\r\n tabindex=\"0\"\r\n >\r\n <ng-container>\r\n <span *ngIf=\"!rowData.__isPlaceholder\">\r\n {{ gridFieldValuesMap[col.field] ? gridFieldValuesMap[col.field](rowData) : rowData[col.field] }}\r\n </span>\r\n <span class=\"loading-text-placeholder\" *ngIf=\"rowData.__isPlaceholder\">\r\n {{ rowData[col.field] || 'placeholder' }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"paginatorright\">\r\n <span>{{ gridTotalRecords }} registros encontrados</span>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"dontHaveAnyInvoice\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.add_pj_invoice_modal_no_invoices_found' | libTranslate }}\"\r\n primaryActionLabel=\"{{ 'agro.angular_components.error_server_try_again' | libTranslate }}\"\r\n (primaryAction)=\"tryToSearchAgain()\"\r\n description=\"{{ 'agro.angular_components.no_register_found_for_external_invoices_summary' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </ng-container>\r\n\r\n <ng-template pTemplate=\"footer\" *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"footer\">\r\n <ng-container *ngIf=\"invertFooterActions; else defaultFooterActions\">\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n </ng-container>\r\n <ng-template #defaultFooterActions>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".footer{width:100%;display:flex;justify-content:space-between;align-items:center}.add-invoice-modal{width:480px;max-width:480px}.add-invoice-modal input[type=text]{width:100%}.add-invoice-modal .ui-dialog{width:480px!important}.add-invoice-modal .ui-dialog .ui-dialog-content{min-height:175px}td.checkbox,th.checkbox{width:50px}th.column,td.column{min-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.loading-row{pointer-events:none}.loading-row .loading-text-placeholder{display:inline-block;filter:blur(3px);-webkit-user-select:none;user-select:none}.loading-row .loading-cell-placeholder{width:16px;height:16px;border-radius:4px;background:#d8d8d8;filter:blur(1px);margin:0 auto}\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: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i11.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
7362
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalInvoicePjForOriginationComponent, selector: "s-modal-invoice-pj-for-origination", inputs: { options: "options" }, outputs: { whenSelectInvoices: "whenSelectInvoices" }, usesInheritance: true, ngImport: i0, template: "<p-dialog\r\n header=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [(visible)]=\"visible\"\r\n [modal]=\"true\"\r\n class=\"add-invoice-modal\"\r\n [closeOnEscape]=\"false\"\r\n (onHide)=\"cancelPooling()\"\r\n [dismissableMask]=\"false\"\r\n>\r\n <ng-container *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"ui-g\">\r\n <label for=\"invoiceSearchInput\">{{ 'agro.angular_components.number' | libTranslate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"invoiceSearchInput\"\r\n pInputText\r\n [formControl]=\"searchValue\"\r\n [placeholder]=\"'' | libTranslate\"\r\n [required]=\"false\"\r\n />\r\n <div class=\"ui-g-12\">\r\n <p-table\r\n [(selection)]=\"selected\"\r\n [value]=\"tableDataSource\"\r\n [columns]=\"gridColumns\"\r\n [scrollable]=\"true\"\r\n dataKey=\"externalInvoiceId\"\r\n [rows]=\"10\"\r\n [paginator]=\"true\"\r\n [lazyLoadOnInit]=\"false\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"updateGridData($event)\"\r\n [resizableColumns]=\"true\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"gridLoading ? null : 'multiple'\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"checkbox\" scope=\"col\">\r\n <p-tableHeaderCheckbox [disabled]=\"gridLoading\"></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th\r\n *ngIf=\"col.sortable === undefined || col.sortable\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n >\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n <th *ngIf=\"col.sortable === false || col.sortable === null\" scope=\"col\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr [class.loading-row]=\"rowData.__isPlaceholder\">\r\n <td class=\"checkbox\" tabindex=\"0\">\r\n <ng-container *ngIf=\"!rowData.__isPlaceholder\">\r\n <p-tableCheckbox [value]=\"rowData\" [disabled]=\"gridLoading\"></p-tableCheckbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData.__isPlaceholder\">\r\n <div class=\"loading-cell-placeholder\"></div>\r\n </ng-container>\r\n </td>\r\n <td\r\n [pSelectableRow]=\"rowData.__isPlaceholder ? null : rowData\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n *ngFor=\"let col of columns\"\r\n class=\"column\"\r\n tabindex=\"0\"\r\n >\r\n <ng-container>\r\n <span *ngIf=\"!rowData.__isPlaceholder\">\r\n {{ gridFieldValuesMap[col.field] ? gridFieldValuesMap[col.field](rowData) : rowData[col.field] }}\r\n </span>\r\n <span class=\"loading-text-placeholder\" *ngIf=\"rowData.__isPlaceholder\">\r\n {{ rowData[col.field] || 'placeholder' }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"paginatorright\">\r\n <span>{{ gridTotalRecords }} registros encontrados</span>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"dontHaveAnyInvoice\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.add_pj_invoice_modal_no_invoices_found' | libTranslate }}\"\r\n primaryActionLabel=\"{{ 'agro.angular_components.error_server_try_again' | libTranslate }}\"\r\n (primaryAction)=\"tryToSearchAgain()\"\r\n description=\"{{ 'agro.angular_components.no_register_found_for_external_invoices_summary' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </ng-container>\r\n\r\n <ng-template pTemplate=\"footer\" *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"footer\">\r\n <ng-container *ngIf=\"invertFooterActions; else defaultFooterActions\">\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n </ng-container>\r\n <ng-template #defaultFooterActions>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".footer{width:100%;display:flex;justify-content:space-between;align-items:center}.add-invoice-modal{width:480px;max-width:480px}.add-invoice-modal input[type=text]{width:100%}.add-invoice-modal .ui-dialog{width:480px!important}.add-invoice-modal .ui-dialog .ui-dialog-content{min-height:175px}td.checkbox,th.checkbox{width:50px}th.column,td.column{min-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.loading-row{pointer-events:none}.loading-row .loading-text-placeholder{display:inline-block;filter:blur(3px);-webkit-user-select:none;user-select:none}.loading-row .loading-cell-placeholder{width:16px;height:16px;border-radius:4px;background:#d8d8d8;filter:blur(1px);margin:0 auto}\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: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i11.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
7357
7363
|
}
|
|
7358
7364
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalInvoicePjForOriginationComponent, decorators: [{
|
|
7359
7365
|
type: Component,
|
|
@@ -7419,7 +7425,7 @@ class ModalInvoicePjForTransferComponent extends ModalInvoicePjForOriginationCom
|
|
|
7419
7425
|
this.datePipe = datePipe;
|
|
7420
7426
|
}
|
|
7421
7427
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalInvoicePjForTransferComponent, deps: [{ token: LibTranslationService }, { token: AgroInvoiceService }, { token: i3$1.LocaleService }, { token: KilogramPipe }, { token: i2$2.MessageService }, { token: i6.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
7422
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalInvoicePjForTransferComponent, selector: "s-modal-invoice-pj-for-transfer", usesInheritance: true, ngImport: i0, template: "<p-dialog\r\n header=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [(visible)]=\"visible\"\r\n [modal]=\"true\"\r\n class=\"add-invoice-modal\"\r\n [closeOnEscape]=\"false\"\r\n (onHide)=\"cancelPooling()\"\r\n [dismissableMask]=\"false\"\r\n>\r\n <ng-container *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"ui-g\">\r\n <label for=\"invoiceSearchInput\">{{ 'agro.angular_components.number' | libTranslate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"invoiceSearchInput\"\r\n pInputText\r\n [formControl]=\"searchValue\"\r\n [placeholder]=\"'' | libTranslate\"\r\n [required]=\"false\"\r\n />\r\n <div class=\"ui-g-12\">\r\n <p-table\r\n [(selection)]=\"selected\"\r\n [value]=\"tableDataSource\"\r\n [columns]=\"gridColumns\"\r\n [scrollable]=\"true\"\r\n dataKey=\"externalInvoiceId\"\r\n [rows]=\"10\"\r\n [paginator]=\"true\"\r\n [lazyLoadOnInit]=\"false\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"updateGridData($event)\"\r\n [resizableColumns]=\"true\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"gridLoading ? null : 'multiple'\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"checkbox\" scope=\"col\">\r\n <p-tableHeaderCheckbox [disabled]=\"gridLoading\"></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th\r\n *ngIf=\"col.sortable === undefined || col.sortable\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n >\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n <th *ngIf=\"col.sortable === false || col.sortable === null\" scope=\"col\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr [class.loading-row]=\"rowData.__isPlaceholder\">\r\n <td class=\"checkbox\" tabindex=\"0\">\r\n <ng-container *ngIf=\"!rowData.__isPlaceholder\">\r\n <p-tableCheckbox [value]=\"rowData\" [disabled]=\"gridLoading\"></p-tableCheckbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData.__isPlaceholder\">\r\n <div class=\"loading-cell-placeholder\"></div>\r\n </ng-container>\r\n </td>\r\n <td\r\n [pSelectableRow]=\"rowData.__isPlaceholder ? null : rowData\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n *ngFor=\"let col of columns\"\r\n class=\"column\"\r\n tabindex=\"0\"\r\n >\r\n <ng-container>\r\n <span *ngIf=\"!rowData.__isPlaceholder\">\r\n {{ gridFieldValuesMap[col.field] ? gridFieldValuesMap[col.field](rowData) : rowData[col.field] }}\r\n </span>\r\n <span class=\"loading-text-placeholder\" *ngIf=\"rowData.__isPlaceholder\">\r\n {{ rowData[col.field] || 'placeholder' }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"paginatorright\">\r\n <span>{{ gridTotalRecords }} registros encontrados</span>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"dontHaveAnyInvoice\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.add_pj_invoice_modal_no_invoices_found' | libTranslate }}\"\r\n primaryActionLabel=\"{{ 'agro.angular_components.error_server_try_again' | libTranslate }}\"\r\n (primaryAction)=\"tryToSearchAgain()\"\r\n description=\"{{ 'agro.angular_components.no_register_found_for_external_invoices_summary' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </ng-container>\r\n\r\n <ng-template pTemplate=\"footer\" *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"footer\">\r\n <ng-container *ngIf=\"invertFooterActions; else defaultFooterActions\">\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n </ng-container>\r\n <ng-template #defaultFooterActions>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".footer{width:100%;display:flex;justify-content:space-between;align-items:center}.add-invoice-modal{width:480px;max-width:480px}.add-invoice-modal input[type=text]{width:100%}.add-invoice-modal .ui-dialog{width:480px!important}.add-invoice-modal .ui-dialog .ui-dialog-content{min-height:175px}td.checkbox,th.checkbox{width:50px}th.column,td.column{min-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.loading-row{pointer-events:none}.loading-row .loading-text-placeholder{display:inline-block;filter:blur(3px);-webkit-user-select:none;user-select:none}.loading-row .loading-cell-placeholder{width:16px;height:16px;border-radius:4px;background:#d8d8d8;filter:blur(1px);margin:0 auto}\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: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i11.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
7428
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalInvoicePjForTransferComponent, selector: "s-modal-invoice-pj-for-transfer", usesInheritance: true, ngImport: i0, template: "<p-dialog\r\n header=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [(visible)]=\"visible\"\r\n [modal]=\"true\"\r\n class=\"add-invoice-modal\"\r\n [closeOnEscape]=\"false\"\r\n (onHide)=\"cancelPooling()\"\r\n [dismissableMask]=\"false\"\r\n>\r\n <ng-container *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"ui-g\">\r\n <label for=\"invoiceSearchInput\">{{ 'agro.angular_components.number' | libTranslate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"invoiceSearchInput\"\r\n pInputText\r\n [formControl]=\"searchValue\"\r\n [placeholder]=\"'' | libTranslate\"\r\n [required]=\"false\"\r\n />\r\n <div class=\"ui-g-12\">\r\n <p-table\r\n [(selection)]=\"selected\"\r\n [value]=\"tableDataSource\"\r\n [columns]=\"gridColumns\"\r\n [scrollable]=\"true\"\r\n dataKey=\"externalInvoiceId\"\r\n [rows]=\"10\"\r\n [paginator]=\"true\"\r\n [lazyLoadOnInit]=\"false\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"updateGridData($event)\"\r\n [resizableColumns]=\"true\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"gridLoading ? null : 'multiple'\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"checkbox\" scope=\"col\">\r\n <p-tableHeaderCheckbox [disabled]=\"gridLoading\"></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th\r\n *ngIf=\"col.sortable === undefined || col.sortable\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n >\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n <th *ngIf=\"col.sortable === false || col.sortable === null\" scope=\"col\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr [class.loading-row]=\"rowData.__isPlaceholder\">\r\n <td class=\"checkbox\" tabindex=\"0\">\r\n <ng-container *ngIf=\"!rowData.__isPlaceholder\">\r\n <p-tableCheckbox [value]=\"rowData\" [disabled]=\"gridLoading\"></p-tableCheckbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData.__isPlaceholder\">\r\n <div class=\"loading-cell-placeholder\"></div>\r\n </ng-container>\r\n </td>\r\n <td\r\n [pSelectableRow]=\"rowData.__isPlaceholder ? null : rowData\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n *ngFor=\"let col of columns\"\r\n class=\"column\"\r\n tabindex=\"0\"\r\n >\r\n <ng-container>\r\n <span *ngIf=\"!rowData.__isPlaceholder\">\r\n {{ gridFieldValuesMap[col.field] ? gridFieldValuesMap[col.field](rowData) : rowData[col.field] }}\r\n </span>\r\n <span class=\"loading-text-placeholder\" *ngIf=\"rowData.__isPlaceholder\">\r\n {{ rowData[col.field] || 'placeholder' }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"paginatorright\">\r\n <span>{{ gridTotalRecords }} registros encontrados</span>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"dontHaveAnyInvoice\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.add_pj_invoice_modal_no_invoices_found' | libTranslate }}\"\r\n primaryActionLabel=\"{{ 'agro.angular_components.error_server_try_again' | libTranslate }}\"\r\n (primaryAction)=\"tryToSearchAgain()\"\r\n description=\"{{ 'agro.angular_components.no_register_found_for_external_invoices_summary' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </ng-container>\r\n\r\n <ng-template pTemplate=\"footer\" *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"footer\">\r\n <ng-container *ngIf=\"invertFooterActions; else defaultFooterActions\">\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n </ng-container>\r\n <ng-template #defaultFooterActions>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".footer{width:100%;display:flex;justify-content:space-between;align-items:center}.add-invoice-modal{width:480px;max-width:480px}.add-invoice-modal input[type=text]{width:100%}.add-invoice-modal .ui-dialog{width:480px!important}.add-invoice-modal .ui-dialog .ui-dialog-content{min-height:175px}td.checkbox,th.checkbox{width:50px}th.column,td.column{min-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.loading-row{pointer-events:none}.loading-row .loading-text-placeholder{display:inline-block;filter:blur(3px);-webkit-user-select:none;user-select:none}.loading-row .loading-cell-placeholder{width:16px;height:16px;border-radius:4px;background:#d8d8d8;filter:blur(1px);margin:0 auto}\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: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i11.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
7423
7429
|
}
|
|
7424
7430
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalInvoicePjForTransferComponent, decorators: [{
|
|
7425
7431
|
type: Component,
|
|
@@ -7600,7 +7606,7 @@ class ModalInvoicePjForFixationComponent extends ModalInvoicePjBase {
|
|
|
7600
7606
|
});
|
|
7601
7607
|
}
|
|
7602
7608
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalInvoicePjForFixationComponent, deps: [{ token: LibTranslationService }, { token: AgroInvoiceService }, { token: i3$1.LocaleService }, { token: KilogramPipe }, { token: i6.CurrencyPipe }, { token: ProducerInvoiceService }, { token: i2$2.MessageService }, { token: i6.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
7603
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalInvoicePjForFixationComponent, selector: "s-modal-invoice-pj-for-fixation", inputs: { options: "options" }, outputs: { whenSelectInvoices: "whenSelectInvoices" }, usesInheritance: true, ngImport: i0, template: "<p-dialog\r\n header=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [(visible)]=\"visible\"\r\n [modal]=\"true\"\r\n class=\"add-invoice-modal\"\r\n [closeOnEscape]=\"false\"\r\n (onHide)=\"cancelPooling()\"\r\n [dismissableMask]=\"false\"\r\n>\r\n <ng-container *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"ui-g\">\r\n <label for=\"invoiceSearchInput\">{{ 'agro.angular_components.number' | libTranslate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"invoiceSearchInput\"\r\n pInputText\r\n [formControl]=\"searchValue\"\r\n [placeholder]=\"'' | libTranslate\"\r\n [required]=\"false\"\r\n />\r\n <div class=\"ui-g-12\">\r\n <p-table\r\n [(selection)]=\"selected\"\r\n [value]=\"tableDataSource\"\r\n [columns]=\"gridColumns\"\r\n [scrollable]=\"true\"\r\n dataKey=\"externalInvoiceId\"\r\n [rows]=\"10\"\r\n [paginator]=\"true\"\r\n [lazyLoadOnInit]=\"false\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"updateGridData($event)\"\r\n [resizableColumns]=\"true\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"gridLoading ? null : 'multiple'\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"checkbox\" scope=\"col\">\r\n <p-tableHeaderCheckbox [disabled]=\"gridLoading\"></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th\r\n *ngIf=\"col.sortable === undefined || col.sortable\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n >\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n <th *ngIf=\"col.sortable === false || col.sortable === null\" scope=\"col\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr [class.loading-row]=\"rowData.__isPlaceholder\">\r\n <td class=\"checkbox\" tabindex=\"0\">\r\n <ng-container *ngIf=\"!rowData.__isPlaceholder\">\r\n <p-tableCheckbox [value]=\"rowData\" [disabled]=\"gridLoading\"></p-tableCheckbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData.__isPlaceholder\">\r\n <div class=\"loading-cell-placeholder\"></div>\r\n </ng-container>\r\n </td>\r\n <td\r\n [pSelectableRow]=\"rowData.__isPlaceholder ? null : rowData\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n *ngFor=\"let col of columns\"\r\n class=\"column\"\r\n tabindex=\"0\"\r\n >\r\n <ng-container>\r\n <span *ngIf=\"!rowData.__isPlaceholder\">\r\n {{ gridFieldValuesMap[col.field] ? gridFieldValuesMap[col.field](rowData) : rowData[col.field] }}\r\n </span>\r\n <span class=\"loading-text-placeholder\" *ngIf=\"rowData.__isPlaceholder\">\r\n {{ rowData[col.field] || 'placeholder' }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"paginatorright\">\r\n <span>{{ gridTotalRecords }} registros encontrados</span>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"dontHaveAnyInvoice\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.add_pj_invoice_modal_no_invoices_found' | libTranslate }}\"\r\n primaryActionLabel=\"{{ 'agro.angular_components.error_server_try_again' | libTranslate }}\"\r\n (primaryAction)=\"tryToSearchAgain()\"\r\n description=\"{{ 'agro.angular_components.no_register_found_for_external_invoices_summary' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </ng-container>\r\n\r\n <ng-template pTemplate=\"footer\" *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"footer\">\r\n <ng-container *ngIf=\"invertFooterActions; else defaultFooterActions\">\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n </ng-container>\r\n <ng-template #defaultFooterActions>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".footer{width:100%;display:flex;justify-content:space-between;align-items:center}.add-invoice-modal{width:480px;max-width:480px}.add-invoice-modal input[type=text]{width:100%}.add-invoice-modal .ui-dialog{width:480px!important}.add-invoice-modal .ui-dialog .ui-dialog-content{min-height:175px}td.checkbox,th.checkbox{width:50px}th.column,td.column{min-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.loading-row{pointer-events:none}.loading-row .loading-text-placeholder{display:inline-block;filter:blur(3px);-webkit-user-select:none;user-select:none}.loading-row .loading-cell-placeholder{width:16px;height:16px;border-radius:4px;background:#d8d8d8;filter:blur(1px);margin:0 auto}\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: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i11.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
7609
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalInvoicePjForFixationComponent, selector: "s-modal-invoice-pj-for-fixation", inputs: { options: "options" }, outputs: { whenSelectInvoices: "whenSelectInvoices" }, usesInheritance: true, ngImport: i0, template: "<p-dialog\r\n header=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [(visible)]=\"visible\"\r\n [modal]=\"true\"\r\n class=\"add-invoice-modal\"\r\n [closeOnEscape]=\"false\"\r\n (onHide)=\"cancelPooling()\"\r\n [dismissableMask]=\"false\"\r\n>\r\n <ng-container *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"ui-g\">\r\n <label for=\"invoiceSearchInput\">{{ 'agro.angular_components.number' | libTranslate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"invoiceSearchInput\"\r\n pInputText\r\n [formControl]=\"searchValue\"\r\n [placeholder]=\"'' | libTranslate\"\r\n [required]=\"false\"\r\n />\r\n <div class=\"ui-g-12\">\r\n <p-table\r\n [(selection)]=\"selected\"\r\n [value]=\"tableDataSource\"\r\n [columns]=\"gridColumns\"\r\n [scrollable]=\"true\"\r\n dataKey=\"externalInvoiceId\"\r\n [rows]=\"10\"\r\n [paginator]=\"true\"\r\n [lazyLoadOnInit]=\"false\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"updateGridData($event)\"\r\n [resizableColumns]=\"true\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"gridLoading ? null : 'multiple'\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"checkbox\" scope=\"col\">\r\n <p-tableHeaderCheckbox [disabled]=\"gridLoading\"></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th\r\n *ngIf=\"col.sortable === undefined || col.sortable\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n >\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n <th *ngIf=\"col.sortable === false || col.sortable === null\" scope=\"col\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr [class.loading-row]=\"rowData.__isPlaceholder\">\r\n <td class=\"checkbox\" tabindex=\"0\">\r\n <ng-container *ngIf=\"!rowData.__isPlaceholder\">\r\n <p-tableCheckbox [value]=\"rowData\" [disabled]=\"gridLoading\"></p-tableCheckbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData.__isPlaceholder\">\r\n <div class=\"loading-cell-placeholder\"></div>\r\n </ng-container>\r\n </td>\r\n <td\r\n [pSelectableRow]=\"rowData.__isPlaceholder ? null : rowData\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n *ngFor=\"let col of columns\"\r\n class=\"column\"\r\n tabindex=\"0\"\r\n >\r\n <ng-container>\r\n <span *ngIf=\"!rowData.__isPlaceholder\">\r\n {{ gridFieldValuesMap[col.field] ? gridFieldValuesMap[col.field](rowData) : rowData[col.field] }}\r\n </span>\r\n <span class=\"loading-text-placeholder\" *ngIf=\"rowData.__isPlaceholder\">\r\n {{ rowData[col.field] || 'placeholder' }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"paginatorright\">\r\n <span>{{ gridTotalRecords }} registros encontrados</span>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"dontHaveAnyInvoice\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.add_pj_invoice_modal_no_invoices_found' | libTranslate }}\"\r\n primaryActionLabel=\"{{ 'agro.angular_components.error_server_try_again' | libTranslate }}\"\r\n (primaryAction)=\"tryToSearchAgain()\"\r\n description=\"{{ 'agro.angular_components.no_register_found_for_external_invoices_summary' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </ng-container>\r\n\r\n <ng-template pTemplate=\"footer\" *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"footer\">\r\n <ng-container *ngIf=\"invertFooterActions; else defaultFooterActions\">\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n </ng-container>\r\n <ng-template #defaultFooterActions>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".footer{width:100%;display:flex;justify-content:space-between;align-items:center}.add-invoice-modal{width:480px;max-width:480px}.add-invoice-modal input[type=text]{width:100%}.add-invoice-modal .ui-dialog{width:480px!important}.add-invoice-modal .ui-dialog .ui-dialog-content{min-height:175px}td.checkbox,th.checkbox{width:50px}th.column,td.column{min-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.loading-row{pointer-events:none}.loading-row .loading-text-placeholder{display:inline-block;filter:blur(3px);-webkit-user-select:none;user-select:none}.loading-row .loading-cell-placeholder{width:16px;height:16px;border-radius:4px;background:#d8d8d8;filter:blur(1px);margin:0 auto}\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: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i11.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
7604
7610
|
}
|
|
7605
7611
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalInvoicePjForFixationComponent, decorators: [{
|
|
7606
7612
|
type: Component,
|
|
@@ -7666,7 +7672,7 @@ class ModalInvoicePjForContractsComponent extends ModalInvoicePjBase {
|
|
|
7666
7672
|
return Promise.resolve();
|
|
7667
7673
|
}
|
|
7668
7674
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalInvoicePjForContractsComponent, deps: [{ token: LibTranslationService }, { token: AgroInvoiceService }, { token: i3$1.LocaleService }, { token: KilogramPipe }, { token: i2$2.MessageService }, { token: i6.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
7669
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalInvoicePjForContractsComponent, selector: "s-modal-invoice-pj-for-contracts", inputs: { options: "options" }, outputs: { whenSelectInvoices: "whenSelectInvoices" }, usesInheritance: true, ngImport: i0, template: "<p-dialog\r\n header=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [(visible)]=\"visible\"\r\n [modal]=\"true\"\r\n class=\"add-invoice-modal\"\r\n [closeOnEscape]=\"false\"\r\n (onHide)=\"cancelPooling()\"\r\n [dismissableMask]=\"false\"\r\n>\r\n <ng-container *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"ui-g\">\r\n <label for=\"invoiceSearchInput\">{{ 'agro.angular_components.number' | libTranslate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"invoiceSearchInput\"\r\n pInputText\r\n [formControl]=\"searchValue\"\r\n [placeholder]=\"'' | libTranslate\"\r\n [required]=\"false\"\r\n />\r\n <div class=\"ui-g-12\">\r\n <p-table\r\n [(selection)]=\"selected\"\r\n [value]=\"tableDataSource\"\r\n [columns]=\"gridColumns\"\r\n [scrollable]=\"true\"\r\n dataKey=\"externalInvoiceId\"\r\n [rows]=\"10\"\r\n [paginator]=\"true\"\r\n [lazyLoadOnInit]=\"false\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"updateGridData($event)\"\r\n [resizableColumns]=\"true\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"gridLoading ? null : 'multiple'\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"checkbox\" scope=\"col\">\r\n <p-tableHeaderCheckbox [disabled]=\"gridLoading\"></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th\r\n *ngIf=\"col.sortable === undefined || col.sortable\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n >\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n <th *ngIf=\"col.sortable === false || col.sortable === null\" scope=\"col\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr [class.loading-row]=\"rowData.__isPlaceholder\">\r\n <td class=\"checkbox\" tabindex=\"0\">\r\n <ng-container *ngIf=\"!rowData.__isPlaceholder\">\r\n <p-tableCheckbox [value]=\"rowData\" [disabled]=\"gridLoading\"></p-tableCheckbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData.__isPlaceholder\">\r\n <div class=\"loading-cell-placeholder\"></div>\r\n </ng-container>\r\n </td>\r\n <td\r\n [pSelectableRow]=\"rowData.__isPlaceholder ? null : rowData\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n *ngFor=\"let col of columns\"\r\n class=\"column\"\r\n tabindex=\"0\"\r\n >\r\n <ng-container>\r\n <span *ngIf=\"!rowData.__isPlaceholder\">\r\n {{ gridFieldValuesMap[col.field] ? gridFieldValuesMap[col.field](rowData) : rowData[col.field] }}\r\n </span>\r\n <span class=\"loading-text-placeholder\" *ngIf=\"rowData.__isPlaceholder\">\r\n {{ rowData[col.field] || 'placeholder' }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"paginatorright\">\r\n <span>{{ gridTotalRecords }} registros encontrados</span>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"dontHaveAnyInvoice\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.add_pj_invoice_modal_no_invoices_found' | libTranslate }}\"\r\n primaryActionLabel=\"{{ 'agro.angular_components.error_server_try_again' | libTranslate }}\"\r\n (primaryAction)=\"tryToSearchAgain()\"\r\n description=\"{{ 'agro.angular_components.no_register_found_for_external_invoices_summary' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </ng-container>\r\n\r\n <ng-template pTemplate=\"footer\" *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"footer\">\r\n <ng-container *ngIf=\"invertFooterActions; else defaultFooterActions\">\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n </ng-container>\r\n <ng-template #defaultFooterActions>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".footer{width:100%;display:flex;justify-content:space-between;align-items:center}.add-invoice-modal{width:480px;max-width:480px}.add-invoice-modal input[type=text]{width:100%}.add-invoice-modal .ui-dialog{width:480px!important}.add-invoice-modal .ui-dialog .ui-dialog-content{min-height:175px}td.checkbox,th.checkbox{width:50px}th.column,td.column{min-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.loading-row{pointer-events:none}.loading-row .loading-text-placeholder{display:inline-block;filter:blur(3px);-webkit-user-select:none;user-select:none}.loading-row .loading-cell-placeholder{width:16px;height:16px;border-radius:4px;background:#d8d8d8;filter:blur(1px);margin:0 auto}\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: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i11.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
7675
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalInvoicePjForContractsComponent, selector: "s-modal-invoice-pj-for-contracts", inputs: { options: "options" }, outputs: { whenSelectInvoices: "whenSelectInvoices" }, usesInheritance: true, ngImport: i0, template: "<p-dialog\r\n header=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [(visible)]=\"visible\"\r\n [modal]=\"true\"\r\n class=\"add-invoice-modal\"\r\n [closeOnEscape]=\"false\"\r\n (onHide)=\"cancelPooling()\"\r\n [dismissableMask]=\"false\"\r\n>\r\n <ng-container *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"ui-g\">\r\n <label for=\"invoiceSearchInput\">{{ 'agro.angular_components.number' | libTranslate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"invoiceSearchInput\"\r\n pInputText\r\n [formControl]=\"searchValue\"\r\n [placeholder]=\"'' | libTranslate\"\r\n [required]=\"false\"\r\n />\r\n <div class=\"ui-g-12\">\r\n <p-table\r\n [(selection)]=\"selected\"\r\n [value]=\"tableDataSource\"\r\n [columns]=\"gridColumns\"\r\n [scrollable]=\"true\"\r\n dataKey=\"externalInvoiceId\"\r\n [rows]=\"10\"\r\n [paginator]=\"true\"\r\n [lazyLoadOnInit]=\"false\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"updateGridData($event)\"\r\n [resizableColumns]=\"true\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"gridLoading ? null : 'multiple'\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"checkbox\" scope=\"col\">\r\n <p-tableHeaderCheckbox [disabled]=\"gridLoading\"></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th\r\n *ngIf=\"col.sortable === undefined || col.sortable\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n >\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n <th *ngIf=\"col.sortable === false || col.sortable === null\" scope=\"col\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr [class.loading-row]=\"rowData.__isPlaceholder\">\r\n <td class=\"checkbox\" tabindex=\"0\">\r\n <ng-container *ngIf=\"!rowData.__isPlaceholder\">\r\n <p-tableCheckbox [value]=\"rowData\" [disabled]=\"gridLoading\"></p-tableCheckbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData.__isPlaceholder\">\r\n <div class=\"loading-cell-placeholder\"></div>\r\n </ng-container>\r\n </td>\r\n <td\r\n [pSelectableRow]=\"rowData.__isPlaceholder ? null : rowData\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n *ngFor=\"let col of columns\"\r\n class=\"column\"\r\n tabindex=\"0\"\r\n >\r\n <ng-container>\r\n <span *ngIf=\"!rowData.__isPlaceholder\">\r\n {{ gridFieldValuesMap[col.field] ? gridFieldValuesMap[col.field](rowData) : rowData[col.field] }}\r\n </span>\r\n <span class=\"loading-text-placeholder\" *ngIf=\"rowData.__isPlaceholder\">\r\n {{ rowData[col.field] || 'placeholder' }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"paginatorright\">\r\n <span>{{ gridTotalRecords }} registros encontrados</span>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"dontHaveAnyInvoice\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.add_pj_invoice_modal_no_invoices_found' | libTranslate }}\"\r\n primaryActionLabel=\"{{ 'agro.angular_components.error_server_try_again' | libTranslate }}\"\r\n (primaryAction)=\"tryToSearchAgain()\"\r\n description=\"{{ 'agro.angular_components.no_register_found_for_external_invoices_summary' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </ng-container>\r\n\r\n <ng-template pTemplate=\"footer\" *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"footer\">\r\n <ng-container *ngIf=\"invertFooterActions; else defaultFooterActions\">\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n </ng-container>\r\n <ng-template #defaultFooterActions>\r\n <s-button\r\n [priority]=\"ButtonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"gridLoading || !selected.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"ButtonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".footer{width:100%;display:flex;justify-content:space-between;align-items:center}.add-invoice-modal{width:480px;max-width:480px}.add-invoice-modal input[type=text]{width:100%}.add-invoice-modal .ui-dialog{width:480px!important}.add-invoice-modal .ui-dialog .ui-dialog-content{min-height:175px}td.checkbox,th.checkbox{width:50px}th.column,td.column{min-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.loading-row{pointer-events:none}.loading-row .loading-text-placeholder{display:inline-block;filter:blur(3px);-webkit-user-select:none;user-select:none}.loading-row .loading-cell-placeholder{width:16px;height:16px;border-radius:4px;background:#d8d8d8;filter:blur(1px);margin:0 auto}\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: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i11.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i12.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
7670
7676
|
}
|
|
7671
7677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalInvoicePjForContractsComponent, decorators: [{
|
|
7672
7678
|
type: Component,
|
|
@@ -8165,7 +8171,7 @@ class FinancialTitleTableComponent {
|
|
|
8165
8171
|
};
|
|
8166
8172
|
}
|
|
8167
8173
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FinancialTitleTableComponent, deps: [{ token: LibTranslationService }, { token: AgroFinancialService }, { token: i2$2.MessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8168
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FinancialTitleTableComponent, selector: "s-financial-title-table", inputs: { options: "options", selected: "selected" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "table", first: true, predicate: ["TitleTable"], descendants: true }], ngImport: i0, template: "<ng-container *sLoadingState=\"componentLoading\">\r\n <div [hidden]=\"gridData.length > 0\">\r\n <s-empty-state\r\n iconClass=\"fa fa-inbox\"\r\n title=\"{{ 'agro.angular_components.no_accounts_found_title' | libTranslate }}\"\r\n [showPrimaryAction]=\"false\"\r\n description=\"{{ 'agro.angular_components.no_accounts_found_description' | libTranslate }}\"\r\n ></s-empty-state>\r\n </div>\r\n <p-table\r\n #TitleTable\r\n [hidden]=\"gridData.length === 0\"\r\n [value]=\"gridData\"\r\n [columns]=\"gridColumns\"\r\n dataKey=\"id\"\r\n [lazy]=\"true\"\r\n [paginator]=\"true\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [sortField]=\"getSortField()\"\r\n [sortOrder]=\"getSortOrder()\"\r\n [first]=\"getRowIndex()\"\r\n [rows]=\"getPageSize()\"\r\n [lazyLoadOnInit]=\"false\"\r\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\r\n (onLazyLoad)=\"updateGrid($event)\"\r\n [(selection)]=\"selected\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n (onRowUnselect)=\"onUnselect($event)\"\r\n sortMode=\"single\"\r\n [selectionMode]=\"'multiple'\"\r\n editMode=\"row\"\r\n [scrollable]=\"true\"\r\n frozenWidth=\"160px\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"table-checkbox-header\" scope=\"col\" [ngStyle]=\"getStyleColumns('checkbox')\">\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <ng-container *ngIf=\"col.orderBy; else notSortable\">\r\n <th [pSortableColumn]=\"col.field\" [scope]=\"'col'\" [ngStyle]=\"getStyleColumns(col.field)\">\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n </ng-container>\r\n <ng-template #notSortable>\r\n <th [scope]=\"'col'\" [ngStyle]=\"getStyleColumns(col.field)\">\r\n {{ col.header }}\r\n </th>\r\n </ng-template>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"frozenheader\">\r\n <tr>\r\n <th scope=\"col\" pFrozenColumn>\r\n {{ 'agro.angular_components.details' | libTranslate }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowIndex=\"rowIndex\"\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n >\r\n <tr [pEditableRow]=\"rowData\" [formGroup]=\"$any(titlesForm.at(rowIndex))\">\r\n <td class=\"table-checkbox-header\" [ngStyle]=\"getStyleColumns('checkbox')\">\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n <td *ngFor=\"let col of columns; let i = index\" [ngStyle]=\"getStyleColumns(col.field)\">\r\n <p-cellEditor>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container [ngSwitch]=\"col.field\">\r\n <ng-container *ngSwitchCase=\"'valuePaid'\">\r\n <input\r\n pInputText\r\n sNumberInput\r\n class=\"w-full\"\r\n id=\"valuePaid-input-{{ rowData.id || rowIndex }}\"\r\n decimalSeparator=\",\"\r\n thousandsSeparator=\".\"\r\n formControlName=\"valuePaid\"\r\n type=\"text\"\r\n [scale]=\"2\"\r\n [allowNegative]=\"false\"\r\n [attr.aria-label]=\"'agro.angular_components.value_paid' | libTranslate\"\r\n />\r\n <br />\r\n <s-control-errors\r\n [control]=\"$any(titlesForm.at(rowIndex)).get('valuePaid')\"\r\n [errorMessages]=\"errorMessage\"\r\n >\r\n </s-control-errors>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ getProp(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n <ng-container [ngSwitch]=\"col.field\">\r\n <ng-container *ngSwitchCase=\"'valuePaid'\">\r\n {{ rowData['valuePaid'] || 0 | currency: 'BRL':'symbol':'1.2-2':'pt-BR' }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ getProp(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"frozenbody\" let-rowData let-columns>\r\n <tr [pEditableRow]=\"rowData\">\r\n <td pFrozenColumn>\r\n <s-button\r\n id=\"details-{{ rowData.id }}\"\r\n (click)=\"showDetails(rowData)\"\r\n (keydown.enter)=\"showDetails(rowData)\"\r\n label=\"{{ 'agro.angular_components.details' | libTranslate }}\"\r\n [priority]=\"'default'\"\r\n [disabled]=\"false\"\r\n [auxiliary]=\"true\"\r\n [size]=\"'small'\"\r\n iconClass=\"fa fa-rocket\"\r\n ></s-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</ng-container>\r\n<s-sidebar\r\n [(visible)]=\"showSidebar\"\r\n position=\"right\"\r\n [header]=\"('agro.angular_components.account_details' | libTranslate) + ' ' + (selectedRow?.numberTitle || '')\"\r\n>\r\n <div class=\"ui-fluid\">\r\n <div class=\"ui-g\">\r\n <ng-container *ngFor=\"let field of sidebarFields\">\r\n <div class=\"ui-g-4\">\r\n <span>\r\n <strong>{{ field.header }}</strong>\r\n </span>\r\n <p>{{ getProp(selectedRow, field) || '-' }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-template #noValue>-</ng-template>\r\n <div class=\"ui-g-4\">\r\n <span>\r\n <strong>{{ 'agro.angular_components.status_label' | libTranslate }}</strong>\r\n </span>\r\n <p>\r\n <ng-container [ngSwitch]=\"selectedRow?.status\">\r\n <span *ngSwitchCase=\"'OPEN'\">\r\n <s-badge\r\n [color]=\"'yellow'\"\r\n text=\"{{ 'agro.angular_components.status_open' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n ></s-badge>\r\n </span>\r\n <span *ngSwitchCase=\"'PAID'\">\r\n <s-badge\r\n [color]=\"'green'\"\r\n text=\"{{ 'agro.angular_components.status_paid' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n ></s-badge>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n <s-footer>\r\n <s-button label=\"{{ 'agro.angular_components.close' | libTranslate }}\" (onClick)=\"closeDetails()\"> </s-button>\r\n </s-footer>\r\n</s-sidebar>\r\n", styles: [".error-message{color:#c13018;margin-top:5px;font-size:12px}\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: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "component", type: i8.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i8.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "component", type: i18.BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign", "enableTruncateText"], outputs: ["selected"] }, { kind: "component", type: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }, { kind: "component", type: i16.SidebarComponent, selector: "s-sidebar", inputs: ["visible", "closable", "dismissible", "closeOnEscape", "header", "largeSized", "cache", "registerConfirmClose"], outputs: ["visibleChange"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i11.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i11.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i14.LoadingStateDirective, selector: "[sLoadingState]", inputs: ["sLoadingState"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: i13$2.FooterComponent, selector: "s-footer" }, { kind: "directive", type: i14$2.NumberInputDirective, selector: "input[sNumberInput]", inputs: ["precision", "scale", "decimalSeparator", "thousandsSeparator", "alignTo", "allowNegative", "placeholder"], outputs: ["pasteRejected"] }, { kind: "component", type: i15$1.ControlErrorsComponent, selector: "s-control-errors", inputs: ["id", "control", "errorMessages", "form"] }, { kind: "pipe", type: i6.CurrencyPipe, name: "currency" }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
8174
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FinancialTitleTableComponent, selector: "s-financial-title-table", inputs: { options: "options", selected: "selected" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "table", first: true, predicate: ["TitleTable"], descendants: true }], ngImport: i0, template: "<ng-container *sLoadingState=\"componentLoading\">\r\n <div [hidden]=\"gridData.length > 0\">\r\n <s-empty-state\r\n iconClass=\"fa fa-inbox\"\r\n title=\"{{ 'agro.angular_components.no_accounts_found_title' | libTranslate }}\"\r\n [showPrimaryAction]=\"false\"\r\n description=\"{{ 'agro.angular_components.no_accounts_found_description' | libTranslate }}\"\r\n ></s-empty-state>\r\n </div>\r\n <p-table\r\n #TitleTable\r\n [hidden]=\"gridData.length === 0\"\r\n [value]=\"gridData\"\r\n [columns]=\"gridColumns\"\r\n dataKey=\"id\"\r\n [lazy]=\"true\"\r\n [paginator]=\"true\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [sortField]=\"getSortField()\"\r\n [sortOrder]=\"getSortOrder()\"\r\n [first]=\"getRowIndex()\"\r\n [rows]=\"getPageSize()\"\r\n [lazyLoadOnInit]=\"false\"\r\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\r\n (onLazyLoad)=\"updateGrid($event)\"\r\n [(selection)]=\"selected\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n (onRowUnselect)=\"onUnselect($event)\"\r\n sortMode=\"single\"\r\n [selectionMode]=\"'multiple'\"\r\n editMode=\"row\"\r\n [scrollable]=\"true\"\r\n frozenWidth=\"160px\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"table-checkbox-header\" scope=\"col\" [ngStyle]=\"getStyleColumns('checkbox')\">\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <ng-container *ngIf=\"col.orderBy; else notSortable\">\r\n <th [pSortableColumn]=\"col.field\" [scope]=\"'col'\" [ngStyle]=\"getStyleColumns(col.field)\">\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n </ng-container>\r\n <ng-template #notSortable>\r\n <th [scope]=\"'col'\" [ngStyle]=\"getStyleColumns(col.field)\">\r\n {{ col.header }}\r\n </th>\r\n </ng-template>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"frozenheader\">\r\n <tr>\r\n <th scope=\"col\" pFrozenColumn>\r\n {{ 'agro.angular_components.details' | libTranslate }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowIndex=\"rowIndex\"\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n >\r\n <tr [pEditableRow]=\"rowData\" [formGroup]=\"$any(titlesForm.at(rowIndex))\">\r\n <td class=\"table-checkbox-header\" [ngStyle]=\"getStyleColumns('checkbox')\">\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n <td *ngFor=\"let col of columns; let i = index\" [ngStyle]=\"getStyleColumns(col.field)\">\r\n <p-cellEditor>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container [ngSwitch]=\"col.field\">\r\n <ng-container *ngSwitchCase=\"'valuePaid'\">\r\n <input\r\n pInputText\r\n sNumberInput\r\n class=\"w-full\"\r\n id=\"valuePaid-input-{{ rowData.id || rowIndex }}\"\r\n decimalSeparator=\",\"\r\n thousandsSeparator=\".\"\r\n formControlName=\"valuePaid\"\r\n type=\"text\"\r\n [scale]=\"2\"\r\n [allowNegative]=\"false\"\r\n [attr.aria-label]=\"'agro.angular_components.value_paid' | libTranslate\"\r\n />\r\n <br />\r\n <s-control-errors\r\n [control]=\"$any(titlesForm.at(rowIndex)).get('valuePaid')\"\r\n [errorMessages]=\"errorMessage\"\r\n >\r\n </s-control-errors>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ getProp(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n <ng-container [ngSwitch]=\"col.field\">\r\n <ng-container *ngSwitchCase=\"'valuePaid'\">\r\n {{ rowData['valuePaid'] || 0 | currency: 'BRL':'symbol':'1.2-2':'pt-BR' }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ getProp(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"frozenbody\" let-rowData let-columns>\r\n <tr [pEditableRow]=\"rowData\">\r\n <td pFrozenColumn>\r\n <s-button\r\n id=\"details-{{ rowData.id }}\"\r\n (click)=\"showDetails(rowData)\"\r\n (keydown.enter)=\"showDetails(rowData)\"\r\n label=\"{{ 'agro.angular_components.details' | libTranslate }}\"\r\n [priority]=\"'default'\"\r\n [disabled]=\"false\"\r\n [auxiliary]=\"true\"\r\n [size]=\"'small'\"\r\n iconClass=\"fa fa-rocket\"\r\n ></s-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</ng-container>\r\n<s-sidebar\r\n [(visible)]=\"showSidebar\"\r\n position=\"right\"\r\n [header]=\"('agro.angular_components.account_details' | libTranslate) + ' ' + (selectedRow?.numberTitle || '')\"\r\n>\r\n <div class=\"ui-fluid\">\r\n <div class=\"ui-g\">\r\n <ng-container *ngFor=\"let field of sidebarFields\">\r\n <div class=\"ui-g-4\">\r\n <span>\r\n <strong>{{ field.header }}</strong>\r\n </span>\r\n <p>{{ getProp(selectedRow, field) || '-' }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-template #noValue>-</ng-template>\r\n <div class=\"ui-g-4\">\r\n <span>\r\n <strong>{{ 'agro.angular_components.status_label' | libTranslate }}</strong>\r\n </span>\r\n <p>\r\n <ng-container [ngSwitch]=\"selectedRow?.status\">\r\n <span *ngSwitchCase=\"'OPEN'\">\r\n <s-badge\r\n [color]=\"'yellow'\"\r\n text=\"{{ 'agro.angular_components.status_open' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n ></s-badge>\r\n </span>\r\n <span *ngSwitchCase=\"'PAID'\">\r\n <s-badge\r\n [color]=\"'green'\"\r\n text=\"{{ 'agro.angular_components.status_paid' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n ></s-badge>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n <s-footer>\r\n <s-button label=\"{{ 'agro.angular_components.close' | libTranslate }}\" (onClick)=\"closeDetails()\"> </s-button>\r\n </s-footer>\r\n</s-sidebar>\r\n", styles: [".error-message{color:#c13018;margin-top:5px;font-size:12px}\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: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i7.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "component", type: i8.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i8.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i8.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i8.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "component", type: i18.BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign", "enableTruncateText"], outputs: ["selected"] }, { kind: "component", type: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: i16.SidebarComponent, selector: "s-sidebar", inputs: ["visible", "closable", "dismissible", "closeOnEscape", "header", "largeSized", "cache", "registerConfirmClose"], outputs: ["visibleChange"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i11.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i11.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i14.LoadingStateDirective, selector: "[sLoadingState]", inputs: ["sLoadingState"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: i13$2.FooterComponent, selector: "s-footer" }, { kind: "directive", type: i14$2.NumberInputDirective, selector: "input[sNumberInput]", inputs: ["precision", "scale", "decimalSeparator", "thousandsSeparator", "alignTo", "allowNegative", "placeholder"], outputs: ["pasteRejected"] }, { kind: "component", type: i15$1.ControlErrorsComponent, selector: "s-control-errors", inputs: ["id", "control", "errorMessages", "form"] }, { kind: "pipe", type: i6.CurrencyPipe, name: "currency" }, { kind: "pipe", type: LibTranslatePipe, name: "libTranslate" }] });
|
|
8169
8175
|
}
|
|
8170
8176
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FinancialTitleTableComponent, decorators: [{
|
|
8171
8177
|
type: Component,
|
|
@@ -8259,58 +8265,726 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
8259
8265
|
}] });
|
|
8260
8266
|
|
|
8261
8267
|
class ProducerListModalComponent {
|
|
8262
|
-
|
|
8263
|
-
|
|
8268
|
+
cdr = inject(ChangeDetectorRef);
|
|
8269
|
+
activeDialog = inject(ActiveDialog, { optional: true });
|
|
8270
|
+
visible = true;
|
|
8271
|
+
_data = {
|
|
8264
8272
|
title: "",
|
|
8265
8273
|
shouldAbbreviateNames: false,
|
|
8266
8274
|
producers: [],
|
|
8267
8275
|
};
|
|
8268
|
-
|
|
8269
|
-
|
|
8276
|
+
set data(value) {
|
|
8277
|
+
this._data = value;
|
|
8278
|
+
this.cdr.markForCheck();
|
|
8279
|
+
}
|
|
8280
|
+
get data() {
|
|
8281
|
+
return this._data;
|
|
8282
|
+
}
|
|
8270
8283
|
getDisplayName(name) {
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
return
|
|
8284
|
+
const display = this.data?.shouldAbbreviateNames
|
|
8285
|
+
? AgroNameUtils.abbreviateName(name) ?? name
|
|
8286
|
+
: name;
|
|
8287
|
+
return display
|
|
8288
|
+
.split(' ')
|
|
8289
|
+
.map(w => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase())
|
|
8290
|
+
.join(' ');
|
|
8291
|
+
}
|
|
8292
|
+
getInitials(name) {
|
|
8293
|
+
return AgroNameUtils.getInitials(name)?.slice(0, 2) ?? '?';
|
|
8275
8294
|
}
|
|
8276
8295
|
trackByProducerId(_index, producer) {
|
|
8277
8296
|
return producer.id;
|
|
8278
8297
|
}
|
|
8279
8298
|
handleClose() {
|
|
8280
|
-
|
|
8281
|
-
return;
|
|
8282
|
-
}
|
|
8283
|
-
this.visible = false;
|
|
8284
|
-
this.visibleChange.emit(false);
|
|
8285
|
-
this.closed.emit();
|
|
8299
|
+
this.activeDialog?.close();
|
|
8286
8300
|
}
|
|
8287
8301
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProducerListModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8288
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProducerListModalComponent, selector: "s-producer-list-modal", inputs: {
|
|
8302
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ProducerListModalComponent, isStandalone: true, selector: "s-producer-list-modal", inputs: { data: "data" }, ngImport: i0, template: "<s-dialog\r\n [header]=\"data.title\"\r\n size=\"md\"\r\n>\r\n <section class=\"producer-list-content\">\r\n <ul\r\n *ngIf=\"data.producers.length; else emptyState\"\r\n class=\"producer-list\"\r\n >\r\n <li\r\n *ngFor=\"let producer of data.producers; trackBy: trackByProducerId\"\r\n class=\"producer-item\"\r\n [attr.data-producer]=\"producer.id\"\r\n >\r\n <span\r\n class=\"producer-avatar\"\r\n [attr.data-initials]=\"getInitials(producer.name)\"\r\n >{{ getInitials(producer.name) }}</span\r\n >\r\n <span class=\"producer-name\">{{ getDisplayName(producer.name) }}</span>\r\n </li>\r\n </ul>\r\n\r\n <ng-template #emptyState>\r\n <div class=\"empty-state\">\r\n <i class=\"fa fa-users empty-state-icon\"></i>\r\n <p class=\"empty-state-text\">Nenhum produtor informado.</p>\r\n </div>\r\n </ng-template>\r\n </section>\r\n\r\n <ng-template sTemplate=\"footer\">\r\n aaaaa\r\n <s-button\r\n label=\"Fechar\"\r\n priority=\"primary\"\r\n (clicked)=\"handleClose()\"\r\n ></s-button>\r\n </ng-template>\r\n</s-dialog>\r\n", styles: [":host{display:block}.producer-list-content{font-size:.9rem;color:#24313f}.producer-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.producer-item{display:flex;align-items:center;gap:.75rem;padding:.5rem .75rem;border-radius:.5rem;background-color:#f7f9fb;transition:background-color .15s ease}.producer-item:hover{background-color:#edf2f7}.producer-avatar{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;min-width:2rem;border-radius:50%;background-color:#3a7afe;color:#fff;font-size:.7rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;-webkit-user-select:none;user-select:none}.producer-name{font-size:.9rem;font-weight:500;color:#24313f;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.empty-state{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:2rem 0;color:#89a}.empty-state-icon{font-size:2rem;opacity:.4}.empty-state-text{margin:0;font-size:.9rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: DialogComponent, selector: "s-dialog", inputs: ["header", "visible", "size", "contentClassName", "escapeOnEsc", "destroyClickOutside"], outputs: ["visibleChange"] }, { kind: "component", type: ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8289
8303
|
}
|
|
8290
8304
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProducerListModalComponent, decorators: [{
|
|
8291
8305
|
type: Component,
|
|
8292
|
-
args: [{ selector: "s-producer-list-modal", changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
8306
|
+
args: [{ selector: "s-producer-list-modal", changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, DialogComponent, ButtonComponent], template: "<s-dialog\r\n [header]=\"data.title\"\r\n size=\"md\"\r\n>\r\n <section class=\"producer-list-content\">\r\n <ul\r\n *ngIf=\"data.producers.length; else emptyState\"\r\n class=\"producer-list\"\r\n >\r\n <li\r\n *ngFor=\"let producer of data.producers; trackBy: trackByProducerId\"\r\n class=\"producer-item\"\r\n [attr.data-producer]=\"producer.id\"\r\n >\r\n <span\r\n class=\"producer-avatar\"\r\n [attr.data-initials]=\"getInitials(producer.name)\"\r\n >{{ getInitials(producer.name) }}</span\r\n >\r\n <span class=\"producer-name\">{{ getDisplayName(producer.name) }}</span>\r\n </li>\r\n </ul>\r\n\r\n <ng-template #emptyState>\r\n <div class=\"empty-state\">\r\n <i class=\"fa fa-users empty-state-icon\"></i>\r\n <p class=\"empty-state-text\">Nenhum produtor informado.</p>\r\n </div>\r\n </ng-template>\r\n </section>\r\n\r\n <ng-template sTemplate=\"footer\">\r\n aaaaa\r\n <s-button\r\n label=\"Fechar\"\r\n priority=\"primary\"\r\n (clicked)=\"handleClose()\"\r\n ></s-button>\r\n </ng-template>\r\n</s-dialog>\r\n", styles: [":host{display:block}.producer-list-content{font-size:.9rem;color:#24313f}.producer-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.producer-item{display:flex;align-items:center;gap:.75rem;padding:.5rem .75rem;border-radius:.5rem;background-color:#f7f9fb;transition:background-color .15s ease}.producer-item:hover{background-color:#edf2f7}.producer-avatar{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;min-width:2rem;border-radius:50%;background-color:#3a7afe;color:#fff;font-size:.7rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;-webkit-user-select:none;user-select:none}.producer-name{font-size:.9rem;font-weight:500;color:#24313f;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.empty-state{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:2rem 0;color:#89a}.empty-state-icon{font-size:2rem;opacity:.4}.empty-state-text{margin:0;font-size:.9rem}\n"] }]
|
|
8307
|
+
}], propDecorators: { data: [{
|
|
8308
|
+
type: Input
|
|
8309
|
+
}] } });
|
|
8310
|
+
|
|
8311
|
+
class ProducerListModalModule {
|
|
8312
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProducerListModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8313
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ProducerListModalModule, imports: [ProducerListModalComponent], exports: [ProducerListModalComponent] });
|
|
8314
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProducerListModalModule, imports: [ProducerListModalComponent] });
|
|
8315
|
+
}
|
|
8316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProducerListModalModule, decorators: [{
|
|
8317
|
+
type: NgModule,
|
|
8318
|
+
args: [{
|
|
8319
|
+
imports: [ProducerListModalComponent],
|
|
8320
|
+
exports: [ProducerListModalComponent],
|
|
8321
|
+
}]
|
|
8322
|
+
}] });
|
|
8323
|
+
|
|
8324
|
+
/**
|
|
8325
|
+
* Serviço para abrir ProducerListModal programaticamente via DialogService.
|
|
8326
|
+
*
|
|
8327
|
+
* Segue o padrão SDS de uso com `@seniorsistemas/angular-components/dialog`.
|
|
8328
|
+
*
|
|
8329
|
+
* @example
|
|
8330
|
+
* ```typescript
|
|
8331
|
+
* constructor(private readonly producerListModalService: ProducerListModalService) {}
|
|
8332
|
+
*
|
|
8333
|
+
* openProducerList(): void {
|
|
8334
|
+
* this.producerListModalService.open({
|
|
8335
|
+
* data: {
|
|
8336
|
+
* title: 'Produtores',
|
|
8337
|
+
* shouldAbbreviateNames: true,
|
|
8338
|
+
* producers: [...]
|
|
8339
|
+
* },
|
|
8340
|
+
* size: 'md'
|
|
8341
|
+
* });
|
|
8342
|
+
* }
|
|
8343
|
+
* ```
|
|
8344
|
+
*/
|
|
8345
|
+
class ProducerListModalService {
|
|
8346
|
+
dialogService;
|
|
8347
|
+
constructor(dialogService) {
|
|
8348
|
+
this.dialogService = dialogService;
|
|
8349
|
+
}
|
|
8350
|
+
/**
|
|
8351
|
+
* Abre a modal de lista de produtores.
|
|
8352
|
+
*
|
|
8353
|
+
* @param options Configuração do modal (dados, tamanho, comportamento)
|
|
8354
|
+
*/
|
|
8355
|
+
open(options) {
|
|
8356
|
+
const { data, size = 'md', escapeOnEsc = true, destroyClickOutside = true, } = options;
|
|
8357
|
+
const dialogRef = this.dialogService.open(ProducerListModalComponent, {
|
|
8358
|
+
escapeOnEsc,
|
|
8359
|
+
destroyClickOutside,
|
|
8360
|
+
});
|
|
8361
|
+
dialogRef.componentInstance.data = data;
|
|
8362
|
+
}
|
|
8363
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProducerListModalService, deps: [{ token: i1$2.DialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8364
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProducerListModalService, providedIn: 'root' });
|
|
8365
|
+
}
|
|
8366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProducerListModalService, decorators: [{
|
|
8367
|
+
type: Injectable,
|
|
8368
|
+
args: [{
|
|
8369
|
+
providedIn: 'root',
|
|
8370
|
+
}]
|
|
8371
|
+
}], ctorParameters: () => [{ type: i1$2.DialogService }] });
|
|
8372
|
+
|
|
8373
|
+
/**
|
|
8374
|
+
* Componente visual do modal de eventos de beleza.
|
|
8375
|
+
*
|
|
8376
|
+
* Aberto programaticamente via {@link ModalBeautyEventsService}.
|
|
8377
|
+
* Recebe configurações através de {@link DynamicDialogConfig} e controla
|
|
8378
|
+
* seu ciclo de vida via {@link DynamicDialogRef}.
|
|
8379
|
+
*
|
|
8380
|
+
* @example
|
|
8381
|
+
* // Nunca instancie diretamente — use ModalBeautyEventsService.open()
|
|
8382
|
+
*/
|
|
8383
|
+
class ModalBeautyEventsComponent {
|
|
8384
|
+
dialogService;
|
|
8385
|
+
/** Configuração recebida pelo serviço via `componentInstance.config`. */
|
|
8386
|
+
config = {};
|
|
8387
|
+
progressPercentage = 50;
|
|
8388
|
+
showSubElements = false;
|
|
8389
|
+
constructor(dialogService) {
|
|
8390
|
+
this.dialogService = dialogService;
|
|
8391
|
+
}
|
|
8392
|
+
get subElements() {
|
|
8393
|
+
return this.config?.subElements ?? [];
|
|
8394
|
+
}
|
|
8395
|
+
/** Fecha o modal com um resultado positivo (confirmação). */
|
|
8396
|
+
close(result) {
|
|
8397
|
+
}
|
|
8398
|
+
/** Descarta o modal (cancelamento). */
|
|
8399
|
+
dismiss() {
|
|
8400
|
+
}
|
|
8401
|
+
toggleSubElements() {
|
|
8402
|
+
this.showSubElements = !this.showSubElements;
|
|
8403
|
+
}
|
|
8404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalBeautyEventsComponent, deps: [{ token: i2$1.DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8405
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ModalBeautyEventsComponent, isStandalone: true, selector: "s-modal-beauty-events", ngImport: i0, template: "<s-dialog header=\"Teste Header\" >\r\n <div class=\"grid grid-cols-12\">\r\n <div class=\"col-span-12\">Componente gerado via Template.</div>\r\n </div>\r\n\r\n <ng-template\r\n sTemplate=\"footer\"\r\n let-activeDialog=\"activeDialog\"\r\n >\r\n <div class=\"grid grid-cols-12\">\r\n <div class=\"col-span-12 flex justify-around\">\r\n <s-button\r\n label=\"A\u00E7\u00E3o terci\u00E1ria\"\r\n priority=\"link\"\r\n [disabled]=\"false\"\r\n [auxiliary]=\"false\"\r\n />\r\n <s-button\r\n (clicked)=\"activeDialog.dismiss('Dismissed dialog demo footer')\"\r\n label=\"A\u00E7\u00E3o secund\u00E1ria\"\r\n priority=\"secondary\"\r\n [disabled]=\"false\"\r\n [auxiliary]=\"false\"\r\n />\r\n <s-button\r\n label=\"A\u00E7\u00E3o prim\u00E1ria\"\r\n (clicked)=\"activeDialog.close('Closed dialog demo footer')\"\r\n priority=\"primary\"\r\n [disabled]=\"false\"\r\n [auxiliary]=\"false\"\r\n />\r\n </div>\r\n </div>\r\n </ng-template>\r\n</s-dialog>", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "ngmodule", type: TemplateModule }, { kind: "directive", type: i2$3.TemplateDirective, selector: "[sTemplate]", inputs: ["sTemplate"] }, { kind: "component", type: DialogComponent, selector: "s-dialog", inputs: ["header", "visible", "size", "contentClassName", "escapeOnEsc", "destroyClickOutside"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: PanelModule$1 }] });
|
|
8406
|
+
}
|
|
8407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalBeautyEventsComponent, decorators: [{
|
|
8408
|
+
type: Component,
|
|
8409
|
+
args: [{ selector: 's-modal-beauty-events', standalone: true, imports: [ButtonComponent, TemplateModule, DialogComponent, PanelModule$1], template: "<s-dialog header=\"Teste Header\" >\r\n <div class=\"grid grid-cols-12\">\r\n <div class=\"col-span-12\">Componente gerado via Template.</div>\r\n </div>\r\n\r\n <ng-template\r\n sTemplate=\"footer\"\r\n let-activeDialog=\"activeDialog\"\r\n >\r\n <div class=\"grid grid-cols-12\">\r\n <div class=\"col-span-12 flex justify-around\">\r\n <s-button\r\n label=\"A\u00E7\u00E3o terci\u00E1ria\"\r\n priority=\"link\"\r\n [disabled]=\"false\"\r\n [auxiliary]=\"false\"\r\n />\r\n <s-button\r\n (clicked)=\"activeDialog.dismiss('Dismissed dialog demo footer')\"\r\n label=\"A\u00E7\u00E3o secund\u00E1ria\"\r\n priority=\"secondary\"\r\n [disabled]=\"false\"\r\n [auxiliary]=\"false\"\r\n />\r\n <s-button\r\n label=\"A\u00E7\u00E3o prim\u00E1ria\"\r\n (clicked)=\"activeDialog.close('Closed dialog demo footer')\"\r\n priority=\"primary\"\r\n [disabled]=\"false\"\r\n [auxiliary]=\"false\"\r\n />\r\n </div>\r\n </div>\r\n </ng-template>\r\n</s-dialog>" }]
|
|
8410
|
+
}], ctorParameters: () => [{ type: i2$1.DialogService }] });
|
|
8411
|
+
|
|
8412
|
+
class ModalBeautyEventsService {
|
|
8413
|
+
dialogService;
|
|
8414
|
+
constructor(dialogService) {
|
|
8415
|
+
this.dialogService = dialogService;
|
|
8416
|
+
}
|
|
8417
|
+
/**
|
|
8418
|
+
* Abre o modal de eventos de beleza.
|
|
8419
|
+
*
|
|
8420
|
+
* @param options Opções de configuração e exibição do modal.
|
|
8421
|
+
* @returns Referência ao dialog aberto ({@link DialogRef}).
|
|
8422
|
+
*/
|
|
8423
|
+
open(options) {
|
|
8424
|
+
const { config = {}, size = 'md', destroyClickOutside = true, escapeOnEsc = true, } = options;
|
|
8425
|
+
const dialogOptions = {};
|
|
8426
|
+
const dialogRef = this.dialogService.open(ModalBeautyEventsComponent, dialogOptions);
|
|
8427
|
+
return dialogRef;
|
|
8428
|
+
}
|
|
8429
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalBeautyEventsService, deps: [{ token: i2$1.DialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8430
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalBeautyEventsService, providedIn: 'root' });
|
|
8431
|
+
}
|
|
8432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ModalBeautyEventsService, decorators: [{
|
|
8433
|
+
type: Injectable,
|
|
8434
|
+
args: [{
|
|
8435
|
+
providedIn: 'root',
|
|
8436
|
+
}]
|
|
8437
|
+
}], ctorParameters: () => [{ type: i2$1.DialogService }] });
|
|
8438
|
+
|
|
8439
|
+
class E070FilService extends AgroEntityService {
|
|
8440
|
+
http;
|
|
8441
|
+
messageService;
|
|
8442
|
+
translate;
|
|
8443
|
+
/**
|
|
8444
|
+
* Exponibiliza o método get herdado para uso externo.
|
|
8445
|
+
*/
|
|
8446
|
+
get(id, errorMessage = []) {
|
|
8447
|
+
return super.get(id, errorMessage);
|
|
8448
|
+
}
|
|
8449
|
+
constructor(http, messageService, translate) {
|
|
8450
|
+
super(http, messageService, `agro/origination/entities/e070fil`, `agro/origination/actions`, `agro/origination/queries`, translate);
|
|
8451
|
+
this.http = http;
|
|
8452
|
+
this.messageService = messageService;
|
|
8453
|
+
this.translate = translate;
|
|
8454
|
+
}
|
|
8455
|
+
listExternalE001Tns(listParams) {
|
|
8456
|
+
return this.http
|
|
8457
|
+
.get("erpx_fnd/transacao/entities/e070fil", {
|
|
8458
|
+
params: this.getListQueryParams(listParams),
|
|
8459
|
+
})
|
|
8460
|
+
.pipe(this.defaultCatch());
|
|
8461
|
+
}
|
|
8462
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8463
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilService });
|
|
8464
|
+
}
|
|
8465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilService, decorators: [{
|
|
8466
|
+
type: Injectable
|
|
8467
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }] });
|
|
8468
|
+
|
|
8469
|
+
const DB_NAME = "agroWorkspace";
|
|
8470
|
+
const DB_VERSION = 1;
|
|
8471
|
+
const STORE_NAME = "userWorkspaces";
|
|
8472
|
+
const VISIBILITY_KEY = "agro.workspace.visible";
|
|
8473
|
+
const SELECTED_KEY = "agro.workspace.selected";
|
|
8474
|
+
class AgroWorkspaceSwitchService {
|
|
8475
|
+
e070FilService;
|
|
8476
|
+
currentWorkspace$ = new BehaviorSubject(null);
|
|
8477
|
+
workspaceEmpty$ = new BehaviorSubject(false);
|
|
8478
|
+
visible$ = new BehaviorSubject(this.readVisibilityFromSession());
|
|
8479
|
+
dbPromise = null;
|
|
8480
|
+
constructor(e070FilService) {
|
|
8481
|
+
this.e070FilService = e070FilService;
|
|
8482
|
+
}
|
|
8483
|
+
onWorkspaceSwitch(callback) {
|
|
8484
|
+
this.currentWorkspace$
|
|
8485
|
+
.pipe(filter$1((workspace) => workspace !== null))
|
|
8486
|
+
.subscribe(callback);
|
|
8487
|
+
}
|
|
8488
|
+
onWorkspaceIsEmpty(callback) {
|
|
8489
|
+
this.workspaceEmpty$.pipe(filter$1((isEmpty) => isEmpty)).subscribe(() => callback());
|
|
8490
|
+
}
|
|
8491
|
+
hide() {
|
|
8492
|
+
this.visible$.next(false);
|
|
8493
|
+
this.saveVisibilityOnSession(false);
|
|
8494
|
+
}
|
|
8495
|
+
show() {
|
|
8496
|
+
this.visible$.next(true);
|
|
8497
|
+
this.saveVisibilityOnSession(true);
|
|
8498
|
+
}
|
|
8499
|
+
getVisibility() {
|
|
8500
|
+
return this.visible$;
|
|
8501
|
+
}
|
|
8502
|
+
getCurrentWorkspace() {
|
|
8503
|
+
return this.currentWorkspace$;
|
|
8504
|
+
}
|
|
8505
|
+
/**
|
|
8506
|
+
* Carrega workspaces do usuario no IndexedDB e valida acesso no backend.
|
|
8507
|
+
*/
|
|
8508
|
+
async loadUserWorkspaces(user) {
|
|
8509
|
+
if (!user) {
|
|
8510
|
+
this.workspaceEmpty$.next(true);
|
|
8511
|
+
return [];
|
|
8512
|
+
}
|
|
8513
|
+
const record = await this.getDbRecord(user);
|
|
8514
|
+
if (!record?.workspaces?.length) {
|
|
8515
|
+
this.workspaceEmpty$.next(true);
|
|
8516
|
+
return [];
|
|
8517
|
+
}
|
|
8518
|
+
const validated = await this.validateWorkspaceAccess(record.workspaces);
|
|
8519
|
+
if (!validated.length) {
|
|
8520
|
+
this.workspaceEmpty$.next(true);
|
|
8521
|
+
await this.saveUserWorkspaces(user, []);
|
|
8522
|
+
return [];
|
|
8523
|
+
}
|
|
8524
|
+
this.workspaceEmpty$.next(false);
|
|
8525
|
+
this.currentWorkspace$.next(validated[0]);
|
|
8526
|
+
if (validated.length !== record.workspaces.length) {
|
|
8527
|
+
await this.saveUserWorkspaces(user, validated);
|
|
8528
|
+
}
|
|
8529
|
+
return validated;
|
|
8530
|
+
}
|
|
8531
|
+
async saveUserWorkspaces(user, workspaces) {
|
|
8532
|
+
const db = await this.getDb();
|
|
8533
|
+
await new Promise((resolve, reject) => {
|
|
8534
|
+
const tx = db.transaction(STORE_NAME, "readwrite");
|
|
8535
|
+
const store = tx.objectStore(STORE_NAME);
|
|
8536
|
+
store.put({ user, workspaces });
|
|
8537
|
+
tx.oncomplete = () => resolve();
|
|
8538
|
+
tx.onerror = () => reject(tx.error);
|
|
8539
|
+
tx.onabort = () => reject(tx.error);
|
|
8540
|
+
});
|
|
8541
|
+
this.workspaceEmpty$.next(workspaces.length === 0);
|
|
8542
|
+
}
|
|
8543
|
+
async addWorkspace(user, workspace) {
|
|
8544
|
+
const current = await this.loadUserWorkspaces(user);
|
|
8545
|
+
const exists = current.some(item => item.branch?.id === workspace.branch?.id);
|
|
8546
|
+
const next = exists ? current : [workspace, ...current];
|
|
8547
|
+
await this.saveUserWorkspaces(user, next);
|
|
8548
|
+
this.currentWorkspace$.next(workspace);
|
|
8549
|
+
return next;
|
|
8550
|
+
}
|
|
8551
|
+
/**
|
|
8552
|
+
* Seta o workspace atual e persiste no IndexedDB.
|
|
8553
|
+
*/
|
|
8554
|
+
async setCurrentWorkspace(workspace) {
|
|
8555
|
+
this.workspaceEmpty$.next(false);
|
|
8556
|
+
this.currentWorkspace$.next(workspace);
|
|
8557
|
+
await this.saveSelectedWorkspace(this.getCurrentUser(), workspace);
|
|
8558
|
+
}
|
|
8559
|
+
/**
|
|
8560
|
+
* Recupera o workspace selecionado do IndexedDB.
|
|
8561
|
+
*/
|
|
8562
|
+
async getSelectedWorkspace(user) {
|
|
8563
|
+
const db = await this.getDb();
|
|
8564
|
+
return await new Promise((resolve, reject) => {
|
|
8565
|
+
const tx = db.transaction(STORE_NAME, "readonly");
|
|
8566
|
+
const store = tx.objectStore(STORE_NAME);
|
|
8567
|
+
const request = store.get(`${SELECTED_KEY}_${user}`);
|
|
8568
|
+
request.onsuccess = () => {
|
|
8569
|
+
resolve(request.result?.workspace || null);
|
|
8570
|
+
};
|
|
8571
|
+
request.onerror = () => reject(request.error);
|
|
8572
|
+
});
|
|
8573
|
+
}
|
|
8574
|
+
/**
|
|
8575
|
+
* Salva o workspace selecionado no IndexedDB.
|
|
8576
|
+
*/
|
|
8577
|
+
async saveSelectedWorkspace(user, workspace) {
|
|
8578
|
+
const db = await this.getDb();
|
|
8579
|
+
await new Promise((resolve, reject) => {
|
|
8580
|
+
const tx = db.transaction(STORE_NAME, "readwrite");
|
|
8581
|
+
const store = tx.objectStore(STORE_NAME);
|
|
8582
|
+
store.put({ user: `${SELECTED_KEY}_${user}`, workspace });
|
|
8583
|
+
tx.oncomplete = () => resolve();
|
|
8584
|
+
tx.onerror = () => reject(tx.error);
|
|
8585
|
+
tx.onabort = () => reject(tx.error);
|
|
8586
|
+
});
|
|
8587
|
+
}
|
|
8588
|
+
getCurrentUser() {
|
|
8589
|
+
return (AgroPlatformUtils.getCurrentUserEmail() ||
|
|
8590
|
+
AgroPlatformUtils.getCurrentUserUsername() ||
|
|
8591
|
+
"anonymous");
|
|
8592
|
+
}
|
|
8593
|
+
async validateWorkspaceAccess(workspaces) {
|
|
8594
|
+
const validated = [];
|
|
8595
|
+
for (const workspace of workspaces) {
|
|
8596
|
+
if (!workspace?.branch?.id) {
|
|
8597
|
+
continue;
|
|
8598
|
+
}
|
|
8599
|
+
try {
|
|
8600
|
+
// Utiliza get (HttpClient) herdado de AgroEntityService para garantir interceptors.
|
|
8601
|
+
await firstValueFrom(this.e070FilService.get(workspace.branch.id));
|
|
8602
|
+
validated.push(workspace);
|
|
8603
|
+
}
|
|
8604
|
+
catch {
|
|
8605
|
+
// Ignora workspaces sem acesso no backend.
|
|
8606
|
+
}
|
|
8607
|
+
}
|
|
8608
|
+
return validated;
|
|
8609
|
+
}
|
|
8610
|
+
async getDbRecord(user) {
|
|
8611
|
+
const db = await this.getDb();
|
|
8612
|
+
return await new Promise((resolve, reject) => {
|
|
8613
|
+
const tx = db.transaction(STORE_NAME, "readonly");
|
|
8614
|
+
const store = tx.objectStore(STORE_NAME);
|
|
8615
|
+
const request = store.get(user);
|
|
8616
|
+
request.onsuccess = () => {
|
|
8617
|
+
resolve(request.result || null);
|
|
8618
|
+
};
|
|
8619
|
+
request.onerror = () => reject(request.error);
|
|
8620
|
+
});
|
|
8621
|
+
}
|
|
8622
|
+
async getDb() {
|
|
8623
|
+
if (!this.dbPromise) {
|
|
8624
|
+
this.dbPromise = this.openDb();
|
|
8625
|
+
}
|
|
8626
|
+
return this.dbPromise;
|
|
8627
|
+
}
|
|
8628
|
+
openDb() {
|
|
8629
|
+
return new Promise((resolve, reject) => {
|
|
8630
|
+
const request = indexedDB.open(DB_NAME, DB_VERSION);
|
|
8631
|
+
request.onupgradeneeded = () => {
|
|
8632
|
+
const db = request.result;
|
|
8633
|
+
if (!db.objectStoreNames.contains(STORE_NAME)) {
|
|
8634
|
+
db.createObjectStore(STORE_NAME, { keyPath: "user" });
|
|
8635
|
+
}
|
|
8636
|
+
};
|
|
8637
|
+
request.onsuccess = () => resolve(request.result);
|
|
8638
|
+
request.onerror = () => reject(request.error);
|
|
8639
|
+
});
|
|
8640
|
+
}
|
|
8641
|
+
readVisibilityFromSession() {
|
|
8642
|
+
const value = sessionStorage.getItem(VISIBILITY_KEY);
|
|
8643
|
+
if (value === null) {
|
|
8644
|
+
return true;
|
|
8645
|
+
}
|
|
8646
|
+
return value === "true";
|
|
8647
|
+
}
|
|
8648
|
+
saveVisibilityOnSession(value) {
|
|
8649
|
+
sessionStorage.setItem(VISIBILITY_KEY, String(value));
|
|
8650
|
+
}
|
|
8651
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceSwitchService, deps: [{ token: E070FilService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8652
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceSwitchService });
|
|
8653
|
+
}
|
|
8654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceSwitchService, decorators: [{
|
|
8655
|
+
type: Injectable
|
|
8656
|
+
}], ctorParameters: () => [{ type: E070FilService }] });
|
|
8657
|
+
|
|
8658
|
+
class AgroWorkspaceLookupComponent {
|
|
8659
|
+
visible = false;
|
|
8660
|
+
loading = false;
|
|
8661
|
+
branches = [];
|
|
8662
|
+
visibleChange = new EventEmitter();
|
|
8663
|
+
branchSelected = new EventEmitter();
|
|
8664
|
+
selectedBranch = null;
|
|
8665
|
+
onVisibleChange(visible) {
|
|
8666
|
+
this.visible = visible;
|
|
8667
|
+
this.visibleChange.emit(visible);
|
|
8668
|
+
}
|
|
8669
|
+
close() {
|
|
8670
|
+
this.selectedBranch = null;
|
|
8671
|
+
this.onVisibleChange(false);
|
|
8672
|
+
}
|
|
8673
|
+
select() {
|
|
8674
|
+
if (!this.selectedBranch) {
|
|
8675
|
+
return;
|
|
8676
|
+
}
|
|
8677
|
+
this.branchSelected.emit(this.selectedBranch);
|
|
8678
|
+
this.close();
|
|
8679
|
+
}
|
|
8680
|
+
onSelectionChange(branch) {
|
|
8681
|
+
this.selectedBranch = branch;
|
|
8682
|
+
}
|
|
8683
|
+
getBranchDocumentLabel(branch) {
|
|
8684
|
+
const document = branch?.numCgc;
|
|
8685
|
+
return document ? String(document) : "-";
|
|
8686
|
+
}
|
|
8687
|
+
getCompanyLabel(branch) {
|
|
8688
|
+
const code = branch?.e070emp?.codEmp;
|
|
8689
|
+
const name = branch?.e070emp?.nomEmp;
|
|
8690
|
+
if (code && name) {
|
|
8691
|
+
return `${code} - ${name}`;
|
|
8692
|
+
}
|
|
8693
|
+
return name || "-";
|
|
8694
|
+
}
|
|
8695
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceLookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8696
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AgroWorkspaceLookupComponent, selector: "s-agro-workspace-lookup", inputs: { visible: "visible", loading: "loading", branches: "branches" }, outputs: { visibleChange: "visibleChange", branchSelected: "branchSelected" }, ngImport: i0, template: "<s-dialog\r\n [(visible)]=\"visible\"\r\n (visibleChange)=\"onVisibleChange(!!$event)\"\r\n [header]=\"'Selecionar workspace'\"\r\n size=\"lg\"\r\n contentClassName=\"agro-workspace-lookup-dialog\"\r\n>\r\n <div class=\"lookup-content\" *sLoadingState=\"loading\">\r\n <p-table\r\n [value]=\"branches\"\r\n dataKey=\"id\"\r\n selectionMode=\"single\"\r\n [selection]=\"selectedBranch\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n responsiveLayout=\"scroll\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th scope=\"col\">Filial</th>\r\n <th scope=\"col\">CPF/CNPJ</th>\r\n <th scope=\"col\">Empresa</th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr [pSelectableRow]=\"rowData\">\r\n <td>{{ rowData?.nomFil || '-' }}</td>\r\n <td>{{ getBranchDocumentLabel(rowData) }}</td>\r\n <td>{{ getCompanyLabel(rowData) }}</td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n\r\n <div class=\"lookup-actions\">\r\n <s-button\r\n type=\"button\"\r\n priority=\"link\"\r\n [label]=\"'Cancelar'\"\r\n (clicked)=\"close()\"\r\n ></s-button>\r\n <s-button\r\n type=\"button\"\r\n [label]=\"'Selecionar'\"\r\n [disabled]=\"!selectedBranch\"\r\n (clicked)=\"select()\"\r\n ></s-button>\r\n </div>\r\n</s-dialog>\r\n", styles: [".lookup-content{min-height:240px}.lookup-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:8px}\n"], dependencies: [{ kind: "component", type: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: i1$2.DialogComponent, selector: "s-dialog", inputs: ["header", "visible", "size", "contentClassName", "escapeOnEsc", "destroyClickOutside"], outputs: ["visibleChange"] }, { kind: "directive", type: i14.LoadingStateDirective, selector: "[sLoadingState]", inputs: ["sLoadingState"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i8.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8697
|
+
}
|
|
8698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceLookupComponent, decorators: [{
|
|
8699
|
+
type: Component,
|
|
8700
|
+
args: [{ selector: "s-agro-workspace-lookup", changeDetection: ChangeDetectionStrategy.OnPush, template: "<s-dialog\r\n [(visible)]=\"visible\"\r\n (visibleChange)=\"onVisibleChange(!!$event)\"\r\n [header]=\"'Selecionar workspace'\"\r\n size=\"lg\"\r\n contentClassName=\"agro-workspace-lookup-dialog\"\r\n>\r\n <div class=\"lookup-content\" *sLoadingState=\"loading\">\r\n <p-table\r\n [value]=\"branches\"\r\n dataKey=\"id\"\r\n selectionMode=\"single\"\r\n [selection]=\"selectedBranch\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n responsiveLayout=\"scroll\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th scope=\"col\">Filial</th>\r\n <th scope=\"col\">CPF/CNPJ</th>\r\n <th scope=\"col\">Empresa</th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr [pSelectableRow]=\"rowData\">\r\n <td>{{ rowData?.nomFil || '-' }}</td>\r\n <td>{{ getBranchDocumentLabel(rowData) }}</td>\r\n <td>{{ getCompanyLabel(rowData) }}</td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n\r\n <div class=\"lookup-actions\">\r\n <s-button\r\n type=\"button\"\r\n priority=\"link\"\r\n [label]=\"'Cancelar'\"\r\n (clicked)=\"close()\"\r\n ></s-button>\r\n <s-button\r\n type=\"button\"\r\n [label]=\"'Selecionar'\"\r\n [disabled]=\"!selectedBranch\"\r\n (clicked)=\"select()\"\r\n ></s-button>\r\n </div>\r\n</s-dialog>\r\n", styles: [".lookup-content{min-height:240px}.lookup-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:8px}\n"] }]
|
|
8293
8701
|
}], propDecorators: { visible: [{
|
|
8294
8702
|
type: Input
|
|
8295
|
-
}],
|
|
8703
|
+
}], loading: [{
|
|
8704
|
+
type: Input
|
|
8705
|
+
}], branches: [{
|
|
8296
8706
|
type: Input
|
|
8297
8707
|
}], visibleChange: [{
|
|
8298
8708
|
type: Output
|
|
8299
|
-
}],
|
|
8709
|
+
}], branchSelected: [{
|
|
8300
8710
|
type: Output
|
|
8301
8711
|
}] } });
|
|
8302
8712
|
|
|
8303
|
-
class
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8713
|
+
class AgroWorkspaceComponent {
|
|
8714
|
+
workspaceSwitchService;
|
|
8715
|
+
e070FilService;
|
|
8716
|
+
changeDetectorRef;
|
|
8717
|
+
currentCompany = new BehaviorSubject(null);
|
|
8718
|
+
visible = true;
|
|
8719
|
+
loading = false;
|
|
8720
|
+
lookupVisible = false;
|
|
8721
|
+
workspaces = [];
|
|
8722
|
+
savedWorkspaces = [];
|
|
8723
|
+
availableBranches = [];
|
|
8724
|
+
constructor(workspaceSwitchService, e070FilService, changeDetectorRef) {
|
|
8725
|
+
this.workspaceSwitchService = workspaceSwitchService;
|
|
8726
|
+
this.e070FilService = e070FilService;
|
|
8727
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
8728
|
+
}
|
|
8729
|
+
async ngOnInit() {
|
|
8730
|
+
this.workspaceSwitchService.getVisibility().subscribe((visible) => {
|
|
8731
|
+
this.visible = visible;
|
|
8732
|
+
this.changeDetectorRef.markForCheck();
|
|
8733
|
+
});
|
|
8734
|
+
await this.loadWorkspaces();
|
|
8735
|
+
// Recupera workspace selecionado e seta como atual
|
|
8736
|
+
const user = this.workspaceSwitchService.getCurrentUser();
|
|
8737
|
+
const selected = await this.workspaceSwitchService.getSelectedWorkspace(user);
|
|
8738
|
+
if (selected) {
|
|
8739
|
+
this.currentCompany.next(selected.company || null);
|
|
8740
|
+
await this.workspaceSwitchService.setCurrentWorkspace(selected);
|
|
8741
|
+
}
|
|
8742
|
+
}
|
|
8743
|
+
async onWorkspaceSelected(workspace) {
|
|
8744
|
+
const selected = this.savedWorkspaces.find(item => item.branch?.id === workspace.id);
|
|
8745
|
+
if (!selected) {
|
|
8746
|
+
return;
|
|
8747
|
+
}
|
|
8748
|
+
this.currentCompany.next(selected.company || null);
|
|
8749
|
+
await this.workspaceSwitchService.setCurrentWorkspace(selected);
|
|
8750
|
+
}
|
|
8751
|
+
async onFooterButtonClicked() {
|
|
8752
|
+
this.lookupVisible = true;
|
|
8753
|
+
if (this.availableBranches.length) {
|
|
8754
|
+
return;
|
|
8755
|
+
}
|
|
8756
|
+
this.loading = true;
|
|
8757
|
+
this.changeDetectorRef.markForCheck();
|
|
8758
|
+
try {
|
|
8759
|
+
const listResponse = (await firstValueFrom(this.e070FilService.list({
|
|
8760
|
+
page: 0,
|
|
8761
|
+
size: 50,
|
|
8762
|
+
sort: [{ field: "nomFil", order: 1 }],
|
|
8763
|
+
displayFields: ["id", "codFil", "nomFil", "numCgc", "e070emp.id", "e070emp.codEmp", "e070emp.nomEmp"]
|
|
8764
|
+
})));
|
|
8765
|
+
this.availableBranches = (listResponse?.contents || []);
|
|
8766
|
+
}
|
|
8767
|
+
finally {
|
|
8768
|
+
this.loading = false;
|
|
8769
|
+
this.changeDetectorRef.markForCheck();
|
|
8770
|
+
}
|
|
8771
|
+
}
|
|
8772
|
+
async onLookupBranchSelected(branch) {
|
|
8773
|
+
const user = this.workspaceSwitchService.getCurrentUser();
|
|
8774
|
+
const workspace = {
|
|
8775
|
+
company: (branch.e070emp || {}),
|
|
8776
|
+
branch
|
|
8777
|
+
};
|
|
8778
|
+
this.savedWorkspaces = await this.workspaceSwitchService.addWorkspace(user, workspace);
|
|
8779
|
+
this.currentCompany.next(workspace.company || null);
|
|
8780
|
+
this.mapWorkspaceSwitchItems();
|
|
8781
|
+
this.lookupVisible = false;
|
|
8782
|
+
this.changeDetectorRef.markForCheck();
|
|
8783
|
+
}
|
|
8784
|
+
onLookupVisibleChange(visible) {
|
|
8785
|
+
this.lookupVisible = visible;
|
|
8786
|
+
this.changeDetectorRef.markForCheck();
|
|
8787
|
+
}
|
|
8788
|
+
async loadWorkspaces() {
|
|
8789
|
+
const user = this.workspaceSwitchService.getCurrentUser();
|
|
8790
|
+
this.loading = true;
|
|
8791
|
+
this.changeDetectorRef.markForCheck();
|
|
8792
|
+
try {
|
|
8793
|
+
this.savedWorkspaces = await this.workspaceSwitchService.loadUserWorkspaces(user);
|
|
8794
|
+
if (!this.savedWorkspaces.length) {
|
|
8795
|
+
const listResponse = (await firstValueFrom(this.e070FilService.list({
|
|
8796
|
+
page: 0,
|
|
8797
|
+
size: 5,
|
|
8798
|
+
sort: [{ field: "nomFil", order: 1 }],
|
|
8799
|
+
displayFields: ["id", "codFil", "nomFil", "numCgc", "e070emp.id", "e070emp.codEmp", "e070emp.nomEmp"]
|
|
8800
|
+
})));
|
|
8801
|
+
const branches = (listResponse?.contents || []);
|
|
8802
|
+
this.savedWorkspaces = branches.map((branch) => ({
|
|
8803
|
+
company: (branch.e070emp || {}),
|
|
8804
|
+
branch
|
|
8805
|
+
}));
|
|
8806
|
+
await this.workspaceSwitchService.saveUserWorkspaces(user, this.savedWorkspaces);
|
|
8807
|
+
}
|
|
8808
|
+
if (this.savedWorkspaces.length) {
|
|
8809
|
+
const firstWorkspace = this.savedWorkspaces[0];
|
|
8810
|
+
this.currentCompany.next(firstWorkspace.company || null);
|
|
8811
|
+
await this.workspaceSwitchService.setCurrentWorkspace(firstWorkspace);
|
|
8812
|
+
}
|
|
8813
|
+
this.mapWorkspaceSwitchItems();
|
|
8814
|
+
}
|
|
8815
|
+
finally {
|
|
8816
|
+
this.loading = false;
|
|
8817
|
+
this.changeDetectorRef.markForCheck();
|
|
8818
|
+
}
|
|
8819
|
+
}
|
|
8820
|
+
mapWorkspaceSwitchItems() {
|
|
8821
|
+
this.workspaces = this.savedWorkspaces.map((workspace) => {
|
|
8822
|
+
const branchName = workspace.branch?.nomFil ?? "";
|
|
8823
|
+
const branchDocument = this.formatDocument(String(workspace.branch?.numCgc ?? ""));
|
|
8824
|
+
const companyName = workspace.company?.nomEmp ?? "";
|
|
8825
|
+
return {
|
|
8826
|
+
id: workspace.branch?.id || "",
|
|
8827
|
+
title: branchName,
|
|
8828
|
+
subtitle: `${branchDocument} - ${companyName}`
|
|
8829
|
+
};
|
|
8830
|
+
});
|
|
8831
|
+
}
|
|
8832
|
+
/**
|
|
8833
|
+
* Formata CNPJ/CPF.
|
|
8834
|
+
*/
|
|
8835
|
+
formatDocument(doc) {
|
|
8836
|
+
if (!doc)
|
|
8837
|
+
return "";
|
|
8838
|
+
if (doc.length === 14) {
|
|
8839
|
+
// CNPJ: 00.000.000/0000-00
|
|
8840
|
+
return doc.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/, "$1.$2.$3/$4-$5");
|
|
8841
|
+
}
|
|
8842
|
+
if (doc.length === 11) {
|
|
8843
|
+
// CPF: 000.000.000-00
|
|
8844
|
+
return doc.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "$1.$2.$3-$4");
|
|
8845
|
+
}
|
|
8846
|
+
return doc;
|
|
8847
|
+
}
|
|
8848
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceComponent, deps: [{ token: AgroWorkspaceSwitchService }, { token: E070FilService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8849
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AgroWorkspaceComponent, selector: "s-agro-workspace", ngImport: i0, template: "<div *ngIf=\"visible\" class=\"agro-workspace\">\r\n <ng-container *ngIf=\"workspaces.length > 0; else emptyWorkspaceState\">\r\n <s-workspace-switch\r\n [workspaces]=\"workspaces\"\r\n [footerButtonLabel]=\"'Adicionar workspace'\"\r\n [disabled]=\"loading\"\r\n (selected)=\"onWorkspaceSelected($event)\"\r\n (footerButtonClicked)=\"onFooterButtonClicked()\"\r\n ></s-workspace-switch>\r\n </ng-container>\r\n\r\n <ng-template #emptyWorkspaceState>\r\n <div class=\"agro-workspace__empty-state\">\r\n <s-button\r\n label=\"Adicionar workspace\"\r\n priority=\"primary\"\r\n [disabled]=\"loading\"\r\n (clicked)=\"onFooterButtonClicked()\"\r\n ></s-button>\r\n </div>\r\n </ng-template>\r\n\r\n <s-agro-workspace-lookup\r\n [visible]=\"lookupVisible\"\r\n [branches]=\"availableBranches\"\r\n [loading]=\"loading\"\r\n (visibleChange)=\"onLookupVisibleChange($event)\"\r\n (branchSelected)=\"onLookupBranchSelected($event)\"\r\n ></s-agro-workspace-lookup>\r\n</div>\r\n", styles: [".agro-workspace{display:inline-block;min-width:280px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.WorkspaceSwitchComponent, selector: "s-workspace-switch", inputs: ["workspaces", "footerButtonLabel", "showFooterButton", "disabled"], outputs: ["footerButtonClicked", "selected"] }, { kind: "component", type: i3.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: AgroWorkspaceLookupComponent, selector: "s-agro-workspace-lookup", inputs: ["visible", "loading", "branches"], outputs: ["visibleChange", "branchSelected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8307
8850
|
}
|
|
8308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type:
|
|
8851
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceComponent, decorators: [{
|
|
8852
|
+
type: Component,
|
|
8853
|
+
args: [{ selector: "s-agro-workspace", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"visible\" class=\"agro-workspace\">\r\n <ng-container *ngIf=\"workspaces.length > 0; else emptyWorkspaceState\">\r\n <s-workspace-switch\r\n [workspaces]=\"workspaces\"\r\n [footerButtonLabel]=\"'Adicionar workspace'\"\r\n [disabled]=\"loading\"\r\n (selected)=\"onWorkspaceSelected($event)\"\r\n (footerButtonClicked)=\"onFooterButtonClicked()\"\r\n ></s-workspace-switch>\r\n </ng-container>\r\n\r\n <ng-template #emptyWorkspaceState>\r\n <div class=\"agro-workspace__empty-state\">\r\n <s-button\r\n label=\"Adicionar workspace\"\r\n priority=\"primary\"\r\n [disabled]=\"loading\"\r\n (clicked)=\"onFooterButtonClicked()\"\r\n ></s-button>\r\n </div>\r\n </ng-template>\r\n\r\n <s-agro-workspace-lookup\r\n [visible]=\"lookupVisible\"\r\n [branches]=\"availableBranches\"\r\n [loading]=\"loading\"\r\n (visibleChange)=\"onLookupVisibleChange($event)\"\r\n (branchSelected)=\"onLookupBranchSelected($event)\"\r\n ></s-agro-workspace-lookup>\r\n</div>\r\n", styles: [".agro-workspace{display:inline-block;min-width:280px}\n"] }]
|
|
8854
|
+
}], ctorParameters: () => [{ type: AgroWorkspaceSwitchService }, { type: E070FilService }, { type: i0.ChangeDetectorRef }] });
|
|
8855
|
+
|
|
8856
|
+
class E070EmpService extends AgroEntityService {
|
|
8857
|
+
http;
|
|
8858
|
+
messageService;
|
|
8859
|
+
translate;
|
|
8860
|
+
constructor(http, messageService, translate) {
|
|
8861
|
+
super(http, messageService, `agro/origination/entities/e070emp`, `agro/origination/actions`, `agro/origination/queries`, translate);
|
|
8862
|
+
this.http = http;
|
|
8863
|
+
this.messageService = messageService;
|
|
8864
|
+
this.translate = translate;
|
|
8865
|
+
}
|
|
8866
|
+
listExternalE001Emp(listParams) {
|
|
8867
|
+
return this.http
|
|
8868
|
+
.get("erpx_fnd/transacao/entities/e070emp", {
|
|
8869
|
+
params: this.getListQueryParams(listParams),
|
|
8870
|
+
})
|
|
8871
|
+
.pipe(this.defaultCatch());
|
|
8872
|
+
}
|
|
8873
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpService, deps: [{ token: i1.HttpClient }, { token: i2$2.MessageService }, { token: LibTranslationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8874
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpService });
|
|
8875
|
+
}
|
|
8876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpService, decorators: [{
|
|
8877
|
+
type: Injectable
|
|
8878
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2$2.MessageService }, { type: LibTranslationService }] });
|
|
8879
|
+
|
|
8880
|
+
class E070EmpModule {
|
|
8881
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8882
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule, imports: [i1$1.PermissionsModule] });
|
|
8883
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule, providers: [E070EmpService], imports: [PermissionsModule.forChild([
|
|
8884
|
+
{
|
|
8885
|
+
name: "e070emp",
|
|
8886
|
+
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
8887
|
+
uri: `res://senior.com.br/agro/origination/entities/e070emp`,
|
|
8888
|
+
},
|
|
8889
|
+
])] });
|
|
8890
|
+
}
|
|
8891
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070EmpModule, decorators: [{
|
|
8309
8892
|
type: NgModule,
|
|
8310
8893
|
args: [{
|
|
8311
|
-
imports: [
|
|
8312
|
-
|
|
8313
|
-
|
|
8894
|
+
imports: [
|
|
8895
|
+
PermissionsModule.forChild([
|
|
8896
|
+
{
|
|
8897
|
+
name: "e070emp",
|
|
8898
|
+
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
8899
|
+
uri: `res://senior.com.br/agro/origination/entities/e070emp`,
|
|
8900
|
+
},
|
|
8901
|
+
]),
|
|
8902
|
+
],
|
|
8903
|
+
providers: [E070EmpService],
|
|
8904
|
+
declarations: [],
|
|
8905
|
+
exports: [],
|
|
8906
|
+
}]
|
|
8907
|
+
}] });
|
|
8908
|
+
|
|
8909
|
+
class E070FilModule {
|
|
8910
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8911
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule, imports: [i1$1.PermissionsModule] });
|
|
8912
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule, providers: [
|
|
8913
|
+
{
|
|
8914
|
+
provide: E070FilService,
|
|
8915
|
+
useFactory: () => new E070FilService(inject(HttpClient), inject(MessageService), inject(LibTranslationService)),
|
|
8916
|
+
deps: [],
|
|
8917
|
+
},
|
|
8918
|
+
], imports: [PermissionsModule.forChild([
|
|
8919
|
+
{
|
|
8920
|
+
name: "e070fil",
|
|
8921
|
+
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
8922
|
+
uri: `res://senior.com.br/agro/origination/entities/e070fil`,
|
|
8923
|
+
},
|
|
8924
|
+
])] });
|
|
8925
|
+
}
|
|
8926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: E070FilModule, decorators: [{
|
|
8927
|
+
type: NgModule,
|
|
8928
|
+
args: [{
|
|
8929
|
+
imports: [
|
|
8930
|
+
PermissionsModule.forChild([
|
|
8931
|
+
{
|
|
8932
|
+
name: "e070fil",
|
|
8933
|
+
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
8934
|
+
uri: `res://senior.com.br/agro/origination/entities/e070fil`,
|
|
8935
|
+
},
|
|
8936
|
+
]),
|
|
8937
|
+
],
|
|
8938
|
+
providers: [
|
|
8939
|
+
{
|
|
8940
|
+
provide: E070FilService,
|
|
8941
|
+
useFactory: () => new E070FilService(inject(HttpClient), inject(MessageService), inject(LibTranslationService)),
|
|
8942
|
+
deps: [],
|
|
8943
|
+
},
|
|
8944
|
+
],
|
|
8945
|
+
declarations: [],
|
|
8946
|
+
exports: [],
|
|
8947
|
+
}]
|
|
8948
|
+
}] });
|
|
8949
|
+
|
|
8950
|
+
class AgroWorkspaceModule {
|
|
8951
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8952
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceModule, declarations: [AgroWorkspaceComponent, AgroWorkspaceLookupComponent], imports: [CommonModule,
|
|
8953
|
+
WorkspaceSwitchModule,
|
|
8954
|
+
ButtonModule,
|
|
8955
|
+
DialogComponent,
|
|
8956
|
+
HttpInterceptorModule,
|
|
8957
|
+
LoadingStateModule,
|
|
8958
|
+
TableModule,
|
|
8959
|
+
E070EmpModule,
|
|
8960
|
+
E070FilModule], exports: [AgroWorkspaceComponent] });
|
|
8961
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceModule, providers: [AgroWorkspaceSwitchService], imports: [CommonModule,
|
|
8962
|
+
WorkspaceSwitchModule,
|
|
8963
|
+
ButtonModule,
|
|
8964
|
+
DialogComponent,
|
|
8965
|
+
HttpInterceptorModule,
|
|
8966
|
+
LoadingStateModule,
|
|
8967
|
+
TableModule,
|
|
8968
|
+
E070EmpModule,
|
|
8969
|
+
E070FilModule] });
|
|
8970
|
+
}
|
|
8971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceModule, decorators: [{
|
|
8972
|
+
type: NgModule,
|
|
8973
|
+
args: [{
|
|
8974
|
+
imports: [
|
|
8975
|
+
CommonModule,
|
|
8976
|
+
WorkspaceSwitchModule,
|
|
8977
|
+
ButtonModule,
|
|
8978
|
+
DialogComponent,
|
|
8979
|
+
HttpInterceptorModule,
|
|
8980
|
+
LoadingStateModule,
|
|
8981
|
+
TableModule,
|
|
8982
|
+
E070EmpModule,
|
|
8983
|
+
E070FilModule
|
|
8984
|
+
],
|
|
8985
|
+
declarations: [AgroWorkspaceComponent, AgroWorkspaceLookupComponent],
|
|
8986
|
+
exports: [AgroWorkspaceComponent],
|
|
8987
|
+
providers: [AgroWorkspaceSwitchService]
|
|
8314
8988
|
}]
|
|
8315
8989
|
}] });
|
|
8316
8990
|
|
|
@@ -8856,5 +9530,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
8856
9530
|
* Generated bundle index. Do not edit.
|
|
8857
9531
|
*/
|
|
8858
9532
|
|
|
8859
|
-
export { AGRO_NUMBERS, AGRO_REGEX, AgroAngularComponentsModule, AgroArrayUtils, AgroCookieUtils, AgroDateUtils, AgroEntityStatus, AgroFinancialService, AgroFormValidator, AgroInvoiceModule, AgroInvoiceService, AgroLogics, AgroNameUtils, AgroNumberUtils, AgroObjectUtils, AgroPlatformUtils, AgroStringMasks, AgroStringUtils, AgroUnitConverter, AsyncLock, CancelEventDialogComponent, CancelEventDialogModule, CnpjCpfPipe, CnpjCpfPipeModule, Colors, DateComparisonType, E001TnsModule, E001pesModule, E070EmpModule, E070FilModule, E075DerModule, E205depService, EDLQueryBuilder, EventControlBoardComponent, EventControlBoardModule, EventControlItemModule, EventControlModule, EventStepsComponent, EventStepsModule, ExternalInvoiceModule, FinancialTitleTableComponent, FinancialTitleTableModule, FixationModule, HttpCodes, InvoiceModule, KilogramModule, KilogramPipe, LIB_CONFIG, LibTranslatePipe, LibTranslationModule, LibTranslationService, ModalInvoicePjForContractsComponent, ModalInvoicePjForContractsModule, ModalInvoicePjForFixationComponent, ModalInvoicePjForFixationModule, ModalInvoicePjForOriginationComponent, ModalInvoicePjForOriginationModule, ModalInvoicePjForTransferComponent, ModalInvoicePjForTransferModule, NumberComparisonType, OriginationModule, PaginatorStorageService, PrimitiveManager, ProducerListModalComponent, ProducerListModalModule, RuralEstateModule, SharedModule, StatusType, StringifierPipe, StringifierPipeModule, TelephonePipe, TelephonePipeModule, TicketModule, TransferModule, TypeAccount, UnitOfMeasurement, UserInformationService, WebsocketModule, WebsocketService };
|
|
9533
|
+
export { AGRO_NUMBERS, AGRO_REGEX, AgroAngularComponentsModule, AgroArrayUtils, AgroCookieUtils, AgroDateUtils, AgroEntityStatus, AgroFinancialService, AgroFormValidator, AgroInvoiceModule, AgroInvoiceService, AgroLogics, AgroNameUtils, AgroNumberUtils, AgroObjectUtils, AgroPlatformUtils, AgroStringMasks, AgroStringUtils, AgroUnitConverter, AgroWorkspaceComponent, AgroWorkspaceModule, AgroWorkspaceSwitchService, AsyncLock, CancelEventDialogComponent, CancelEventDialogModule, CnpjCpfPipe, CnpjCpfPipeModule, Colors, DateComparisonType, E001TnsModule, E001pesModule, E070EmpModule$1 as E070EmpModule, E070FilModule$1 as E070FilModule, E075DerModule, E205depService, EDLQueryBuilder, EventControlBoardComponent, EventControlBoardModule, EventControlItemModule, EventControlModule, EventStepsComponent, EventStepsModule, ExternalInvoiceModule, FinancialTitleTableComponent, FinancialTitleTableModule, FixationModule, HttpCodes, InvoiceModule, KilogramModule, KilogramPipe, LIB_CONFIG, LibTranslatePipe, LibTranslationModule, LibTranslationService, ModalBeautyEventsComponent, ModalBeautyEventsService, ModalInvoicePjForContractsComponent, ModalInvoicePjForContractsModule, ModalInvoicePjForFixationComponent, ModalInvoicePjForFixationModule, ModalInvoicePjForOriginationComponent, ModalInvoicePjForOriginationModule, ModalInvoicePjForTransferComponent, ModalInvoicePjForTransferModule, NumberComparisonType, OriginationModule, PaginatorStorageService, PrimitiveManager, ProducerListModalComponent, ProducerListModalModule, ProducerListModalService, RuralEstateModule, SharedModule, StatusType, StringifierPipe, StringifierPipeModule, TelephonePipe, TelephonePipeModule, TicketModule, TransferModule, TypeAccount, UnitOfMeasurement, UserInformationService, WebsocketModule, WebsocketService };
|
|
8860
9534
|
//# sourceMappingURL=senior-agronegocio-angular-components.mjs.map
|