Commit 592f7960 authored by Florian Azizian's avatar Florian Azizian

FEAT #11270 TIME 0:10 get customField id in front + fix wrong delete path

parent 61f5dabf
......@@ -131,7 +131,7 @@ $app->put('/contactsFilling', \Contact\controllers\ContactController::class . ':
$app->get('/customFields', \CustomField\controllers\CustomFieldController::class . ':get');
$app->post('/customFields', \CustomField\controllers\CustomFieldController::class . ':create');
$app->put('/customFields/{id}', \CustomField\controllers\CustomFieldController::class . ':update');
$app->delete('/customFields/{id}', \Contact\controllers\ContactController::class . ':delete');
$app->delete('/customFields/{id}', \CustomField\controllers\CustomFieldController::class . ':delete');
//Docservers
$app->get('/docservers', \Docserver\controllers\DocserverController::class . ':get');
......
......@@ -112,9 +112,8 @@ export class CustomFieldsAdministrationComponent implements OnInit {
this.dialogRef.afterClosed().pipe(
filter((data: string) => data === 'ok'),
tap((data: any) => {
tap(() => {
newCustomField = {
id: data.customFieldId,
label: 'Nouveau champ',
type: customFieldType.type,
values: [],
......@@ -122,7 +121,8 @@ export class CustomFieldsAdministrationComponent implements OnInit {
}
}),
exhaustMap((data) => this.http.post('../../rest/customFields', newCustomField)),
tap(() => {
tap((data: any) => {
newCustomField.id = data.customFieldId
this.customFields.push(newCustomField);
this.notify.success(this.lang.customFieldAdded);
}),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment