@silexpert/core 1.3.205-5 → 1.3.205-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/resources/User.js.map +1 -1
- package/dist/cjs/types/Enum/UsersHistory.d.ts +2 -1
- package/dist/cjs/types/Enum/UsersHistory.d.ts.map +1 -1
- package/dist/cjs/types/Enum/UsersHistory.js +3 -0
- package/dist/cjs/types/Enum/UsersHistory.js.map +1 -1
- package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.d.ts +1 -1
- package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.js +5 -4
- package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.js.map +1 -1
- package/dist/cjs/types/Interface/api/user/UpdateCoworker.d.ts +1 -0
- package/dist/cjs/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/user/UpdateCoworker.js +6 -0
- package/dist/cjs/types/Interface/api/user/UpdateCoworker.js.map +1 -1
- package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts +2 -1
- package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/usersHistory/Create.js +5 -0
- package/dist/cjs/types/Interface/api/usersHistory/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts +2 -1
- package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/usersHistory/Update.js +5 -0
- package/dist/cjs/types/Interface/api/usersHistory/Update.js.map +1 -1
- package/dist/cjs/types/Interface/api/webex/GetWebinarsParams.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/webex/GetWebinarsParams.js +10 -5
- package/dist/cjs/types/Interface/api/webex/GetWebinarsParams.js.map +1 -1
- package/dist/cjs/types/Interface/models/IUsersHistory.d.ts +7 -1
- package/dist/cjs/types/Interface/models/IUsersHistory.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUsersHistory.js.map +1 -1
- package/dist/cjs/utils/societyApproval.d.ts.map +1 -1
- package/dist/cjs/utils/societyApproval.js +9 -2
- package/dist/cjs/utils/societyApproval.js.map +1 -1
- package/dist/mjs/api/resources/User.js.map +1 -1
- package/dist/mjs/types/Enum/UsersHistory.d.ts +2 -1
- package/dist/mjs/types/Enum/UsersHistory.d.ts.map +1 -1
- package/dist/mjs/types/Enum/UsersHistory.js +3 -0
- package/dist/mjs/types/Enum/UsersHistory.js.map +1 -1
- package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.d.ts +1 -1
- package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.js +7 -6
- package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.js.map +1 -1
- package/dist/mjs/types/Interface/api/user/UpdateCoworker.d.ts +1 -0
- package/dist/mjs/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/user/UpdateCoworker.js +7 -0
- package/dist/mjs/types/Interface/api/user/UpdateCoworker.js.map +1 -1
- package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts +2 -1
- package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/usersHistory/Create.js +6 -0
- package/dist/mjs/types/Interface/api/usersHistory/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts +2 -1
- package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/usersHistory/Update.js +6 -0
- package/dist/mjs/types/Interface/api/usersHistory/Update.js.map +1 -1
- package/dist/mjs/types/Interface/api/webex/GetWebinarsParams.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/webex/GetWebinarsParams.js +12 -7
- package/dist/mjs/types/Interface/api/webex/GetWebinarsParams.js.map +1 -1
- package/dist/mjs/types/Interface/models/IUsersHistory.d.ts +7 -1
- package/dist/mjs/types/Interface/models/IUsersHistory.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUsersHistory.js.map +1 -1
- package/dist/mjs/utils/societyApproval.d.ts.map +1 -1
- package/dist/mjs/utils/societyApproval.js +10 -1
- package/dist/mjs/utils/societyApproval.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/User.ts +2 -2
- package/ts/types/Enum/UsersHistory.ts +4 -0
- package/ts/types/Interface/api/team/UpdateTeamsForUser.ts +5 -4
- package/ts/types/Interface/api/user/UpdateCoworker.ts +5 -0
- package/ts/types/Interface/api/usersHistory/Create.ts +5 -3
- package/ts/types/Interface/api/usersHistory/Update.ts +5 -1
- package/ts/types/Interface/api/webex/GetWebinarsParams.ts +12 -7
- package/ts/types/Interface/models/IUsersHistory.ts +7 -1
- package/ts/utils/societyApproval.ts +10 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../ts/api/resources/User.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AACvC,uCA2BqB;AAErB,MAAa,IAAK,SAAQ,mBAAQ;IAChC,OAAO,CAAC,MAAoB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IACD,2BAA2B,CAAC,MAAmC;QAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,MAAM,CAAC,EAAE,yBAAyB,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,CAAC,IAAgB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,QAAQ,CAAC,IAAoB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IACjD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AE,gBAAgD;QAC7F,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;IAC1F,CAAC;IAED,wBAAwB,CAAC,MAAgC;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,qBAAqB,CAAC,MAAc;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,wBAAwB,CAAC,EAAU,EAAE,MAAoC;QACvE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;CACF;AArLD,oBAqLC","sourcesContent":["import { Resource } from '../Resource';\nimport {\n IUser,\n QueryConfirm,\n QueryResendConfirmationLink,\n CreateUser,\n CreateCoworker,\n QueryUserSmsConfirmation,\n QueryGetAllFromSociety,\n ISociety,\n Role,\n TimeCounterType,\n QueryGetAllCollaborators,\n QueryGetAllCollaboratorsByRoles,\n QueryGetAllWithoutBp,\n CollaboratorsByRoles,\n QueryUserExport,\n UpdateCorworker,\n GetSocietyFromUser,\n RegisterProspectBody,\n RegisterProspectResponse,\n QueryGet,\n BasePaginate,\n QueryGetAllUsersPaginated,\n QueryUpdatePassword,\n CreateCollaboraterDetail,\n IWorkingSchedule,\n ICollaboraterDetail,\n} from '../../types';\n\nexport class User extends Resource {\n confirm(params: QueryConfirm): Promise<IUser> {\n return this.axios.$put('user/confirm', params);\n }\n resendConfirmationEmailLink(params: QueryResendConfirmationLink): Promise<boolean> {\n return this.axios.$put(`user/${params.id}/send-confirmation-mail`);\n }\n create(data: CreateUser): Promise<IUser> {\n return this.axios.$post('user/create', data);\n }\n coworker(data: CreateCoworker): Promise<IUser> {\n return this.axios.$post('user/coworker', data);\n }\n\n createCompletCoworker(data: CreateCoworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n if (Array.isArray(value)) {\n value.forEach((v) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else {\n formData.append(key, `${value}`);\n }\n }\n });\n if (file){ \n formData.append('file', file);\n }\n return this.axios.$post('user/coworker/complete', formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCoworker(idUser: number, params: UpdateCorworker): Promise<IUser> {\n const formData = new FormData();\n Object.entries(params).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n\n return this.axios.$put(`/user/coworker/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCompletCoworker(idUser: number, data: UpdateCorworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n if (file){\n formData.append('file', file);\n }\n return this.axios.$put(`/user/coworker/complete/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n sendNewCode(id: number): Promise<IUser> {\n return this.axios.$put(`user/${id}/sendNewSmsCode`);\n }\n verifySmsCodeConfirmation(id: number, params: QueryUserSmsConfirmation): Promise<IUser> {\n return this.axios.$get(`user/${id}/verifySmsCodeConfirmation`, { params });\n }\n allFromSociety(params: QueryGetAllFromSociety): Promise<IUser[]> {\n return this.axios.$get('user/all-from-society', { params });\n }\n allWithoutBp(params: QueryGetAllWithoutBp): Promise<IUser[]> {\n return this.axios.$get('user/all-without-bp', { params });\n }\n allCollaborators(params: QueryGetAllCollaborators): Promise<IUser[]> {\n return this.axios.$get('user/all-collaborators', { params });\n }\n allCollaboratorsByRoles(data: QueryGetAllCollaboratorsByRoles): Promise<CollaboratorsByRoles[]> {\n const { idTimeCounterType, idRoles } = data;\n let params = { idRoles };\n if (idTimeCounterType) {\n const timeCounterType = Object.values(TimeCounterType).find((tct) => tct.id === idTimeCounterType);\n const rolesByDefault = [\n Role.FRONT_OFFICE,\n Role.FRONT_OFFICE_EXPRESS,\n Role.SOCIAL,\n Role.JURIDIC,\n Role.HUMAN_RESSOURCES,\n Role.FACTURATION,\n Role.CUSTOMER_SUCCESS,\n Role.COMMERCIAL,\n Role.MANAGER,\n Role.EXPERT_ACCOUNTANT,\n Role.DEVELOPER,\n Role.TECHNICAL_ADVISOR,\n ];\n params = { idRoles: timeCounterType?.limitedRoles ?? rolesByDefault };\n }\n return this.axios.$get('user/all-collaborators-by-roles', { params });\n }\n getAllPaginated(params: QueryGetAllUsersPaginated, signal?: AbortSignal): Promise<BasePaginate<IUser>> {\n return this.axios.$get('/user/paginated', {\n ...(signal ? { signal } : {}),\n params,\n });\n }\n selectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates');\n }\n selectableTeammatesV2(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates/v2');\n }\n calendarSelectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/calendar-selectable-teammates');\n }\n\n getAllSocieties(id: number, params: GetSocietyFromUser): Promise<ISociety[]> {\n return this.axios.$get(`/users/${id}/societies`, { params });\n }\n\n update(id: number, params: Partial<IUser> & { lastMobileConnection?: Date }): Promise<IUser> {\n return this.axios.$put(`user/${id}`, params);\n }\n getInfo(params?: QueryGet): Promise<IUser> {\n return this.axios.$get('user', { params });\n }\n delete(id: number): Promise<number> {\n return this.axios.$delete(`users/${id}`);\n }\n\n updatePassword(id: number, body: QueryUpdatePassword): Promise<Partial<IUser>> {\n return this.axios.$patch(`/users/${id}/password`, body);\n }\n\n getByRoles(params: { roles: Role[] }): Promise<IUser[]> {\n return this.axios.$get('users/roles', { params });\n }\n export(params: QueryUserExport): Promise<Buffer> {\n return this.axios.$get('users/export', {\n params,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {\n return this.axios.$post('users/prospect', body);\n }\n\n updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCoworkerWorkingSchedules(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCollaboraterDetail(params: CreateCollaboraterDetail): Promise<ICollaboraterDetail> {\n return this.axios.$post('collaboraters-details', params);\n }\n\n getCollaboraterDetail(idUser: number): Promise<ICollaboraterDetail> {\n return this.axios.$get(`collaboraters-details/user/${idUser}`);\n }\n\n updateCollaboraterDetail(id: number, params: Partial<ICollaboraterDetail>): Promise<ICollaboraterDetail> {\n return this.axios.$put(`collaboraters-details/${id}`, params);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../ts/api/resources/User.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AACvC,uCA2BqB;AAErB,MAAa,IAAK,SAAQ,mBAAQ;IAChC,OAAO,CAAC,MAAoB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IACD,2BAA2B,CAAC,MAAmC;QAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,MAAM,CAAC,EAAE,yBAAyB,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,CAAC,IAAgB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,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MAAc,EAAE,gBAAoC;QACjF,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;IAC1F,CAAC;IAED,8BAA8B,CAAC,MAAc,EAAE,gBAAgD;QAC7F,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;IAC1F,CAAC;IAED,wBAAwB,CAAC,MAAgC;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,qBAAqB,CAAC,MAAc;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,wBAAwB,CAAC,EAAU,EAAE,MAAoC;QACvE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;CACF;AArLD,oBAqLC","sourcesContent":["import { Resource } from '../Resource';\nimport {\n IUser,\n QueryConfirm,\n QueryResendConfirmationLink,\n CreateUser,\n CreateCoworker,\n QueryUserSmsConfirmation,\n QueryGetAllFromSociety,\n ISociety,\n Role,\n TimeCounterType,\n QueryGetAllCollaborators,\n QueryGetAllCollaboratorsByRoles,\n QueryGetAllWithoutBp,\n CollaboratorsByRoles,\n QueryUserExport,\n UpdateCorworker,\n GetSocietyFromUser,\n RegisterProspectBody,\n RegisterProspectResponse,\n QueryGet,\n BasePaginate,\n QueryGetAllUsersPaginated,\n QueryUpdatePassword,\n CreateCollaboraterDetail,\n IWorkingSchedule,\n ICollaboraterDetail,\n} from '../../types';\n\nexport class User extends Resource {\n confirm(params: QueryConfirm): Promise<IUser> {\n return this.axios.$put('user/confirm', params);\n }\n resendConfirmationEmailLink(params: QueryResendConfirmationLink): Promise<boolean> {\n return this.axios.$put(`user/${params.id}/send-confirmation-mail`);\n }\n create(data: CreateUser): Promise<IUser> {\n return this.axios.$post('user/create', data);\n }\n coworker(data: CreateCoworker): Promise<IUser> {\n return this.axios.$post('user/coworker', data);\n }\n\n createCompletCoworker(data: CreateCoworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n if (Array.isArray(value)) {\n value.forEach((v) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else {\n formData.append(key, `${value}`);\n }\n }\n });\n if (file) {\n formData.append('file', file);\n }\n return this.axios.$post('user/coworker/complete', formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCoworker(idUser: number, params: UpdateCorworker): Promise<IUser> {\n const formData = new FormData();\n Object.entries(params).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n\n return this.axios.$put(`/user/coworker/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCompletCoworker(idUser: number, data: UpdateCorworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n if (file) {\n formData.append('file', file);\n }\n return this.axios.$put(`/user/coworker/complete/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n sendNewCode(id: number): Promise<IUser> {\n return this.axios.$put(`user/${id}/sendNewSmsCode`);\n }\n verifySmsCodeConfirmation(id: number, params: QueryUserSmsConfirmation): Promise<IUser> {\n return this.axios.$get(`user/${id}/verifySmsCodeConfirmation`, { params });\n }\n allFromSociety(params: QueryGetAllFromSociety): Promise<IUser[]> {\n return this.axios.$get('user/all-from-society', { params });\n }\n allWithoutBp(params: QueryGetAllWithoutBp): Promise<IUser[]> {\n return this.axios.$get('user/all-without-bp', { params });\n }\n allCollaborators(params: QueryGetAllCollaborators): Promise<IUser[]> {\n return this.axios.$get('user/all-collaborators', { params });\n }\n allCollaboratorsByRoles(data: QueryGetAllCollaboratorsByRoles): Promise<CollaboratorsByRoles[]> {\n const { idTimeCounterType, idRoles } = data;\n let params = { idRoles };\n if (idTimeCounterType) {\n const timeCounterType = Object.values(TimeCounterType).find((tct) => tct.id === idTimeCounterType);\n const rolesByDefault = [\n Role.FRONT_OFFICE,\n Role.FRONT_OFFICE_EXPRESS,\n Role.SOCIAL,\n Role.JURIDIC,\n Role.HUMAN_RESSOURCES,\n Role.FACTURATION,\n Role.CUSTOMER_SUCCESS,\n Role.COMMERCIAL,\n Role.MANAGER,\n Role.EXPERT_ACCOUNTANT,\n Role.DEVELOPER,\n Role.TECHNICAL_ADVISOR,\n ];\n params = { idRoles: timeCounterType?.limitedRoles ?? rolesByDefault };\n }\n return this.axios.$get('user/all-collaborators-by-roles', { params });\n }\n getAllPaginated(params: QueryGetAllUsersPaginated, signal?: AbortSignal): Promise<BasePaginate<IUser>> {\n return this.axios.$get('/user/paginated', {\n ...(signal ? { signal } : {}),\n params,\n });\n }\n selectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates');\n }\n selectableTeammatesV2(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates/v2');\n }\n calendarSelectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/calendar-selectable-teammates');\n }\n\n getAllSocieties(id: number, params: GetSocietyFromUser): Promise<ISociety[]> {\n return this.axios.$get(`/users/${id}/societies`, { params });\n }\n\n update(id: number, params: Partial<IUser> & { lastMobileConnection?: Date }): Promise<IUser> {\n return this.axios.$put(`user/${id}`, params);\n }\n getInfo(params?: QueryGet): Promise<IUser> {\n return this.axios.$get('user', { params });\n }\n delete(id: number): Promise<number> {\n return this.axios.$delete(`users/${id}`);\n }\n\n updatePassword(id: number, body: QueryUpdatePassword): Promise<Partial<IUser>> {\n return this.axios.$patch(`/users/${id}/password`, body);\n }\n\n getByRoles(params: { roles: Role[] }): Promise<IUser[]> {\n return this.axios.$get('users/roles', { params });\n }\n export(params: QueryUserExport): Promise<Buffer> {\n return this.axios.$get('users/export', {\n params,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {\n return this.axios.$post('users/prospect', body);\n }\n\n updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCoworkerWorkingSchedules(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCollaboraterDetail(params: CreateCollaboraterDetail): Promise<ICollaboraterDetail> {\n return this.axios.$post('collaboraters-details', params);\n }\n\n getCollaboraterDetail(idUser: number): Promise<ICollaboraterDetail> {\n return this.axios.$get(`collaboraters-details/user/${idUser}`);\n }\n\n updateCollaboraterDetail(id: number, params: Partial<ICollaboraterDetail>): Promise<ICollaboraterDetail> {\n return this.axios.$put(`collaboraters-details/${id}`, params);\n }\n}\n"]}
|
|
@@ -10,7 +10,8 @@ export declare enum TypeUserHistory {
|
|
|
10
10
|
EQUIPMENT_BROKEN = 9,
|
|
11
11
|
EQUIPMENT_RETURN = 10,
|
|
12
12
|
EQUIPMENT_LOST = 11,
|
|
13
|
-
MAIL_SENT_TO_TS = 12
|
|
13
|
+
MAIL_SENT_TO_TS = 12,// Mail envoyé à TS
|
|
14
|
+
TEAM_MOUVEMENT = 13
|
|
14
15
|
}
|
|
15
16
|
export declare const TypeUserHistoryLabels: Record<TypeUserHistory, string>;
|
|
16
17
|
//# sourceMappingURL=UsersHistory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersHistory.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/UsersHistory.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IAEzB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,OAAO,IAAI;IAGX,WAAW,IAAI,CAAE,UAAU;IAC3B,WAAW,IAAI,CAAE,UAAU;IAG3B,eAAe,IAAI;IAGnB,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,gBAAgB,KAAK;IACrB,cAAc,KAAK;IAGnB,eAAe,KAAK;
|
|
1
|
+
{"version":3,"file":"UsersHistory.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/UsersHistory.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IAEzB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,OAAO,IAAI;IAGX,WAAW,IAAI,CAAE,UAAU;IAC3B,WAAW,IAAI,CAAE,UAAU;IAG3B,eAAe,IAAI;IAGnB,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,gBAAgB,KAAK;IACrB,cAAc,KAAK;IAGnB,eAAe,KAAK,CAAE,mBAAmB;IAGzC,cAAc,KAAK;CACpB;AAED,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAcjE,CAAC"}
|
|
@@ -20,6 +20,8 @@ var TypeUserHistory;
|
|
|
20
20
|
TypeUserHistory[TypeUserHistory["EQUIPMENT_LOST"] = 11] = "EQUIPMENT_LOST";
|
|
21
21
|
// Communication
|
|
22
22
|
TypeUserHistory[TypeUserHistory["MAIL_SENT_TO_TS"] = 12] = "MAIL_SENT_TO_TS";
|
|
23
|
+
//Equipe
|
|
24
|
+
TypeUserHistory[TypeUserHistory["TEAM_MOUVEMENT"] = 13] = "TEAM_MOUVEMENT";
|
|
23
25
|
})(TypeUserHistory || (exports.TypeUserHistory = TypeUserHistory = {}));
|
|
24
26
|
exports.TypeUserHistoryLabels = {
|
|
25
27
|
[TypeUserHistory.CREATE]: 'Création',
|
|
@@ -34,5 +36,6 @@ exports.TypeUserHistoryLabels = {
|
|
|
34
36
|
[TypeUserHistory.EQUIPMENT_RETURN]: 'Retour Matériel',
|
|
35
37
|
[TypeUserHistory.EQUIPMENT_LOST]: 'Matériel Perdu',
|
|
36
38
|
[TypeUserHistory.MAIL_SENT_TO_TS]: 'Mail envoyé à TS',
|
|
39
|
+
[TypeUserHistory.TEAM_MOUVEMENT]: 'Changement d\'équipe',
|
|
37
40
|
};
|
|
38
41
|
//# sourceMappingURL=UsersHistory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersHistory.js","sourceRoot":"","sources":["../../../../ts/types/Enum/UsersHistory.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"UsersHistory.js","sourceRoot":"","sources":["../../../../ts/types/Enum/UsersHistory.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAyBX;AAzBD,WAAY,eAAe;IACzB,sBAAsB;IACtB,yDAAU,CAAA;IACV,yDAAU,CAAA;IACV,yDAAU,CAAA;IACV,2DAAW,CAAA;IAEX,yCAAyC;IACzC,mEAAe,CAAA;IACf,mEAAe,CAAA;IAEf,WAAW;IACX,2EAAmB,CAAA;IAEnB,mBAAmB;IACnB,6EAAoB,CAAA;IACpB,6EAAoB,CAAA;IACpB,8EAAqB,CAAA;IACrB,0EAAmB,CAAA;IAEnB,gBAAgB;IAChB,4EAAoB,CAAA;IAEpB,QAAQ;IACR,0EAAmB,CAAA;AACrB,CAAC,EAzBW,eAAe,+BAAf,eAAe,QAyB1B;AAEY,QAAA,qBAAqB,GAAoC;IACpE,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,UAAU;IACpC,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,aAAa;IACvC,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,aAAa;IACvC,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc;IACzC,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,kBAAkB;IACjD,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,kBAAkB;IACjD,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,yBAAyB;IAC5D,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE,sBAAsB;IAC1D,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE,gBAAgB;IACpD,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE,iBAAiB;IACrD,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,gBAAgB;IAClD,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,kBAAkB;IACrD,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,sBAAsB;CACzD,CAAC","sourcesContent":["export enum TypeUserHistory {\n // Cycle de vie Compte\n CREATE = 1,\n UPDATE = 2,\n DELETE = 3,\n RESTORE = 4,\n\n // Validation & Modifications Spécifiques\n INFO_UPDATE = 5, // Info ok\n ROLE_UPDATE = 6, // Role ok\n\n // Sécurité\n PASSWORD_UPDATE = 7,\n\n // Gestion Matériel\n EQUIPMENT_ASSIGN = 8,\n EQUIPMENT_BROKEN = 9,\n EQUIPMENT_RETURN = 10,\n EQUIPMENT_LOST = 11,\n\n // Communication\n MAIL_SENT_TO_TS = 12, // Mail envoyé à TS\n\n //Equipe\n TEAM_MOUVEMENT = 13,\n}\n\nexport const TypeUserHistoryLabels: Record<TypeUserHistory, string> = {\n [TypeUserHistory.CREATE]: 'Création',\n [TypeUserHistory.UPDATE]: 'Mise à jour',\n [TypeUserHistory.DELETE]: 'Suppression',\n [TypeUserHistory.RESTORE]: 'Restauration',\n [TypeUserHistory.INFO_UPDATE]: 'Mise à jour Info',\n [TypeUserHistory.ROLE_UPDATE]: 'Mise à jour Rôle',\n [TypeUserHistory.PASSWORD_UPDATE]: 'Changement Mot de passe',\n [TypeUserHistory.EQUIPMENT_ASSIGN]: 'Assignation Matériel',\n [TypeUserHistory.EQUIPMENT_BROKEN]: 'Matériel Cassé',\n [TypeUserHistory.EQUIPMENT_RETURN]: 'Retour Matériel',\n [TypeUserHistory.EQUIPMENT_LOST]: 'Matériel Perdu',\n [TypeUserHistory.MAIL_SENT_TO_TS]: 'Mail envoyé à TS',\n [TypeUserHistory.TEAM_MOUVEMENT]: 'Changement d\\'équipe',\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateTeamsForUser.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/team/UpdateTeamsForUser.ts"],"names":[],"mappings":"AAIA,qBAAa,kBAAkB;IAI7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAMlB,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"UpdateTeamsForUser.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/team/UpdateTeamsForUser.ts"],"names":[],"mappings":"AAIA,qBAAa,kBAAkB;IAI7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAMlB,OAAO,CAAC,EAAE,OAAO,CAAC;IAMlB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CAEvB"}
|
|
@@ -30,9 +30,10 @@ __decorate([
|
|
|
30
30
|
__metadata("design:type", Boolean)
|
|
31
31
|
], UpdateTeamsForUser.prototype, "replace", void 0);
|
|
32
32
|
__decorate([
|
|
33
|
-
(0, utils_1.ApiPropertyOptional)(),
|
|
33
|
+
(0, utils_1.ApiPropertyOptional)({ type: [Number] }),
|
|
34
34
|
(0, class_validator_1.IsOptional)(),
|
|
35
|
-
(0, class_validator_1.
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
(0, class_validator_1.IsArray)(),
|
|
36
|
+
(0, class_validator_1.IsInt)({ each: true }),
|
|
37
|
+
__metadata("design:type", Array)
|
|
38
|
+
], UpdateTeamsForUser.prototype, "oldTeamIds", void 0);
|
|
38
39
|
//# sourceMappingURL=UpdateTeamsForUser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateTeamsForUser.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/team/UpdateTeamsForUser.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"UpdateTeamsForUser.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/team/UpdateTeamsForUser.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwE;AACxE,6CAAqE;AACrE,sFAA2E;AAE3E,MAAa,kBAAkB;CAkB9B;AAlBD,gDAkBC;AAdC;IAHC,IAAA,mBAAW,EAAC,EAAE,WAAW,EAAE,yCAAyC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;IACvF,IAAA,yBAAO,GAAE;IACT,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;mDACJ;AAMlB;IAJC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,6BAAS,GAAE;;mDACM;AAMlB;IAJC,IAAA,2BAAmB,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;IACvC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sDACA","sourcesContent":["import { IsArray, IsBoolean, IsInt, IsOptional } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\n\nexport class UpdateTeamsForUser {\n @ApiProperty({ description: 'Array of team IDs to assign to the user', type: [Number] })\n @IsArray()\n @IsInt({ each: true })\n teamIds: number[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n replace?: boolean;\n\n @ApiPropertyOptional({ type: [Number] })\n @IsOptional()\n @IsArray()\n @IsInt({ each: true })\n oldTeamIds?: number[];\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateCoworker.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/user/UpdateCoworker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIrE,qBAAa,eAAgB,YAAW,KAAK;IAI3C,UAAU,CAAC,EAAE,MAAM,CAAC;IAKpB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,MAAM,CAAC,EAAE,OAAO,CAAC;IAMjB,SAAS,CAAC,EAAE,OAAO,CAAC;IAMpB,WAAW,CAAC,EAAE,OAAO,CAAC;IAKtB,aAAa,CAAC,EAAE,MAAM,CAAC;IAMvB,UAAU,CAAC,EAAE,OAAO,CAAC;IAKrB,SAAS,CAAC,EAAE,IAAI,CAAC;IAKjB,WAAW,CAAC,EAAE,IAAI,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;OAEG;IAIH,iBAAiB,CAAC,EAAE,eAAe,CAAC;IAGpC,IAAI,CAAC,EAAE,KAAK,CAAC;IAKb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAKnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAKnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAKzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B"}
|
|
1
|
+
{"version":3,"file":"UpdateCoworker.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/user/UpdateCoworker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAIrE,qBAAa,eAAgB,YAAW,KAAK;IAI3C,UAAU,CAAC,EAAE,MAAM,CAAC;IAKpB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,MAAM,CAAC,EAAE,OAAO,CAAC;IAMjB,SAAS,CAAC,EAAE,OAAO,CAAC;IAMpB,WAAW,CAAC,EAAE,OAAO,CAAC;IAKtB,aAAa,CAAC,EAAE,MAAM,CAAC;IAMvB,UAAU,CAAC,EAAE,OAAO,CAAC;IAKrB,SAAS,CAAC,EAAE,IAAI,CAAC;IAKjB,WAAW,CAAC,EAAE,IAAI,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;OAEG;IAIH,iBAAiB,CAAC,EAAE,eAAe,CAAC;IAGpC,IAAI,CAAC,EAAE,KAAK,CAAC;IAKb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAKnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAKtB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAKnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAKzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B"}
|
|
@@ -133,6 +133,12 @@ __decorate([
|
|
|
133
133
|
(0, class_validator_1.IsArray)(),
|
|
134
134
|
__metadata("design:type", Array)
|
|
135
135
|
], UpdateCorworker.prototype, "idRoles", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, utils_1.ApiPropertyOptional)(),
|
|
138
|
+
(0, class_validator_1.IsOptional)(),
|
|
139
|
+
(0, class_validator_1.IsArray)(),
|
|
140
|
+
__metadata("design:type", Array)
|
|
141
|
+
], UpdateCorworker.prototype, "idOldRoles", void 0);
|
|
136
142
|
__decorate([
|
|
137
143
|
(0, utils_1.ApiPropertyOptional)(),
|
|
138
144
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateCoworker.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/user/UpdateCoworker.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAoH;AACpH,gCAAqE;AACrE,6CAAwD;AACxD,sFAA2E;AAE3E,MAAa,eAAe;
|
|
1
|
+
{"version":3,"file":"UpdateCoworker.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/user/UpdateCoworker.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAoH;AACpH,gCAAqE;AACrE,6CAAwD;AACxD,sFAA2E;AAE3E,MAAa,eAAe;CAwH3B;AAxHD,0CAwHC;AApHC;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACS;AAKpB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kDACQ;AAKnB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACO;AAKlB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,+BAAa,EAAC,IAAI,CAAC;;8CACL;AAKf;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;I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E;IACZ,IAAA,wBAAM,EAAC,mBAAe,CAAC;;0DACY;AAGpC;IADC,IAAA,2BAAmB,GAAE;;6CACT;AAKb;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;gDACS;AAKnB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;mDACY;AAKtB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;gDACS;AAKnB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;sDACe;AAKzB;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;wDACiB","sourcesContent":["import { IsOptional, IsString, IsPhoneNumber, IsNumber, IsBoolean, IsDate, IsArray, IsEnum } from 'class-validator';\nimport { CommercialGrade, EntityType, IUser, TFile } from '../../..';\nimport { ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\n\nexport class UpdateCorworker implements IUser {\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idCivility?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n firstname?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n lastname?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsPhoneNumber('FR')\n phone?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n email?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n username?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n password?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n active?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n flexitime?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n longAbsence?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n positionLabel?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n apprentice?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n birthdate?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDate()\n arrivalDate?: Date;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idOffice?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsEnum(EntityType)\n entity?: EntityType;\n\n /**\n * @deprecated\n */\n @ApiPropertyOptional()\n @IsOptional()\n @IsEnum(CommercialGrade)\n idCommercialGrade?: CommercialGrade;\n\n @ApiPropertyOptional()\n file?: TFile;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n idRoles?: number[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n idOldRoles?: number[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n idTeams?: number[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n idUsersBrands?: number[];\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsArray()\n idBusinessLines?: number[];\n}\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
2
|
-
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
2
|
+
import { IMetadata, IUsersHistory } from '../../models/IUsersHistory';
|
|
3
3
|
export declare class CreateUsersHistory implements Omit<IUsersHistory, 'id' | 'createdAt' | 'updatedAt' | 'idAuthor'> {
|
|
4
4
|
idUser: number;
|
|
5
5
|
comment?: string;
|
|
6
6
|
actionType: TypeUserHistory;
|
|
7
|
+
metadata?: IMetadata;
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=Create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEtE,qBAAa,kBAAmB,YAAW,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CAAC;IAG3G,MAAM,EAAE,MAAM,CAAC;IAKf,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,UAAU,EAAE,eAAe,CAAC;IAI5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -32,4 +32,9 @@ __decorate([
|
|
|
32
32
|
(0, class_validator_1.IsEnum)(UsersHistory_1.TypeUserHistory),
|
|
33
33
|
__metadata("design:type", Number)
|
|
34
34
|
], CreateUsersHistory.prototype, "actionType", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, decorators_1.ApiPropertyOptional)({ type: 'object' }),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], CreateUsersHistory.prototype, "metadata", void 0);
|
|
35
40
|
//# sourceMappingURL=Create.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Create.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsE;AACtE,6DAAgF;AAChF,6DAA6D;AAG7D,MAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Create.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsE;AACtE,6DAAgF;AAChF,6DAA6D;AAG7D,MAAa,kBAAkB;CAiB9B;AAjBD,gDAiBC;AAdC;IAFC,IAAA,wBAAW,GAAE;IACb,IAAA,uBAAK,GAAE;;kDACO;AAKf;IAHC,IAAA,gCAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACM;AAIjB;IAFC,IAAA,wBAAW,GAAE;IACb,IAAA,wBAAM,EAAC,8BAAe,CAAC;;sDACI;AAI5B;IAFC,IAAA,gCAAmB,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IACvC,IAAA,4BAAU,GAAE;;oDACQ","sourcesContent":["import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';\nimport { TypeUserHistory } from '../../../Enum/UsersHistory';\nimport { IMetadata, IUsersHistory } from '../../models/IUsersHistory';\n\nexport class CreateUsersHistory implements Omit<IUsersHistory, 'id' | 'createdAt' | 'updatedAt' | 'idAuthor'> {\n @ApiProperty()\n @IsInt()\n idUser: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n comment?: string;\n\n @ApiProperty()\n @IsEnum(TypeUserHistory)\n actionType: TypeUserHistory;\n\n @ApiPropertyOptional({ type: 'object' })\n @IsOptional()\n metadata?: IMetadata;\n}"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
2
|
-
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
2
|
+
import { IMetadata, IUsersHistory } from '../../models/IUsersHistory';
|
|
3
3
|
export declare class UpdateUsersHistory implements Partial<Omit<IUsersHistory, 'id' | 'idUser' | 'idAuthor'>> {
|
|
4
4
|
comment?: string;
|
|
5
5
|
actionType?: TypeUserHistory;
|
|
6
|
+
metadata?: IMetadata;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=Update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGtE,qBAAa,kBAAmB,YAAW,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC;IAInG,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,UAAU,CAAC,EAAE,eAAe,CAAC;IAI7B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -28,4 +28,9 @@ __decorate([
|
|
|
28
28
|
(0, class_validator_1.IsEnum)(UsersHistory_1.TypeUserHistory),
|
|
29
29
|
__metadata("design:type", Number)
|
|
30
30
|
], UpdateUsersHistory.prototype, "actionType", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, decorators_1.ApiPropertyOptional)({ type: 'object' }),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], UpdateUsersHistory.prototype, "metadata", void 0);
|
|
31
36
|
//# sourceMappingURL=Update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Update.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,6DAAmE;AACnE,6DAA6D;AAI7D,MAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Update.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,6DAAmE;AACnE,6DAA6D;AAI7D,MAAa,kBAAkB;CAc9B;AAdD,gDAcC;AAVC;IAHC,IAAA,gCAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACM;AAKjB;IAHC,IAAA,gCAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,8BAAe,CAAC;;sDACK;AAI7B;IAFC,IAAA,gCAAmB,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IACvC,IAAA,4BAAU,GAAE;;oDACQ","sourcesContent":["import { IsEnum, IsOptional, IsString } from 'class-validator';\nimport { ApiPropertyOptional } from '../../../../utils/decorators';\nimport { TypeUserHistory } from '../../../Enum/UsersHistory';\nimport { IMetadata, IUsersHistory } from '../../models/IUsersHistory';\n\n\nexport class UpdateUsersHistory implements Partial<Omit<IUsersHistory, 'id' | 'idUser' | 'idAuthor'>> {\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n comment?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsEnum(TypeUserHistory)\n actionType?: TypeUserHistory;\n\n @ApiPropertyOptional({ type: 'object' })\n @IsOptional()\n metadata?: IMetadata;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetWebinarsParams.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/webex/GetWebinarsParams.ts"],"names":[],"mappings":"AAGA,qBAAa,iBAAiB;
|
|
1
|
+
{"version":3,"file":"GetWebinarsParams.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/webex/GetWebinarsParams.ts"],"names":[],"mappings":"AAGA,qBAAa,iBAAiB;IAI5B,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,EAAE,CAAC,EAAE,MAAM,CAAC;IAKZ,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -16,27 +16,32 @@ class GetWebinarsParams {
|
|
|
16
16
|
}
|
|
17
17
|
exports.GetWebinarsParams = GetWebinarsParams;
|
|
18
18
|
__decorate([
|
|
19
|
-
(0, utils_1.
|
|
19
|
+
(0, utils_1.ApiPropertyOptional)(),
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
20
21
|
(0, class_validator_1.IsString)(),
|
|
21
22
|
__metadata("design:type", String)
|
|
22
23
|
], GetWebinarsParams.prototype, "from", void 0);
|
|
23
24
|
__decorate([
|
|
24
|
-
(0, utils_1.
|
|
25
|
+
(0, utils_1.ApiPropertyOptional)(),
|
|
26
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
27
|
(0, class_validator_1.IsString)(),
|
|
26
28
|
__metadata("design:type", String)
|
|
27
29
|
], GetWebinarsParams.prototype, "to", void 0);
|
|
28
30
|
__decorate([
|
|
29
|
-
(0, utils_1.
|
|
31
|
+
(0, utils_1.ApiPropertyOptional)(),
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
33
|
(0, class_validator_1.IsInt)(),
|
|
31
34
|
__metadata("design:type", Number)
|
|
32
35
|
], GetWebinarsParams.prototype, "limit", void 0);
|
|
33
36
|
__decorate([
|
|
34
|
-
(0, utils_1.
|
|
37
|
+
(0, utils_1.ApiPropertyOptional)(),
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
39
|
(0, class_validator_1.IsInt)(),
|
|
36
40
|
__metadata("design:type", Number)
|
|
37
41
|
], GetWebinarsParams.prototype, "skip", void 0);
|
|
38
42
|
__decorate([
|
|
39
|
-
(0, utils_1.
|
|
43
|
+
(0, utils_1.ApiPropertyOptional)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
45
|
(0, class_validator_1.IsString)(),
|
|
41
46
|
__metadata("design:type", String)
|
|
42
47
|
], GetWebinarsParams.prototype, "meetingSeriesId", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetWebinarsParams.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/webex/GetWebinarsParams.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"GetWebinarsParams.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/webex/GetWebinarsParams.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA8D;AAC9D,6CAAwD;AAExD,MAAa,iBAAiB;CAyB7B;AAzBD,8CAyBC;AArBC;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACG;AAKd;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6CACC;AAKZ;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;gDACO;AAKf;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;+CACM;AAKd;IAHC,IAAA,2BAAmB,GAAE;IACrB,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACc","sourcesContent":["import { IsInt, IsOptional, IsString } from 'class-validator';\nimport { ApiPropertyOptional } from '../../../../utils';\n\nexport class GetWebinarsParams {\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n from?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n to?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n limit?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n skip?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n meetingSeriesId?: string;\n}\n"]}
|
|
@@ -3,12 +3,18 @@ import { TypeUserHistory } from '../../Enum/UsersHistory';
|
|
|
3
3
|
export interface IUsersHistory {
|
|
4
4
|
id?: number;
|
|
5
5
|
idUser: number;
|
|
6
|
-
idAuthor
|
|
6
|
+
idAuthor: number;
|
|
7
7
|
comment?: string | null;
|
|
8
8
|
actionType: TypeUserHistory;
|
|
9
|
+
metadata?: IMetadata | null;
|
|
9
10
|
createdAt?: Date | null;
|
|
10
11
|
updatedAt?: Date | null;
|
|
11
12
|
user?: IUser;
|
|
12
13
|
author?: IUser;
|
|
13
14
|
}
|
|
15
|
+
export interface IMetadata {
|
|
16
|
+
leaveId: number[];
|
|
17
|
+
joinId: number[];
|
|
18
|
+
stayId: number[];
|
|
19
|
+
}
|
|
14
20
|
//# sourceMappingURL=IUsersHistory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IUsersHistory.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUsersHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,
|
|
1
|
+
{"version":3,"file":"IUsersHistory.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUsersHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,eAAe,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAIxB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AACD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IUsersHistory.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUsersHistory.ts"],"names":[],"mappings":"","sourcesContent":["import { IUser } from './IUser';\nimport { TypeUserHistory } from '../../Enum/UsersHistory';\n\nexport interface IUsersHistory {\n id?: number;\n idUser: number;\n idAuthor
|
|
1
|
+
{"version":3,"file":"IUsersHistory.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUsersHistory.ts"],"names":[],"mappings":"","sourcesContent":["import { IUser } from './IUser';\nimport { TypeUserHistory } from '../../Enum/UsersHistory';\n\nexport interface IUsersHistory {\n id?: number;\n idUser: number;\n idAuthor: number;\n comment?: string | null;\n actionType: TypeUserHistory;\n metadata?: IMetadata | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n\n // Relations\n user?: IUser;\n author?: IUser;\n}\nexport interface IMetadata {\n leaveId: number[];\n joinId: number[];\n stayId: number[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"societyApproval.d.ts","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA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iB,GAC7B,6BAA6B,GAAG,SAAS,CAE3C;AAED;;;;;GAKG;AAEH,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,iBAAiB,EAC9B,cAAc,EAAE,2BAA2B,GAC1C,MAAM,GAAG,SAAS,CAIpB;AAYD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,iBAAiB,EAC9B,cAAc,EAAE,2BAA2B,GAC1C,+BAA+B,GAAG,SAAS,CAG7C;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAyEhH"}
|
|
@@ -80,7 +80,14 @@ function buildApprovalTemplateData(existingApproval, style) {
|
|
|
80
80
|
const brand = (0, brands_1.getBrand)();
|
|
81
81
|
return Object.assign(Object.assign({
|
|
82
82
|
// Variables globales
|
|
83
|
-
|
|
83
|
+
rates: {
|
|
84
|
+
flatTax: 0.314,
|
|
85
|
+
flatLevy: 0.128, //prelevement forfaitaire
|
|
86
|
+
csg: 0.106,
|
|
87
|
+
solidarity: 0.075,
|
|
88
|
+
crds: 0.005,
|
|
89
|
+
socialSecurityContributions: 0.186, //= csg + solidarity + crds
|
|
90
|
+
}, style,
|
|
84
91
|
yearInText,
|
|
85
92
|
dayAndMonthInText, date: dayjs().locale('fr').format('DD MMMM YYYY'), companyInformation: {
|
|
86
93
|
rcs: (_d = brand === null || brand === void 0 ? void 0 : brand.companyInformation) === null || _d === void 0 ? void 0 : _d.rcs,
|
|
@@ -107,7 +114,7 @@ function buildApprovalTemplateData(existingApproval, style) {
|
|
|
107
114
|
.format('DD MMMM YYYY'),
|
|
108
115
|
}
|
|
109
116
|
: {})), exercice: Object.assign(Object.assign({}, existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice), { society: Object.assign(Object.assign({}, (_3 = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _3 === void 0 ? void 0 : _3.society), { cityOfGreffe: getCityOfGreffeName((_5 = (_4 = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _4 === void 0 ? void 0 : _4.society) === null || _5 === void 0 ? void 0 : _5.idCityOfGreffe).toUpperCase(), siren: ((_7 = (_6 = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _6 === void 0 ? void 0 : _6.society) === null || _7 === void 0 ? void 0 : _7.siret)
|
|
110
|
-
? (_9 = (_8 = (0, siretValidation_1.siretToSiren)(existingApproval.exercice.society.siret)) === null || _8 === void 0 ? void 0 : _8.replace(/(\d{3})(\d{3})(\d{3})/, '$1 $2 $3')) !== null && _9 !== void 0 ? _9 : null
|
|
117
|
+
? ((_9 = (_8 = (0, siretValidation_1.siretToSiren)(existingApproval.exercice.society.siret)) === null || _8 === void 0 ? void 0 : _8.replace(/(\d{3})(\d{3})(\d{3})/, '$1 $2 $3')) !== null && _9 !== void 0 ? _9 : null)
|
|
111
118
|
: null }), endDate: dayjs((_10 = existingApproval === null || existingApproval === void 0 ? void 0 : existingApproval.exercice) === null || _10 === void 0 ? void 0 : _10.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase() }) });
|
|
112
119
|
}
|
|
113
120
|
//# sourceMappingURL=societyApproval.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":";;AAqBA,4CAEC;AAOD,0EAIC;AASD,0EAOC;AAkBD,4DAMC;AAQD,8DAgEC;AAlJD,uDAAuE;AACvE,mEAKuC;AAEvC,mDAAoD;AACpD,qCAAoC;AACpC,qCAAiD;AACjD,+BAA+B;AAC/B,6DAAgE;AAChE,uDAAiD;AAEjD;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,WAA8B,EAAE,WAAmB,EAAE;;IACpF,OAAO,MAAA,MAAA,MAAM,CAAC,MAAM,CAAC,qBAAS,CAAC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oBAC7G,CAAC,CAAC,IAAI,KAEV,OAAO,EAAE,KAAK,CAAC,OAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,4CAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE,OAEvG;AACJ,CAAC","sourcesContent":["import { LegalForm, LegalFormTypeEnum } from '../types/Enum/LegalForm';\nimport {\n SocietyApprovalDocumentType,\n SocietyApprovalDocumentConfig,\n SocietyApprovalDocumentsByLegalForm,\n SocietyApprovalDocumentTemplate,\n} from '../types/Enum/SocietyApproval';\nimport { ISocietyApproval } from '../types/Interface/models/ISocietyApproval';\nimport { QualityList } from '../types/Enum/Quality';\nimport { getBrand } from './brands';\nimport { convertNumberToLetter } from './amount';\nimport * as dayjs from 'dayjs';\nimport { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe';\nimport { siretToSiren } from './siretValidation';\n\n/**\n * Récupère le nom de la forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param fallback - Valeur par défaut si non trouvée\n * @returns Le nom de la forme juridique\n */\nexport function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallback: string = ''): string {\n return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;\n}\n\n/**\n * Récupère la configuration des documents d'approbation pour une forme juridique donnée\n * @param idLegalForm - L'identifiant de la forme juridique\n * @returns La configuration des documents ou undefined si non trouvée\n */\nexport function getApprovalDocumentsByLegalForm(\n idLegalForm: LegalFormTypeEnum,\n): SocietyApprovalDocumentConfig | undefined {\n return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\n//@deprecated use getApprovalDocumentInfos instead\nexport function getApprovalDocumentTemplateName(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): string | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n return document?.templateName;\n}\n\n/**\n * Récupère le texte de la ville du greffe\n * @param idCityOfGreffe - L'identifiant de la ville du greffe\n * @returns Le texte de la ville ou une chaîne vide\n */\nfunction getCityOfGreffeName(idCityOfGreffe: number | null | undefined): string {\n if (!idCityOfGreffe) return '';\n return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\nexport function getApprovalDocumentInfos(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): SocietyApprovalDocumentTemplate | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n}\n\n/**\n * Construit les données formatées pour le template d'approbation\n * @param existingApproval - Les données d'approbation de la société\n * @param style - Le style HTML pour le document\n * @returns L'objet de données formaté pour le template\n */\nexport function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {\n const yearInText = convertNumberToLetter(\n +dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('YYYY'),\n ).toLowerCase();\n const dayAndMonthInText = `${convertNumberToLetter(+dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('D'))} ${dayjs(\n existingApproval?.generatingDatas?.approvalDate || null,\n )\n .locale('fr')\n .format('MMMM')\n .toLowerCase()}`;\n const brand = getBrand();\n return {\n // Variables globales\n style,\n yearInText,\n dayAndMonthInText,\n date: dayjs().locale('fr').format('DD MMMM YYYY'),\n companyInformation: {\n rcs: brand?.companyInformation?.rcs,\n nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,\n city: brand?.companyInformation?.city,\n postalAddress: brand?.companyInformation?.postalAddress,\n montantCapital: brand?.companyInformation?.montantCapital,\n statut: brand?.companyInformation?.statut,\n ECOrderCity: brand?.companyInformation?.ECOrderCity,\n },\n owner: {\n identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,\n quality: QualityList.find(\n (ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality,\n )?.label,\n },\n // Variables stockées en base\n ...existingApproval,\n generatingDatas: {\n ...existingApproval?.generatingDatas,\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n ...(existingApproval?.generatingDatas?.approvalDividendsPaymentDate\n ? {\n approvalDividendsPaymentDate: dayjs(existingApproval?.generatingDatas?.approvalDividendsPaymentDate)\n .locale('fr')\n .format('DD MMMM YYYY'),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),\n siren: existingApproval?.exercice?.society?.siret\n ? siretToSiren(existingApproval.exercice.society.siret)?.replace(/(\\d{3})(\\d{3})(\\d{3})/, '$1 $2 $3') ?? null\n : null,\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":";;AAqBA,4CAEC;AAOD,0EAIC;AASD,0EAOC;AAkBD,4DAMC;AAQD,8DAyEC;AA3JD,uDAAuE;AACvE,m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C,YAAY,EAAE,mBAAmB,CAAC,MAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,0CAAE,OAAO,0CAAE,cAAc,CAAC,CAAC,WAAW,EAAE,EACpG,KAAK,EAAE,CAAA,MAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,0CAAE,OAAO,0CAAE,KAAK;oBAC/C,CAAC,CAAC,CAAC,MAAA,MAAA,IAAA,8BAAY,EAAC,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,0CAAE,OAAO,CAAC,uBAAuB,EAAE,UAAU,CAAC,mCACpG,IAAI,CAAC;oBACP,CAAC,CAAC,IAAI,KAEV,OAAO,EAAE,KAAK,CAAC,OAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,4CAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE,OAEvG;AACJ,CAAC","sourcesContent":["import { LegalForm, LegalFormTypeEnum } from '../types/Enum/LegalForm';\nimport {\n SocietyApprovalDocumentType,\n SocietyApprovalDocumentConfig,\n SocietyApprovalDocumentsByLegalForm,\n SocietyApprovalDocumentTemplate,\n} from '../types/Enum/SocietyApproval';\nimport { ISocietyApproval } from '../types/Interface/models/ISocietyApproval';\nimport { QualityList } from '../types/Enum/Quality';\nimport { getBrand } from './brands';\nimport { convertNumberToLetter } from './amount';\nimport * as dayjs from 'dayjs';\nimport { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe';\nimport { siretToSiren } from './siretValidation';\n\n/**\n * Récupère le nom de la forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param fallback - Valeur par défaut si non trouvée\n * @returns Le nom de la forme juridique\n */\nexport function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallback: string = ''): string {\n return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;\n}\n\n/**\n * Récupère la configuration des documents d'approbation pour une forme juridique donnée\n * @param idLegalForm - L'identifiant de la forme juridique\n * @returns La configuration des documents ou undefined si non trouvée\n */\nexport function getApprovalDocumentsByLegalForm(\n idLegalForm: LegalFormTypeEnum,\n): SocietyApprovalDocumentConfig | undefined {\n return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\n//@deprecated use getApprovalDocumentInfos instead\nexport function getApprovalDocumentTemplateName(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): string | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n return document?.templateName;\n}\n\n/**\n * Récupère le texte de la ville du greffe\n * @param idCityOfGreffe - L'identifiant de la ville du greffe\n * @returns Le texte de la ville ou une chaîne vide\n */\nfunction getCityOfGreffeName(idCityOfGreffe: number | null | undefined): string {\n if (!idCityOfGreffe) return '';\n return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\nexport function getApprovalDocumentInfos(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): SocietyApprovalDocumentTemplate | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n}\n\n/**\n * Construit les données formatées pour le template d'approbation\n * @param existingApproval - Les données d'approbation de la société\n * @param style - Le style HTML pour le document\n * @returns L'objet de données formaté pour le template\n */\nexport function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {\n const yearInText = convertNumberToLetter(\n +dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('YYYY'),\n ).toLowerCase();\n const dayAndMonthInText = `${convertNumberToLetter(+dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('D'))} ${dayjs(\n existingApproval?.generatingDatas?.approvalDate || null,\n )\n .locale('fr')\n .format('MMMM')\n .toLowerCase()}`;\n const brand = getBrand();\n return {\n // Variables globales\n rates: {\n flatTax: 0.314,\n flatLevy: 0.128, //prelevement forfaitaire\n csg: 0.106,\n solidarity: 0.075,\n crds: 0.005,\n socialSecurityContributions: 0.186, //= csg + solidarity + crds\n },\n style,\n yearInText,\n dayAndMonthInText,\n date: dayjs().locale('fr').format('DD MMMM YYYY'),\n companyInformation: {\n rcs: brand?.companyInformation?.rcs,\n nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,\n city: brand?.companyInformation?.city,\n postalAddress: brand?.companyInformation?.postalAddress,\n montantCapital: brand?.companyInformation?.montantCapital,\n statut: brand?.companyInformation?.statut,\n ECOrderCity: brand?.companyInformation?.ECOrderCity,\n },\n owner: {\n identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,\n quality: QualityList.find(\n (ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality,\n )?.label,\n },\n // Variables stockées en base\n ...existingApproval,\n generatingDatas: {\n ...existingApproval?.generatingDatas,\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n ...(existingApproval?.generatingDatas?.approvalDividendsPaymentDate\n ? {\n approvalDividendsPaymentDate: dayjs(existingApproval?.generatingDatas?.approvalDividendsPaymentDate)\n .locale('fr')\n .format('DD MMMM YYYY'),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),\n siren: existingApproval?.exercice?.society?.siret\n ? (siretToSiren(existingApproval.exercice.society.siret)?.replace(/(\\d{3})(\\d{3})(\\d{3})/, '$1 $2 $3') ??\n null)\n : null,\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),\n },\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../ts/api/resources/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EASL,IAAI,EACJ,eAAe,GAiBhB,MAAM,aAAa,CAAC;AAErB,MAAM,OAAO,IAAK,SAAQ,QAAQ;IAChC,OAAO,CAAC,MAAoB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IACD,2BAA2B,CAAC,MAAmC;QAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,MAAM,CAAC,EAAE,yBAAyB,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,CAAC,IAAgB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,QAAQ,CAAC,IAAoB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,qBAAqB,CAAC,IAAoB,EAAE,IAAW;QACrD,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAChC,MAAM,CAAC,OAAO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CAAC,MAAgC;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,qBAAqB,CAAC,MAAc;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,wBAAwB,CAAC,EAAU,EAAE,MAAoC;QACvE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport {\n IUser,\n QueryConfirm,\n QueryResendConfirmationLink,\n CreateUser,\n CreateCoworker,\n QueryUserSmsConfirmation,\n QueryGetAllFromSociety,\n ISociety,\n Role,\n TimeCounterType,\n QueryGetAllCollaborators,\n QueryGetAllCollaboratorsByRoles,\n QueryGetAllWithoutBp,\n CollaboratorsByRoles,\n QueryUserExport,\n UpdateCorworker,\n GetSocietyFromUser,\n RegisterProspectBody,\n RegisterProspectResponse,\n QueryGet,\n BasePaginate,\n QueryGetAllUsersPaginated,\n QueryUpdatePassword,\n CreateCollaboraterDetail,\n IWorkingSchedule,\n ICollaboraterDetail,\n} from '../../types';\n\nexport class User extends Resource {\n confirm(params: QueryConfirm): Promise<IUser> {\n return this.axios.$put('user/confirm', params);\n }\n resendConfirmationEmailLink(params: QueryResendConfirmationLink): Promise<boolean> {\n return this.axios.$put(`user/${params.id}/send-confirmation-mail`);\n }\n create(data: CreateUser): Promise<IUser> {\n return this.axios.$post('user/create', data);\n }\n coworker(data: CreateCoworker): Promise<IUser> {\n return this.axios.$post('user/coworker', data);\n }\n\n createCompletCoworker(data: CreateCoworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n if (Array.isArray(value)) {\n value.forEach((v) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else {\n formData.append(key, `${value}`);\n }\n }\n });\n if (file){ \n formData.append('file', file);\n }\n return this.axios.$post('user/coworker/complete', formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCoworker(idUser: number, params: UpdateCorworker): Promise<IUser> {\n const formData = new FormData();\n Object.entries(params).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n\n return this.axios.$put(`/user/coworker/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCompletCoworker(idUser: number, data: UpdateCorworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n if (file){\n formData.append('file', file);\n }\n return this.axios.$put(`/user/coworker/complete/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n sendNewCode(id: number): Promise<IUser> {\n return this.axios.$put(`user/${id}/sendNewSmsCode`);\n }\n verifySmsCodeConfirmation(id: number, params: QueryUserSmsConfirmation): Promise<IUser> {\n return this.axios.$get(`user/${id}/verifySmsCodeConfirmation`, { params });\n }\n allFromSociety(params: QueryGetAllFromSociety): Promise<IUser[]> {\n return this.axios.$get('user/all-from-society', { params });\n }\n allWithoutBp(params: QueryGetAllWithoutBp): Promise<IUser[]> {\n return this.axios.$get('user/all-without-bp', { params });\n }\n allCollaborators(params: QueryGetAllCollaborators): Promise<IUser[]> {\n return this.axios.$get('user/all-collaborators', { params });\n }\n allCollaboratorsByRoles(data: QueryGetAllCollaboratorsByRoles): Promise<CollaboratorsByRoles[]> {\n const { idTimeCounterType, idRoles } = data;\n let params = { idRoles };\n if (idTimeCounterType) {\n const timeCounterType = Object.values(TimeCounterType).find((tct) => tct.id === idTimeCounterType);\n const rolesByDefault = [\n Role.FRONT_OFFICE,\n Role.FRONT_OFFICE_EXPRESS,\n Role.SOCIAL,\n Role.JURIDIC,\n Role.HUMAN_RESSOURCES,\n Role.FACTURATION,\n Role.CUSTOMER_SUCCESS,\n Role.COMMERCIAL,\n Role.MANAGER,\n Role.EXPERT_ACCOUNTANT,\n Role.DEVELOPER,\n Role.TECHNICAL_ADVISOR,\n ];\n params = { idRoles: timeCounterType?.limitedRoles ?? rolesByDefault };\n }\n return this.axios.$get('user/all-collaborators-by-roles', { params });\n }\n getAllPaginated(params: QueryGetAllUsersPaginated, signal?: AbortSignal): Promise<BasePaginate<IUser>> {\n return this.axios.$get('/user/paginated', {\n ...(signal ? { signal } : {}),\n params,\n });\n }\n selectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates');\n }\n selectableTeammatesV2(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates/v2');\n }\n calendarSelectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/calendar-selectable-teammates');\n }\n\n getAllSocieties(id: number, params: GetSocietyFromUser): Promise<ISociety[]> {\n return this.axios.$get(`/users/${id}/societies`, { params });\n }\n\n update(id: number, params: Partial<IUser> & { lastMobileConnection?: Date }): Promise<IUser> {\n return this.axios.$put(`user/${id}`, params);\n }\n getInfo(params?: QueryGet): Promise<IUser> {\n return this.axios.$get('user', { params });\n }\n delete(id: number): Promise<number> {\n return this.axios.$delete(`users/${id}`);\n }\n\n updatePassword(id: number, body: QueryUpdatePassword): Promise<Partial<IUser>> {\n return this.axios.$patch(`/users/${id}/password`, body);\n }\n\n getByRoles(params: { roles: Role[] }): Promise<IUser[]> {\n return this.axios.$get('users/roles', { params });\n }\n export(params: QueryUserExport): Promise<Buffer> {\n return this.axios.$get('users/export', {\n params,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {\n return this.axios.$post('users/prospect', body);\n }\n\n updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCoworkerWorkingSchedules(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCollaboraterDetail(params: CreateCollaboraterDetail): Promise<ICollaboraterDetail> {\n return this.axios.$post('collaboraters-details', params);\n }\n\n getCollaboraterDetail(idUser: number): Promise<ICollaboraterDetail> {\n return this.axios.$get(`collaboraters-details/user/${idUser}`);\n }\n\n updateCollaboraterDetail(id: number, params: Partial<ICollaboraterDetail>): Promise<ICollaboraterDetail> {\n return this.axios.$put(`collaboraters-details/${id}`, params);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../ts/api/resources/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EASL,IAAI,EACJ,eAAe,GAiBhB,MAAM,aAAa,CAAC;AAErB,MAAM,OAAO,IAAK,SAAQ,QAAQ;IAChC,OAAO,CAAC,MAAoB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IACD,2BAA2B,CAAC,MAAmC;QAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,MAAM,CAAC,EAAE,yBAAyB,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,CAAC,IAAgB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,QAAQ,CAAC,I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AoB,EAAE,gBAAgB,CAAC,CAAC;IAC1F,CAAC;IAED,8BAA8B,CAAC,MAAc,EAAE,gBAAgD;QAC7F,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,MAAM,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;IAC1F,CAAC;IAED,wBAAwB,CAAC,MAAgC;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,qBAAqB,CAAC,MAAc;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,wBAAwB,CAAC,EAAU,EAAE,MAAoC;QACvE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport {\n IUser,\n QueryConfirm,\n QueryResendConfirmationLink,\n CreateUser,\n CreateCoworker,\n QueryUserSmsConfirmation,\n QueryGetAllFromSociety,\n ISociety,\n Role,\n TimeCounterType,\n QueryGetAllCollaborators,\n QueryGetAllCollaboratorsByRoles,\n QueryGetAllWithoutBp,\n CollaboratorsByRoles,\n QueryUserExport,\n UpdateCorworker,\n GetSocietyFromUser,\n RegisterProspectBody,\n RegisterProspectResponse,\n QueryGet,\n BasePaginate,\n QueryGetAllUsersPaginated,\n QueryUpdatePassword,\n CreateCollaboraterDetail,\n IWorkingSchedule,\n ICollaboraterDetail,\n} from '../../types';\n\nexport class User extends Resource {\n confirm(params: QueryConfirm): Promise<IUser> {\n return this.axios.$put('user/confirm', params);\n }\n resendConfirmationEmailLink(params: QueryResendConfirmationLink): Promise<boolean> {\n return this.axios.$put(`user/${params.id}/send-confirmation-mail`);\n }\n create(data: CreateUser): Promise<IUser> {\n return this.axios.$post('user/create', data);\n }\n coworker(data: CreateCoworker): Promise<IUser> {\n return this.axios.$post('user/coworker', data);\n }\n\n createCompletCoworker(data: CreateCoworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n if (Array.isArray(value)) {\n value.forEach((v) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else {\n formData.append(key, `${value}`);\n }\n }\n });\n if (file) {\n formData.append('file', file);\n }\n return this.axios.$post('user/coworker/complete', formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCoworker(idUser: number, params: UpdateCorworker): Promise<IUser> {\n const formData = new FormData();\n Object.entries(params).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n\n return this.axios.$put(`/user/coworker/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n updateCompletCoworker(idUser: number, data: UpdateCorworker, file?: File): Promise<IUser> {\n const formData = new FormData();\n Object.entries(data).forEach(([key, value]) => {\n if (value || value === false || value === 0) {\n if (Array.isArray(value)) {\n value.forEach((v: number | string) => {\n formData.append(`${key}[]`, `${v}`);\n });\n } else if (key === 'file') formData.append('file', value);\n else formData.append(key, `${value}`);\n }\n });\n if (file) {\n formData.append('file', file);\n }\n return this.axios.$put(`/user/coworker/complete/${idUser}`, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n sendNewCode(id: number): Promise<IUser> {\n return this.axios.$put(`user/${id}/sendNewSmsCode`);\n }\n verifySmsCodeConfirmation(id: number, params: QueryUserSmsConfirmation): Promise<IUser> {\n return this.axios.$get(`user/${id}/verifySmsCodeConfirmation`, { params });\n }\n allFromSociety(params: QueryGetAllFromSociety): Promise<IUser[]> {\n return this.axios.$get('user/all-from-society', { params });\n }\n allWithoutBp(params: QueryGetAllWithoutBp): Promise<IUser[]> {\n return this.axios.$get('user/all-without-bp', { params });\n }\n allCollaborators(params: QueryGetAllCollaborators): Promise<IUser[]> {\n return this.axios.$get('user/all-collaborators', { params });\n }\n allCollaboratorsByRoles(data: QueryGetAllCollaboratorsByRoles): Promise<CollaboratorsByRoles[]> {\n const { idTimeCounterType, idRoles } = data;\n let params = { idRoles };\n if (idTimeCounterType) {\n const timeCounterType = Object.values(TimeCounterType).find((tct) => tct.id === idTimeCounterType);\n const rolesByDefault = [\n Role.FRONT_OFFICE,\n Role.FRONT_OFFICE_EXPRESS,\n Role.SOCIAL,\n Role.JURIDIC,\n Role.HUMAN_RESSOURCES,\n Role.FACTURATION,\n Role.CUSTOMER_SUCCESS,\n Role.COMMERCIAL,\n Role.MANAGER,\n Role.EXPERT_ACCOUNTANT,\n Role.DEVELOPER,\n Role.TECHNICAL_ADVISOR,\n ];\n params = { idRoles: timeCounterType?.limitedRoles ?? rolesByDefault };\n }\n return this.axios.$get('user/all-collaborators-by-roles', { params });\n }\n getAllPaginated(params: QueryGetAllUsersPaginated, signal?: AbortSignal): Promise<BasePaginate<IUser>> {\n return this.axios.$get('/user/paginated', {\n ...(signal ? { signal } : {}),\n params,\n });\n }\n selectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates');\n }\n selectableTeammatesV2(): Promise<IUser[]> {\n return this.axios.$get('user/selectable-teammates/v2');\n }\n calendarSelectableTeammates(): Promise<IUser[]> {\n return this.axios.$get('user/calendar-selectable-teammates');\n }\n\n getAllSocieties(id: number, params: GetSocietyFromUser): Promise<ISociety[]> {\n return this.axios.$get(`/users/${id}/societies`, { params });\n }\n\n update(id: number, params: Partial<IUser> & { lastMobileConnection?: Date }): Promise<IUser> {\n return this.axios.$put(`user/${id}`, params);\n }\n getInfo(params?: QueryGet): Promise<IUser> {\n return this.axios.$get('user', { params });\n }\n delete(id: number): Promise<number> {\n return this.axios.$delete(`users/${id}`);\n }\n\n updatePassword(id: number, body: QueryUpdatePassword): Promise<Partial<IUser>> {\n return this.axios.$patch(`/users/${id}/password`, body);\n }\n\n getByRoles(params: { roles: Role[] }): Promise<IUser[]> {\n return this.axios.$get('users/roles', { params });\n }\n export(params: QueryUserExport): Promise<Buffer> {\n return this.axios.$get('users/export', {\n params,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {\n return this.axios.$post('users/prospect', body);\n }\n\n updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCoworkerWorkingSchedules(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<IWorkingSchedule[]> {\n return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);\n }\n\n createCollaboraterDetail(params: CreateCollaboraterDetail): Promise<ICollaboraterDetail> {\n return this.axios.$post('collaboraters-details', params);\n }\n\n getCollaboraterDetail(idUser: number): Promise<ICollaboraterDetail> {\n return this.axios.$get(`collaboraters-details/user/${idUser}`);\n }\n\n updateCollaboraterDetail(id: number, params: Partial<ICollaboraterDetail>): Promise<ICollaboraterDetail> {\n return this.axios.$put(`collaboraters-details/${id}`, params);\n }\n}\n"]}
|
|
@@ -10,7 +10,8 @@ export declare enum TypeUserHistory {
|
|
|
10
10
|
EQUIPMENT_BROKEN = 9,
|
|
11
11
|
EQUIPMENT_RETURN = 10,
|
|
12
12
|
EQUIPMENT_LOST = 11,
|
|
13
|
-
MAIL_SENT_TO_TS = 12
|
|
13
|
+
MAIL_SENT_TO_TS = 12,// Mail envoyé à TS
|
|
14
|
+
TEAM_MOUVEMENT = 13
|
|
14
15
|
}
|
|
15
16
|
export declare const TypeUserHistoryLabels: Record<TypeUserHistory, string>;
|
|
16
17
|
//# sourceMappingURL=UsersHistory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersHistory.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/UsersHistory.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IAEzB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,OAAO,IAAI;IAGX,WAAW,IAAI,CAAE,UAAU;IAC3B,WAAW,IAAI,CAAE,UAAU;IAG3B,eAAe,IAAI;IAGnB,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,gBAAgB,KAAK;IACrB,cAAc,KAAK;IAGnB,eAAe,KAAK;
|
|
1
|
+
{"version":3,"file":"UsersHistory.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/UsersHistory.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IAEzB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,OAAO,IAAI;IAGX,WAAW,IAAI,CAAE,UAAU;IAC3B,WAAW,IAAI,CAAE,UAAU;IAG3B,eAAe,IAAI;IAGnB,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,gBAAgB,KAAK;IACrB,cAAc,KAAK;IAGnB,eAAe,KAAK,CAAE,mBAAmB;IAGzC,cAAc,KAAK;CACpB;AAED,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAcjE,CAAC"}
|
|
@@ -17,6 +17,8 @@ export var TypeUserHistory;
|
|
|
17
17
|
TypeUserHistory[TypeUserHistory["EQUIPMENT_LOST"] = 11] = "EQUIPMENT_LOST";
|
|
18
18
|
// Communication
|
|
19
19
|
TypeUserHistory[TypeUserHistory["MAIL_SENT_TO_TS"] = 12] = "MAIL_SENT_TO_TS";
|
|
20
|
+
//Equipe
|
|
21
|
+
TypeUserHistory[TypeUserHistory["TEAM_MOUVEMENT"] = 13] = "TEAM_MOUVEMENT";
|
|
20
22
|
})(TypeUserHistory || (TypeUserHistory = {}));
|
|
21
23
|
export const TypeUserHistoryLabels = {
|
|
22
24
|
[TypeUserHistory.CREATE]: 'Création',
|
|
@@ -31,5 +33,6 @@ export const TypeUserHistoryLabels = {
|
|
|
31
33
|
[TypeUserHistory.EQUIPMENT_RETURN]: 'Retour Matériel',
|
|
32
34
|
[TypeUserHistory.EQUIPMENT_LOST]: 'Matériel Perdu',
|
|
33
35
|
[TypeUserHistory.MAIL_SENT_TO_TS]: 'Mail envoyé à TS',
|
|
36
|
+
[TypeUserHistory.TEAM_MOUVEMENT]: 'Changement d\'équipe',
|
|
34
37
|
};
|
|
35
38
|
//# sourceMappingURL=UsersHistory.js.map
|