Skip to content
Snippets Groups Projects
Verified Commit 4de0a81e authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #12091 TIME 0:20 fix difflist not required if destination not required

parent f7dca883
No related branches found
No related tags found
No related merge requests found
......@@ -112,17 +112,7 @@ export class ActionsListComponent implements OnInit {
this.http.get('../../rest/resourcesList/users/' + this.currentBasketInfo.ownerId + '/groups/' + this.currentBasketInfo.groupId + '/baskets/' + this.currentBasketInfo.basketId + '/actions')
.subscribe((data: any) => {
if (data.actions.length > 0) {
this.actionsList = data.actions;
// TO DO TO REMOVE AFTER BACK CHANGE : label_action => label
this.actionsList = data.actions.map((action: any) => {
return {
id: action.id,
label: action.label_action,
component: action.component
}
});
this.actionsList = data.actions;
} else {
this.actionsList = [{
id: 0,
......
......@@ -117,7 +117,7 @@ export class IndexationComponent implements OnInit {
data.actions = data.actions.map((action: any, index: number) => {
return {
id: action.id,
label: action.label_action,
label: action.label,
component: action.component,
enabled: action.enabled,
default: index === 0 ? true : false,
......@@ -150,8 +150,6 @@ export class IndexationComponent implements OnInit {
formatdatas['encodedFile'] = this.appDocumentViewer.getFile().content;
formatdatas['format'] = this.appDocumentViewer.getFile().format;
console.log(formatdatas['encodedFile']);
this.actionService.launchIndexingAction(this.selectedAction, this.headerService.user.id, this.currentGroupId, formatdatas);
} else {
......
......@@ -89,7 +89,7 @@ export class IndexingFormComponent implements OnInit {
label: this.lang.confidential,
type: 'radio',
default_value: '',
values: [{'id': 'true', 'label': 'Oui'}, {'id': 'false', 'label': 'Non'}]
values: [{ 'id': 'true', 'label': 'Oui' }, { 'id': 'false', 'label': 'Non' }]
},
{
identifier: 'initiator',
......@@ -277,8 +277,8 @@ export class IndexingFormComponent implements OnInit {
if (!this.adminMode) {
arrIndexingModels.push({
identifier : 'modelId',
default_value : this.indexingFormId
identifier: 'modelId',
default_value: this.indexingFormId
});
}
return arrIndexingModels;
......@@ -537,7 +537,7 @@ export class IndexingFormComponent implements OnInit {
let arrayRoutes: any = [];
let mergedRoutesDatas: any = {};
if (this.availableCustomFieldsClone === null) {
arrayRoutes.push(this.http.get("../../rest/customFields"));
} else {
......@@ -635,7 +635,7 @@ export class IndexingFormComponent implements OnInit {
this.initElemForm();
this.createForm();
}),
catchError((err: any) => {
this.notify.handleErrors(err);
......@@ -661,9 +661,10 @@ export class IndexingFormComponent implements OnInit {
if (field.identifier === 'destination') {
let valArr: ValidatorFn[] = [];
valArr.push(Validators.required);
if (field.mandatory) {
valArr.push(Validators.required);
}
this.arrFormControl['diffusionList'] = new FormControl({ value: null, disabled: false });
this.arrFormControl['diffusionList'].setValidators(valArr);
......@@ -794,7 +795,7 @@ export class IndexingFormComponent implements OnInit {
calcLimitDateByPriority(field: any, value: any) {
let limitDate: Date = null;
if (this.arrFormControl['processLimitDate'] !== undefined) {
this.http.get("../../rest/indexing/processLimitDate", { params: { "priority": value } }).pipe(
tap((data: any) => {
......
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