2018-10-09 11:43:51 +02:00
|
|
|
import { show, hide } from '@utils';
|
2018-08-09 11:53:59 +02:00
|
|
|
|
2018-09-13 17:13:09 +02:00
|
|
|
export function showMotivation(event, state) {
|
|
|
|
event.preventDefault();
|
2019-04-10 10:32:43 +02:00
|
|
|
motivationCancel();
|
2023-02-28 10:49:50 +01:00
|
|
|
const stateElement = document.querySelector(`.motivation.${state}`);
|
2023-02-27 17:05:39 +01:00
|
|
|
|
|
|
|
show(stateElement.parentElement);
|
|
|
|
show(stateElement);
|
2018-10-09 11:43:51 +02:00
|
|
|
hide(document.querySelector('.dropdown-items'));
|
2018-07-12 11:50:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export function motivationCancel() {
|
2018-10-09 11:43:51 +02:00
|
|
|
document.querySelectorAll('.motivation').forEach(hide);
|
2023-02-28 10:49:50 +01:00
|
|
|
document
|
|
|
|
.querySelectorAll('.motivation')
|
|
|
|
.forEach((el) => hide(el.parentElement));
|
2023-02-27 17:05:39 +01:00
|
|
|
|
2018-10-09 11:43:51 +02:00
|
|
|
show(document.querySelector('.dropdown-items'));
|
2018-07-12 11:50:47 +02:00
|
|
|
}
|
2019-02-18 17:52:15 +01:00
|
|
|
|
|
|
|
export function showImportJustificatif(name) {
|
|
|
|
show(document.querySelector('#justificatif_motivation_import_' + name));
|
|
|
|
hide(document.querySelector('#justificatif_motivation_suggest_' + name));
|
|
|
|
}
|