1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
$scope.gridOptions = {
enableFiltering: true,
treeRowHeaderAlwaysVisible: false,
data: [],
columnDefs: [
{ name: 'blockAStatus',field: 'blockAStatus', displayName: 'A' , width: '4%' , treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<div ng-if="row.groupHeader" class="ui-grid-cell-contents {{COL_FIELD | rawValue | blockStatusClass}}" >{{COL_FIELD | rawValue}}</div><div ng-if="!(row.groupHeader)" class="ui-grid-cell-contents" ></div>'},
{ name: 'blockBStatus',field: 'blockBStatus', displayName: 'B' , width: '4%' , treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<div ng-if="row.groupHeader" class="ui-grid-cell-contents {{COL_FIELD | rawValue | blockStatusClass}}" >{{COL_FIELD | rawValue}}</div><div ng-if="!(row.groupHeader)" class="ui-grid-cell-contents" ></div>'},
{ name: 'blockCStatus',field: 'blockCStatus', displayName: 'C' , width: '4%' , treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<div ng-if="row.groupHeader" class="ui-grid-cell-contents {{COL_FIELD | rawValue | blockStatusClass}}" >{{COL_FIELD | rawValue}}</div><div ng-if="!(row.groupHeader)" class="ui-grid-cell-contents" ></div>'},
{ name: 'blockDStatus',field: 'blockDStatus', displayName: 'D' , width: '4%' , treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<div ng-if="row.groupHeader" class="ui-grid-cell-contents {{COL_FIELD | rawValue | blockStatusClass}}" >{{COL_FIELD | rawValue}}</div><div ng-if="!(row.groupHeader)" class="ui-grid-cell-contents" ></div>'},
{ name: 'blockEStatus',field: 'blockEStatus', displayName: 'E' , width: '4%' , treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<div ng-if="row.groupHeader" class="ui-grid-cell-contents {{COL_FIELD | rawValue | blockStatusClass}}" >{{COL_FIELD | rawValue}}</div><div ng-if="!(row.groupHeader)" class="ui-grid-cell-contents" ></div>'},
{ name: 'cfid',field: 'cfid', displayName: 'N° CF', grouping: { groupPriority: 0 }, sort: { priority: 0, direction: 'asc' }, width: '10%', cellTemplate: '<span ng-if="row.groupHeader && col.grouping.groupPriority === row.treeLevel">{{COL_FIELD}}</span><span ng-if="!(row.groupHeader && col.grouping.groupPriority === row.treeLevel)">{{row.entity.partNumber}}</span>' },
{ name: 'csfLabel',field: 'csfLabel', displayName: 'Description', width: '30%', treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<span ng-if="row.groupHeader">{{COL_FIELD | rawValue}}</span><span ng-if="!(row.groupHeader)">{{row.entity.partDescription}}</span>' },
{ name: 'supplierSiteCode',field: 'supplierSiteCode', displayName: 'Manufactoring Site Code' , width: '10%' , treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<div ng-if="row.groupHeader" class="ui-grid-cell-contents" >{{COL_FIELD | rawValue}}</div><div ng-if="!(row.groupHeader)" class="ui-grid-cell-contents" ></div>'},
{ name: 'vendorCode',field: 'vendorCode', displayName: 'Nissan Local code' , width: '10%' , treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<div ng-if="row.groupHeader" class="ui-grid-cell-contents" >{{COL_FIELD | rawValue}}</div><div ng-if="!(row.groupHeader)" class="ui-grid-cell-contents" ></div>'},
{ name: 'supplierName',field: 'supplierName', displayName: 'Supplier Name' , width: '10%' , treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<div ng-if="row.groupHeader" class="ui-grid-cell-contents" >{{COL_FIELD | rawValue}}</div><div ng-if="!(row.groupHeader)" class="ui-grid-cell-contents" ></div>'},
{ name: 'supplierSiteCodeCity',field: 'supplierSiteCodeCity', displayName: 'Town' , width: '10%' , treeAggregationType: uiGridGroupingConstants.aggregation.MAX, cellTemplate: '<div ng-if="row.groupHeader" class="ui-grid-cell-contents" >{{COL_FIELD | rawValue}}</div><div ng-if="!(row.groupHeader)" class="ui-grid-cell-contents" ></div>'},
{ name: 'partNumber',field: 'partNumber', visible: false },
{ name: 'partDescription',field: 'partDescription', visible: false }
],
onRegisterApi: function( gridApi ) {
$scope.gridApi = gridApi;
}
}; |