Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
3.2 kB
21
Indexable
Never
<insight-data-table
		dataKey="id"
		[data]="data"
		[totalRecords]="totalRecords"
		[paginator]="paginator"
		[autoLayout]="false"
		[resizableColumns]="false"
		[toolbarEnabled]='toolbarEnabled'
		[lovBtnEnabled]="lovEnabled"
		[selectable]="selectEnabled"
		[selectionMode]="selectionMode"
		[(selectedData)]="selectedData"
		[tableColumns]="config.table"
		[hideColumns]='hideColumns'
		[visibleColumns]='visibleColumns'
		[editBtnEnabled]="editEnabled"
		[deleteBtnEnabled]="deleteEnabled"
		(deleteBtnClick)="onDelete($event)"
		(editBtnClick)="onEditClick($event)"
		(lovBtnClick)="onSelectClick($event)"
		(lazyLoadEvent)="onLazyLoad($event)"
		(rowSelectEvent)='rowSelectEvent.emit($event)'
		[bindMasterContext]="bindMasterContext()"
		styleClass="app-page"
>
	<ng-template pTemplate="toolbar">
		<insight-toolbar
				[config]="config"
				[selectedData]="selectedData"
				[disableAdvanceSearch]='disableAdvanceSearch'
				[advancedSearchFormGroup]="advancedSearchForm"
				[addBtnEnabled]="addEnabled"
				[deleteBatchEnabled]="deleteEnabled"
				[lovBtnEnabled]="lovEnabled"
				(lovBtnClick)="onSelectClick()"
				(addBtnClick)="onAddClick()"
				(deleteBtnClick)="onDeleteBatch()"
				(searchEvent)="onSearch($event)"
		>
		</insight-toolbar>
	</ng-template>

	<ng-template pTemplate="body" let-tableColumns let-model="entity">
		<ng-container *ngFor="let column of tableColumns; let i = index">
			<td *ngIf="!column.hidden">
				<ng-container [ngSwitch]="column['field']">
					<ng-container *ngSwitchCase="'status'">
            {{model['status'] | status | translate}}
          </ng-container>
          <ng-container *ngSwitchCase="'roleTypeId'">
            <insight-role-type-title [ngModel]="model['roleTypeId']"></insight-role-type-title>
          </ng-container>
          <ng-container *ngSwitchCase="'partnerId'">
            <insight-partner-auto-complete
              [ngModel]="model['partnerId']"
              [ngModelOptions]="{standalone: true}"
            >
            </insight-partner-auto-complete>
          </ng-container>
          <ng-container *ngSwitchCase="'organizationId'">
            <insight-organization-auto-complete
              [ngModel]="model['organizationId']"
              [ngModelOptions]="{standalone: true}"
            >
            </insight-organization-auto-complete>
          </ng-container>
          <ng-container *ngSwitchCase="'employeeId'">
            <insight-employee-auto-complete
              [ngModel]="model['employeeId']"
              [ngModelOptions]="{standalone: true}"
            >
            </insight-employee-auto-complete>
          </ng-container>
					<ng-container *ngSwitchDefault>{{model[column['field']]}}</ng-container>
				</ng-container>
			</td>
		</ng-container>
	</ng-template>
</insight-data-table>

<p-dialog [(visible)]='showEdit'
		[style]='{width: "40vw"}'
		[breakpoints]='{"1024px": "70vw", "640px": "80vw"}'
>
	<insight-work-order-assignment-edit
		[popup]='true' [(showEdit)]='showEdit' [master]='master' [entity]='entity' [autoClose]='true'
	>
	</insight-work-order-assignment-edit>
</p-dialog>