Skip to content
Snippets Groups Projects
Commit d8c7a062 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

fix(admin): merge jobs

parent 086f693c
No related branches found
No related tags found
2 merge requests!525V2.3.0,!499fix(admin): merge jobs
...@@ -33,6 +33,7 @@ export class ManageJobsComponent implements OnInit { ...@@ -33,6 +33,7 @@ export class ManageJobsComponent implements OnInit {
}; };
public contextRow: any; public contextRow: any;
public unvalidJobsColumnDefs: ColDef<Job>[];
public frameworkComponents; public frameworkComponents;
public defaultColDef: ColDef = { public defaultColDef: ColDef = {
editable: true, editable: true,
...@@ -86,56 +87,6 @@ export class ManageJobsComponent implements OnInit { ...@@ -86,56 +87,6 @@ export class ManageJobsComponent implements OnInit {
}, },
}, },
]; ];
public unvalidJobsColumnDefs: ColDef<Job>[] = [
{
headerName: 'Fonction',
field: 'name',
editable: true,
onCellValueChanged: this.onChange.bind(this),
},
{
headerName: 'Offre de service',
field: 'hasPersonalOffer',
cellRenderer: 'jobPersonalOffer',
cellEditor: 'agSelectCellEditor',
valueGetter: this.translateBoolean,
singleClickEdit: true,
cellEditorParams: {
values: [true, false],
cellEditorPopup: true,
},
onCellValueChanged: this.onChange.bind(this),
},
{
headerName: 'Acteurs rattachés',
cellRenderer: 'attachedUsersComponent',
cellRendererParams: {
users: 'users',
},
minWidth: 500,
},
{
headerName: 'Fusionner',
field: '_id',
cellRenderer: 'jobRenderer',
cellEditor: 'agSelectCellEditor',
singleClickEdit: true,
cellEditorParams: {
values: this.validatedJobsName,
},
onCellValueChanged: this.onMerge.bind(this),
},
{
headerName: 'Valider',
editable: false,
minWidth: 100,
cellRenderer: 'validateJobComponent',
cellRendererParams: {
onClick: this.onValidateButtonClick.bind(this),
label: 'Valider',
},
},
];
constructor( constructor(
private adminService: AdminService, private adminService: AdminService,
...@@ -144,7 +95,56 @@ export class ManageJobsComponent implements OnInit { ...@@ -144,7 +95,56 @@ export class ManageJobsComponent implements OnInit {
) { ) {
this.findValidatedJobs(); this.findValidatedJobs();
this.findUnvalidatedJobs(); this.findUnvalidatedJobs();
this.unvalidJobsColumnDefs = [
{
headerName: 'Fonction',
field: 'name',
editable: true,
onCellValueChanged: this.onChange.bind(this),
},
{
headerName: 'Offre de service',
field: 'hasPersonalOffer',
cellRenderer: 'jobPersonalOffer',
cellEditor: 'agSelectCellEditor',
valueGetter: this.translateBoolean,
singleClickEdit: true,
cellEditorParams: {
values: [true, false],
cellEditorPopup: true,
},
onCellValueChanged: this.onChange.bind(this),
},
{
headerName: 'Acteurs rattachés',
cellRenderer: 'attachedUsersComponent',
cellRendererParams: {
users: 'users',
},
minWidth: 500,
},
{
headerName: 'Fusionner',
field: '_id',
cellRenderer: 'jobRenderer',
cellEditor: 'agSelectCellEditor',
singleClickEdit: true,
cellEditorParams: {
values: this.validatedJobsName,
},
onCellValueChanged: this.onMerge.bind(this),
},
{
headerName: 'Valider',
editable: false,
minWidth: 100,
cellRenderer: 'validateJobComponent',
cellRendererParams: {
onClick: this.onValidateButtonClick.bind(this),
label: 'Valider',
},
},
];
this.frameworkComponents = { this.frameworkComponents = {
jobRenderer: JobRendererComponent, jobRenderer: JobRendererComponent,
jobPersonalOffer: JobPersonalOfferComponent, jobPersonalOffer: JobPersonalOfferComponent,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment