-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into securisation-backoffice-cfa
- Loading branch information
Showing
26 changed files
with
141 additions
and
112 deletions.
There are no files selected for viewing
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
server/src/jobs/lba_recruteur/formulaire/misc/updateMissingStartDate.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { logger } from "../../../../common/logger" | ||
import { Recruiter } from "../../../../common/model/index" | ||
import { asyncForEach } from "../../../../common/utils/asyncUtils" | ||
|
||
export const updateMissingStartDate = async () => { | ||
logger.info("Start update missing job_start_date") | ||
const forms = await Recruiter.find({ "jobs.job_start_date": null }) | ||
await asyncForEach(forms, async (form) => { | ||
await asyncForEach(form.jobs, async (job) => { | ||
if (job.job_start_date === null) { | ||
if (job.job_creation_date) { | ||
job.job_start_date = job.job_creation_date | ||
} | ||
} | ||
}) | ||
await form.save({ timestamps: false }) | ||
}) | ||
logger.info("End update missing job_start_date") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import dayjs from "dayjs" | ||
// eslint-disable-next-line import/extensions | ||
import "dayjs/locale/fr.js" | ||
import advancedFormat from "dayjs/plugin/advancedFormat.js" | ||
import customParseFormat from "dayjs/plugin/customParseFormat.js" | ||
import duration from "dayjs/plugin/duration.js" | ||
import isBetween from "dayjs/plugin/isBetween.js" | ||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js" | ||
import isSameOrBefore from "dayjs/plugin/isSameOrBefore.js" | ||
import isYesterday from "dayjs/plugin/isYesterday.js" | ||
import localizedFormat from "dayjs/plugin/localizedFormat.js" | ||
import timezone from "dayjs/plugin/timezone.js" | ||
import utc from "dayjs/plugin/utc.js" | ||
|
||
dayjs.locale("fr") | ||
dayjs.extend(utc) | ||
dayjs.extend(duration) | ||
dayjs.extend(timezone) | ||
dayjs.extend(isSameOrBefore) | ||
dayjs.extend(isSameOrAfter) | ||
dayjs.extend(isBetween) | ||
dayjs.extend(customParseFormat) | ||
dayjs.extend(advancedFormat) | ||
dayjs.extend(isYesterday) | ||
dayjs.extend(localizedFormat) | ||
|
||
export type TDayjs = dayjs.Dayjs | ||
|
||
export default dayjs |
Oops, something went wrong.