diff --git a/src/components/Apprenant.js b/src/components/Apprenant.js
index 1f44887..b5c34c9 100644
--- a/src/components/Apprenant.js
+++ b/src/components/Apprenant.js
@@ -1204,8 +1204,8 @@ const Apprenant = (props) => {
setp_detail_num_secu("");
}
- if (mylocaltraining.piece_identite_type) {
- setp_detail_piece_identite_type(mylocaltraining.piece_identite_type);
+ if (mylocaltraining.identite_type) {
+ setp_detail_piece_identite_type(mylocaltraining.identite_type);
} else {
setp_detail_piece_identite_type("");
}
@@ -1352,6 +1352,13 @@ const Apprenant = (props) => {
formData.append("object_owner_id", selected_apprenant_id);
formData.append("type_document", "");
+ if (file_date_expiration) {
+ formData.append("file_date_expiration", file_date_expiration);
+ } else {
+ formData.append("file_date_expiration", "01/01/2099");
+ }
+
+
var is_secure_file = "0";
if (securised_file)
is_secure_file = "1"
@@ -4423,6 +4430,12 @@ const Apprenant = (props) => {
setsecurised_file(false);
setp_detail_one_file_to_download_type_name("");
+ setfile_date_expiration(() => {
+ const date = new Date();
+ date.setFullYear(date.getFullYear() + 10);
+ return date;
+ })
+
const fileUploaded = event.target.files[0];
let file_size = event.target.files[0].size;
let file_type = event.target.files[0].type;
@@ -4464,6 +4477,13 @@ const Apprenant = (props) => {
setsecurised_file(false);
setp_detail_one_file_to_download_type_name("");
+ setfile_date_expiration(() => {
+ const date = new Date();
+ date.setFullYear(date.getFullYear() + 10);
+ return date;
+ })
+
+
const fileUploaded = event.target.files[0];
let file_size = event.target.files[0].size;
let file_type = event.target.files[0].type;
@@ -4904,6 +4924,12 @@ const Apprenant = (props) => {
const [securised_file, setsecurised_file] = useState(false);
+ const [file_date_expiration, setfile_date_expiration] = useState(() => {
+ const date = new Date();
+ date.setFullYear(date.getFullYear() + 10);
+ return date;
+ });
+
const [file_1_name, setfile_1_name] = useState();
const [file_2_name, setfile_2_name] = useState();
@@ -6793,6 +6819,7 @@ const Apprenant = (props) => {
{ "id": "cni", "label": "CNI", "value": "cni" },
{ "id": "permis", "label": "Permis Conduire", "value": "permis" },
{ "id": "passport", "label": "Passport", "value": "passport" },
+ { "id": "titre_sejour", "label": "Titre Séjour", "value": "titre_sejour" },
{ "id": "autre", "label": "Autre", "value": "passport" },
{ "id": "", "label": "", "value": "" },
]
@@ -7254,19 +7281,19 @@ const Apprenant = (props) => {
}
}}
renderInput={(params) =>
| Code | +Nom | +Délégué ? | + +
|---|---|---|
| {item.groupe_code} | +{item.groupe_nom} | +{(item.delegue_level) === "1" ? "Délégué" : ""} | + +