-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#204): Added grid for Report Template editing
- Loading branch information
1 parent
ed218f4
commit ca5a5b8
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
src/app/report-configuration/select-template/select-template.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<dx-data-grid | ||
[dataSource]="dataSource" | ||
[hoverStateEnabled]="true" | ||
[rowAlternationEnabled]="true" | ||
(onInitNewRow)="onInitNewRow($event)" | ||
(onRowInserted)="onRowInserted($event)" | ||
(onRowUpdated)="onRowUpdated($event)" | ||
(onRowRemoved)="onRowRemoved($event)"> | ||
<dxi-column | ||
dataField="name" | ||
caption="{{'name' | translate}}" | ||
|
||
sortIndex="0" | ||
sortOrder="desc"> | ||
</dxi-column> | ||
<dxi-column dataField="isActive" dataType="boolean" caption="{{'isActive' | translate}}" width="10%"></dxi-column> | ||
<!-- <dxi-column | ||
"[{ | ||
type: 'buttons', | ||
width: 110, | ||
buttons: ['edit', 'delete', { | ||
hint: 'Clone', | ||
icon: 'repeat', | ||
visible: function(e) { | ||
return !e.row.isEditing && !isChief(e.row.data.Position); | ||
}, | ||
onClick: function(e) { | ||
var clonedItem = $.extend({}, e.row.data, { ID: ++maxID }); | ||
employees.splice(e.row.rowIndex, 0, clonedItem); | ||
e.component.refresh(true); | ||
e.event.preventDefault(); | ||
} | ||
}] | ||
}]" | ||
}></dxi-column> --> | ||
<dxi-column cellTemplate="cellTemplate" [width]="50" alignment="center"> | ||
<div *dxTemplate="let data of 'cellTemplate'"> | ||
<div> | ||
<!-- <i class="fa fa-exclamation" aria-hidden="true"></i> --> | ||
<!-- <a class="dx-link dx-link-preferences dx-icon-preferences"></a> --> | ||
<span class="dx-icon-preferences dx-link" (click)=editReport(data.data.id)></span> | ||
</div> | ||
</div> | ||
</dxi-column> | ||
|
||
|
||
<dxo-editing mode="popup" [useIcons]="true" [allowUpdating]="true" [allowAdding]="true" [allowDeleting]="true"> | ||
<dxo-popup title="{{'Modifier' | translate}}" [showTitle]="true" [height]="220" [width]="350" | ||
|
||
[toolbarItems]="[ | ||
{ | ||
widget: 'dxButton', | ||
options: { | ||
text: 'Configurer le rapport', | ||
icon: 'toolbox' | ||
}, | ||
toolbar: 'bottom', | ||
onClick: editReport | ||
}]" | ||
|
||
></dxo-popup> | ||
<dxo-form colCount="1"> | ||
<dxi-item dataField="name" [isRequired]="true"></dxi-item> | ||
</dxo-form> | ||
</dxo-editing> | ||
</dx-data-grid> |