Skip to content

Commit

Permalink
feat(#204): Added grid for Report Template editing
Browse files Browse the repository at this point in the history
  • Loading branch information
AudreyLR authored and philipperobertgh committed Nov 26, 2018
1 parent ed218f4 commit ca5a5b8
Showing 1 changed file with 67 additions and 0 deletions.
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>

0 comments on commit ca5a5b8

Please sign in to comment.