- Oscar utilisera le(s) rôle(s) {{ configuration.pcru_partner_roles.join(", ") }} des oragnisations de la fiche activité pour extraire le(s) partenaire(s) (les codes SIRET/EN doivent être renseignés).
+ Oscar utilisera le(s) rôle(s) {{ configuration.pcru_partner_roles.join(", ") }} des organisations de la fiche activité pour extraire le(s) partenaire(s) (les codes SIRET/EN doivent être renseignés).
+
+
+
+
+
+
+
+ Partenaire principal
+
+
+
+
+
+
+
+
+
+ Oscar utilisera le(s) rôle(s) {{ configuration.pcru_partenaire_principal_roles.join(", ") }} des organisations de la fiche activité pour extraire le partenaire principal.
@@ -198,7 +220,7 @@
- Oscar utilisera le(s) rôle(s) {{ configuration.pcru_unit_roles.join(", ") }} des oragnisations de la fiche activité pour extraire le code URM.
+ Oscar utilisera le(s) rôle(s) {{ configuration.pcru_unit_roles.join(", ") }} des organisations de la fiche activité pour extraire le code URM.
@@ -269,6 +291,7 @@ export default {
formData.append('pass', this.configuration.pcru_pass);
formData.append('ssh', this.configuration.pcru_ssh);
formData.append('pcru_partner_roles', this.configuration.pcru_partner_roles);
+ formData.append('pcru_partenaire_principal_roles', this.configuration.pcru_partenaire_principal_roles);
formData.append('pcru_unit_roles', this.configuration.pcru_unit_roles);
formData.append('pcru_incharge_role', this.configuration.pcru_incharge_role);
formData.append('pcru_contract_type', this.configuration.pcru_contract_type);
diff --git a/module/Oscar/src/Oscar/Controller/AdministrationController.php b/module/Oscar/src/Oscar/Controller/AdministrationController.php
index 2e967aceb..3a909e753 100644
--- a/module/Oscar/src/Oscar/Controller/AdministrationController.php
+++ b/module/Oscar/src/Oscar/Controller/AdministrationController.php
@@ -1883,6 +1883,7 @@ class AdministrationController extends AbstractOscarController implements UsePro
// Conf
'pcru_incharge_role' => $this->getOscarConfigurationService()->getPcruInChargeRole(),
'pcru_partner_roles' => $this->getOscarConfigurationService()->getPcruPartnerRoles(),
+ 'pcru_partenaire_principal_roles' => $this->getOscarConfigurationService()->getPcruPartenairePrincipalRoles(),
'pcru_unit_roles' => $this->getOscarConfigurationService()->getPcruUnitRoles(),
'pcru_contract_type' => $this->getOscarConfigurationService()->getPcruContractType(),
@@ -1909,12 +1910,23 @@ class AdministrationController extends AbstractOscarController implements UsePro
];
$partnerRolesPosted = $this->params()->fromPost('pcru_partner_roles', []);
+ $partenairePrincipalRolesPosted = $this->params()->fromPost('pcru_partenaire_principal_roles', []);
$unitRolesPosted = $this->params()->fromPost('pcru_unit_roles', []);
$inchargeRolePosted = $this->params()->fromPost('pcru_incharge_role', '');
$contractType = $this->params()->fromPost('pcru_contract_type', '');
- $data['pcru_partner_roles'] = explode(',', $partnerRolesPosted);
- $data['pcru_unit_roles'] = explode(',', $unitRolesPosted);
+ $data['pcru_partner_roles'] = [];
+ if (mb_strlen(trim($partnerRolesPosted)) > 0) {
+ $data['pcru_partner_roles'] = explode(',', $partnerRolesPosted);
+ }
+ $data['pcru_partenaire_principal_roles'] = [];
+ if (mb_strlen(trim($partenairePrincipalRolesPosted)) > 0) {
+ $data['pcru_partenaire_principal_roles'] = explode(',', $partenairePrincipalRolesPosted);
+ }
+ $data['pcru_unit_roles'] = [];
+ if (mb_strlen(trim($unitRolesPosted)) > 0) {
+ $data['pcru_unit_roles'] = explode(',', $unitRolesPosted);
+ }
$data['pcru_incharge_role'] = $inchargeRolePosted;
$data['pcru_incharge_role'] = $inchargeRolePosted;
$data['pcru_contract_type'] = $contractType;
diff --git a/module/Oscar/src/Oscar/Service/OscarConfigurationService.php b/module/Oscar/src/Oscar/Service/OscarConfigurationService.php
index 71bdb2f08..4278c0ac2 100644
--- a/module/Oscar/src/Oscar/Service/OscarConfigurationService.php
+++ b/module/Oscar/src/Oscar/Service/OscarConfigurationService.php
@@ -653,6 +653,7 @@ class OscarConfigurationService implements ServiceLocatorAwareInterface
const PCRU_UNITE_ROLE_DEFAULT = 'Laboratoire';
const PCRU_PARTNER_ROLE_DEFAULT = 'Partenaire';
+ const PCRU_PARTENAIRE_PRINCIPAL_ROLE_DEFAULT = 'Partenaire';
const PCRU_INCHARGE_ROLE_DEFAULT = 'Responsable scientifique';
/**
@@ -677,6 +678,14 @@ class OscarConfigurationService implements ServiceLocatorAwareInterface
return $this->getEditableConfKey('pcru_partner_roles', [self::PCRU_PARTNER_ROLE_DEFAULT]);
}
+ /**
+ * @return string
+ */
+ public function getPcruPartenairePrincipalRoles(): array
+ {
+ return $this->getEditableConfKey('pcru_partenaire_principal_roles', [self::PCRU_PARTENAIRE_PRINCIPAL_ROLE_DEFAULT]);
+ }
+
/**
* @return string
*/
diff --git a/public/js/oscar/dist/AdministrationPcru.umd.js b/public/js/oscar/dist/AdministrationPcru.umd.js
index 643ee8b0f..8742c4b73 100644
--- a/public/js/oscar/dist/AdministrationPcru.umd.js
+++ b/public/js/oscar/dist/AdministrationPcru.umd.js
@@ -96,91 +96,6 @@ return /******/ (function(modules) { // webpackBootstrap
/************************************************************************/
/******/ ({
-/***/ "8875":
-/***/ (function(module, exports, __webpack_require__) {
-
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
-// MIT license
-// source: https://github.com/amiller-gh/currentScript-polyfill
-
-// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
-
-(function (root, factory) {
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}(typeof self !== 'undefined' ? self : this, function () {
- function getCurrentScript () {
- var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
- // for chrome
- if (!descriptor && 'currentScript' in document && document.currentScript) {
- return document.currentScript
- }
-
- // for other browsers with native support for currentScript
- if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
- return document.currentScript
- }
-
- // IE 8-10 support script readyState
- // IE 11+ & Firefox support stack trace
- try {
- throw new Error();
- }
- catch (err) {
- // Find the second match for the "at" string to get file src url from stack.
- var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
- ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
- stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
- scriptLocation = (stackDetails && stackDetails[1]) || false,
- line = (stackDetails && stackDetails[2]) || false,
- currentLocation = document.location.href.replace(document.location.hash, ''),
- pageSource,
- inlineScriptSourceRegExp,
- inlineScriptSource,
- scripts = document.getElementsByTagName('script'); // Live NodeList collection
-
- if (scriptLocation === currentLocation) {
- pageSource = document.documentElement.outerHTML;
- inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./PasswordField.vue?vue&type=template&id=2be9a996&\"\nimport script from \"./PasswordField.vue?vue&type=script&lang=js&\"\nexport * from \"./PasswordField.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n \n
\n\n
\n
\n \n {{ loading }}\n
\n
\n\n\n \n
\n \n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AdministrationPcru.vue?vue&type=template&id=417a28ea&\"\nimport script from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\nexport * from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack://AdministrationPcru/webpack/universalModuleDefinition","webpack://AdministrationPcru/webpack/bootstrap","webpack://AdministrationPcru/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://AdministrationPcru/./src/AdministrationPcru.vue?7375","webpack://AdministrationPcru/./src/components/PasswordField.vue?4534","webpack://AdministrationPcru/src/components/PasswordField.vue","webpack://AdministrationPcru/./src/components/PasswordField.vue?6b33","webpack://AdministrationPcru/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://AdministrationPcru/./src/components/PasswordField.vue","webpack://AdministrationPcru/src/AdministrationPcru.vue","webpack://AdministrationPcru/./src/AdministrationPcru.vue?0944","webpack://AdministrationPcru/./src/AdministrationPcru.vue","webpack://AdministrationPcru/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;;AAEA;AACA;AACA,MAAM,KAAuC,EAAE,yBAQ5C;;AAEH;AACA;AACA,IAAI,qBAAuB;AAC3B;AACA;;AAEA;AACe,sDAAI;;;ACrBnB,0BAA0B,aAAa,0BAA0B,wBAAwB,qBAAqB,aAAa,4CAA4C,gCAAgC,wBAAwB,0BAA0B,sBAAsB,YAAY,qCAAqC,mCAAmC,UAAU,wCAAwC,8DAA8D,OAAO,6BAA6B,YAAY,kBAAkB,YAAY,uBAAuB,qHAAqH,uBAAuB,YAAY,8BAA8B,cAAc,aAAa,8GAA8G,SAAS,4DAA4D,WAAW,wIAAwI,KAAK,0BAA0B,0FAA0F,uBAAuB,iCAAiC,iBAAiB,wEAAwE,KAAK,kGAAkG,KAAK,oDAAoD,cAAc,mCAAmC,sBAAsB,sBAAsB,8DAA8D,YAAY,kBAAkB,YAAY,uBAAuB,gCAAgC,kBAAkB,YAAY,qCAAqC,YAAY,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,wBAAwB,aAAa,wGAAwG,oCAAoC,wCAAwC,WAAW,sCAAsC,KAAK,yBAAyB,4BAA4B,QAAQ,EAAE,gEAAgE,oBAAoB,kBAAkB,YAAY,qCAAqC,YAAY,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,wBAAwB,aAAa,wGAAwG,oCAAoC,wCAAwC,WAAW,sCAAsC,KAAK,yBAAyB,4BAA4B,QAAQ,EAAE,gEAAgE,oBAAoB,kBAAkB,YAAY,qCAAqC,YAAY,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,wBAAwB,aAAa,wGAAwG,oCAAoC,wCAAwC,WAAW,sCAAsC,KAAK,yBAAyB,4BAA4B,QAAQ,EAAE,gEAAgE,oBAAoB,kBAAkB,YAAY,qCAAqC,uBAAuB,OAAO,wEAAwE,KAAK,0BAA0B,uCAAuC,kBAAkB,kBAAkB,YAAY,qCAAqC,YAAY,yBAAyB,cAAc,6BAA6B,aAAa,YAAY,mCAAmC,wBAAwB,aAAa,sGAAsG,oCAAoC,sCAAsC,WAAW,qCAAqC,KAAK,yBAAyB,4BAA4B,QAAQ,EAAE,+DAA+D,sBAAsB,uBAAuB,sBAAsB,kBAAkB,YAAY,sCAAsC,YAAY,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,yBAAyB,aAAa,0HAA0H,oCAAoC,kBAAkB,KAAK,0BAA0B,kFAAkF,kBAAkB,kBAAkB,6CAA6C,WAAW,EAAE,gHAAgH,0DAA0D,oBAAoB,mBAAmB,cAAc,6BAA6B,eAAe,+BAA+B,UAAU,gCAAgC,6NAA6N,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,yBAAyB,aAAa,0HAA0H,oCAAoC,kBAAkB,KAAK,0BAA0B,kFAAkF,kBAAkB,kBAAkB,6CAA6C,WAAW,EAAE,gHAAgH,0DAA0D,oBAAoB,mBAAmB,cAAc,6BAA6B,eAAe,+BAA+B,UAAU,gCAAgC,8QAA8Q,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,0EAA0E,iBAAiB,yBAAyB,cAAc,aAAa,0HAA0H,SAAS,sDAAsD,WAAW,uKAAuK,KAAK,0BAA0B,gGAAgG,uBAAuB,iCAAiC,iBAAiB,8EAA8E,KAAK,wGAAwG,KAAK,0DAA0D,cAAc,sCAAsC,sCAAsC,2BAA2B,cAAc,+BAA+B,UAAU,gCAAgC,oRAAoR,yBAAyB,YAAY,mCAAmC,2EAA2E,iBAAiB,yBAAyB,cAAc,aAAa,oJAAoJ,SAAS,mEAAmE,WAAW,8MAA8M,KAAK,0BAA0B,6GAA6G,uBAAuB,iCAAiC,iBAAiB,2FAA2F,KAAK,qHAAqH,KAAK,uEAAuE,cAAc,sCAAsC,mDAAmD,2BAA2B,cAAc,+BAA+B,UAAU,gCAAgC,wPAAwP,yBAAyB,cAAc,6BAA6B,cAAc,YAAY,mCAAmC,wEAAwE,iBAAiB,yBAAyB,cAAc,aAAa,oHAAoH,SAAS,mDAAmD,WAAW,8JAA8J,KAAK,0BAA0B,6FAA6F,uBAAuB,iCAAiC,iBAAiB,2EAA2E,KAAK,qGAAqG,KAAK,uDAAuD,cAAc,sCAAsC,mCAAmC,2BAA2B,gBAAgB,+BAA+B,UAAU,gCAAgC,2NAA2N,kCAAkC,eAAe,qCAAqC,gBAAgB,KAAK,yBAAyB,UAAU,0BAA0B;AACr/W,oCAAoC,aAAa,0BAA0B,wBAAwB,wBAAwB,0BAA0B,yBAAyB,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,+BAA+B,UAAU,gCAAgC,4EAA4E,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,gCAAgC,UAAU,sCAAsC,8CAA8C,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,gCAAgC,UAAU,oCAAoC,8CAA8C,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,gCAAgC,UAAU,kCAAkC,qDAAqD,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,gCAAgC,UAAU,kCAAkC,kDAAkD,cAAc,aAAa,0BAA0B,wBAAwB,wBAAwB,uBAAuB,uBAAuB,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,gCAAgC,UAAU,kCAAkC,wDAAwD,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,gCAAgC,UAAU,kCAAkC,sDAAsD,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,gCAAgC,UAAU,kCAAkC,2CAA2C,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,gCAAgC,UAAU,kCAAkC,kDAAkD,cAAc,aAAa,0BAA0B,wBAAwB,iBAAiB,gCAAgC,UAAU,kCAAkC,sCAAsC;;;;;;ACDx+E,IAAI,iDAAM,gBAAgB,aAAa,0BAA0B,wBAAwB,iBAAiB,yBAAyB,cAAc,6BAA6B,gBAAgB,+EAA+E,kDAAkD,YAAY,gCAAgC,UAAU,kCAAkC,0FAA0F,aAAa,oEAAoE,0CAA0C,0BAA0B,QAAQ,yEAAyE,WAAW,oBAAoB,KAAK,yBAAyB,4BAA4B,QAAQ,EAAE,gCAAgC,cAAc,aAAa,oEAAoE,0CAA0C,0BAA0B,QAAQ,6EAA6E,WAAW,oBAAoB,KAAK,yBAAyB,4BAA4B,QAAQ,EAAE,gCAAgC,YAAY,uCAAuC,yCAAyC,cAAc,wCAAwC,QAAQ,sDAAsD,KAAK,iCAAiC,+BAA+B,iCAAiC,UAAU,qCAAqC;AAC1jD,IAAI,0DAAe;;;;;;;;;;;;;;;;;;;;;;;;ACiBnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;;;AC5DsL,CAAgB,0HAAG,EAAC,C;;ACA1M;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;ACjG4F;AAC3B;AACL;;;AAG5D;AAC0F;AAC1F,gBAAgB,kBAAU;AAC1B,EAAE,gDAAM;AACR,EAAE,iDAAM;AACR,EAAE,0DAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,mE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC8Nf;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEuD;;AAEvD;AACA;;AAEe;;AAEf;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;;ACzUoL,CAAgB,6HAAG,EAAC,C;;ACAxG;AAC3B;AACL;;;AAGjE;AACuF;AACvF,IAAI,4BAAS,GAAG,kBAAU;AAC1B,EAAE,8CAAM;AACR,EAAE,MAAM;AACR,EAAE,eAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEe,mFAAS,Q;;AClBA;AACA;AACT,iGAAG;AACI","file":"AdministrationPcru.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AdministrationPcru\"] = factory();\n\telse\n\t\troot[\"AdministrationPcru\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fb15\");\n","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticStyle:{\"position\":\"relative\",\"min-height\":\"100px\"}},[(_vm.configuration)?_c('div',{staticClass:\"container\"},[(_vm.loading)?_c('div',{staticClass:\"overlay\"},[_c('div',{staticClass:\"overlay-content\",class:{ 'text-success bold': _vm.success}},[_c('i',{staticClass:\"animate-spin icon-spinner\"}),_vm._v(\" \"+_vm._s(_vm.loading)+\" \")])]):_vm._e(),_c('form',{attrs:{\"action\":\"\",\"method\":\"post\"}},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-3\"},[_vm._v(\" Module \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_enabled ? 'Actif' : 'Inactif'))])]),_c('div',{staticClass:\"col-md-9\"},[_c('div',{staticClass:\"material-switch\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_enabled),expression:\"configuration.pcru_enabled\"}],attrs:{\"id\":\"pcru_enabled\",\"name\":\"pcru_enabled\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.configuration.pcru_enabled)?_vm._i(_vm.configuration.pcru_enabled,null)>-1:(_vm.configuration.pcru_enabled)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_enabled,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_enabled\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_enabled\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_enabled\", $$c)}}}}),_c('label',{staticClass:\"label-primary\",attrs:{\"for\":\"pcru_enabled\"}})])])]),_c('section',{class:_vm.configuration.pcru_enabled ? 'enabled' : 'disabled'},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_vm._m(0),_vm._m(1),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"host\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(2),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_host),expression:\"configuration.pcru_host\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"host\",\"name\":\"host\"},domProps:{\"value\":(_vm.configuration.pcru_host)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.configuration, \"pcru_host\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"port\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(3),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_port),expression:\"configuration.pcru_port\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"port\",\"name\":\"port\"},domProps:{\"value\":(_vm.configuration.pcru_port)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.configuration, \"pcru_port\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(4),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_user),expression:\"configuration.pcru_user\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"user\",\"name\":\"user\"},domProps:{\"value\":(_vm.configuration.pcru_user)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.configuration, \"pcru_user\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('password-field',{attrs:{\"value\":_vm.configuration.pcru_pass,\"name\":'pass',\"text\":'Mot de passe'},on:{\"change\":function($event){_vm.configuration.pcru_pass = $event}}})],1)]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"ssh\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(5),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_ssh),expression:\"configuration.pcru_ssh\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"ssh\",\"name\":\"ssh\"},domProps:{\"value\":(_vm.configuration.pcru_ssh)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.configuration, \"pcru_ssh\", $event.target.value)}}})])])])])]),_c('div',{staticClass:\"col-md-6\"},[_vm._m(6),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-10 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(7),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_contract_type),expression:\"configuration.pcru_contract_type\"}],staticClass:\"form-control\",attrs:{\"name\":\"\",\"id\":\"\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(_vm.configuration, \"pcru_contract_type\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.configuration.contract_types),function(type){return _c('option',{key:type,domProps:{\"value\":type}},[_vm._v(_vm._s(type)+\" \")])}),0)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Le type de contrat \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_contract_type))]),_vm._v(\" sera utilisé par oscar pour selectionner le document à utiliser pour les données PCRU\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(8),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_incharge_role),expression:\"configuration.pcru_incharge_role\"}],staticClass:\"form-control\",attrs:{\"name\":\"\",\"id\":\"\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(_vm.configuration, \"pcru_incharge_role\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.configuration.incharge_roles),function(role){return _c('option',{key:role,domProps:{\"value\":role}},[_vm._v(_vm._s(role)+\" \")])}),0)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar selectionnera les personnes avec le rôle \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_incharge_role))]),_vm._v(\" de la fiche activité pour extraire le \"),_c('em',[_vm._v(\"Responsable scientifique côté PCRU\")]),_vm._v(\".\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(9),_vm._l((_vm.configuration.partner_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_partner_roles),expression:\"configuration.pcru_partner_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'partner_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_partner_roles)?_vm._i(_vm.configuration.pcru_partner_roles,role)>-1:(_vm.configuration.pcru_partner_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_partner_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'partner_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_partner_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le(s) partenaire(s) (les codes SIRET/EN doivent être renseignés).\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(10),_vm._l((_vm.configuration.partner_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_partenaire_principal_roles),expression:\"configuration.pcru_partenaire_principal_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'partenaire_principal_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_partenaire_principal_roles)?_vm._i(_vm.configuration.pcru_partenaire_principal_roles,role)>-1:(_vm.configuration.pcru_partenaire_principal_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_partenaire_principal_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'partenaire_principal_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_partenaire_principal_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le partenaire principal.\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(11),_vm._l((_vm.configuration.unit_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_unit_roles),expression:\"configuration.pcru_unit_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'unit_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_unit_roles)?_vm._i(_vm.configuration.pcru_unit_roles,role)>-1:(_vm.configuration.pcru_unit_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_unit_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'unit_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_unit_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le code URM.\")])])])])])]),_c('nav',{staticClass:\"buttons text-center\"},[_c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.performEdit}},[_c('i',{staticClass:\"icon-floppy\"}),_vm._v(\" Enregistrer \")])])])]):_vm._e()])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h2',[_c('i',{staticClass:\"icon-upload\"}),_vm._v(\" Accès FTP\")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Le transfert FTP n'est pas encore activé dans cette version \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-building\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Hôte\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-logout\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Port\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Identifiant\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-plug\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Clef SSH\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h2',[_c('i',{staticClass:\"icon-cog\"}),_vm._v(\" Options\")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Type pour le contrat signé\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Responsable scientifique\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Partenaire(s)\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Partenaire principal\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Unité(s)\")])])}]\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":_vm.name}},[_vm._v(\"Mot de passe \"+_vm._s(_vm.type)+\" / \"+_vm._s(_vm.value))]),_c('div',{staticClass:\"input-group input-lg password-field\"},[_c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-lock\"}),_vm._v(\" \"),_c('strong',[_vm._v(_vm._s(_vm.label))])]),(_vm.type == 'text')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.value),expression:\"value\"}],staticClass:\"form-control\",staticStyle:{\"font-family\":\"monospace\"},attrs:{\"name\":_vm.name,\"type\":\"text\",\"placeholder\":\"Mot de passe\",\"id\":_vm.name},domProps:{\"value\":(_vm.value)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.value=$event.target.value}}}):_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.value),expression:\"value\"}],staticClass:\"form-control\",staticStyle:{\"font-family\":\"monospace\"},attrs:{\"name\":_vm.name,\"type\":\"password\",\"placeholder\":\"Mot de passe\",\"id\":_vm.name},domProps:{\"value\":(_vm.value)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.value=$event.target.value}}}),_c('div',{staticClass:\"input-group-addon\",class:{'password-displayed': _vm.type == 'text'},staticStyle:{\"cursor\":\"pointer\",\"background\":\"white\"},attrs:{\"title\":\"Afficher le mot de passe pendant 5 secondes\"},on:{\"click\":_vm.handlerShowPassword}},[(_vm.type == 'text')?_c('i',{staticClass:\"glyphicon icon-eye\"}):_c('i',{staticClass:\"glyphicon icon-eye-off\"})])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n
\n\n \n
\n
\n {{ label }}\n
\n \n \n
\n \n \n
\n
\n
\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./PasswordField.vue?vue&type=template&id=2be9a996&\"\nimport script from \"./PasswordField.vue?vue&type=script&lang=js&\"\nexport * from \"./PasswordField.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n \n
\n\n
\n
\n \n {{ loading }}\n
\n
\n\n\n \n
\n \n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AdministrationPcru.vue?vue&type=template&id=6af8ccf8&\"\nimport script from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\nexport * from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/public/js/oscar/dist/AdministrationPcru.umd.min.js b/public/js/oscar/dist/AdministrationPcru.umd.min.js
index 1f2b71e83..d2765f9bc 100644
--- a/public/js/oscar/dist/AdministrationPcru.umd.min.js
+++ b/public/js/oscar/dist/AdministrationPcru.umd.min.js
@@ -1,2 +1,2 @@
-(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["AdministrationPcru"]=e():t["AdministrationPcru"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="fb15")}({8875:function(t,e,r){var n,i,s;(function(r,o){i=[],n=o,s="function"===typeof n?n.apply(e,i):n,void 0===s||(t.exports=s)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(f){var r,n,i,s=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,o=/@([^@]*):(\d+):(\d+)\s*$/gi,a=s.exec(f.stack)||o.exec(f.stack),c=a&&a[1]||!1,l=a&&a[2]||!1,u=document.location.href.replace(document.location.hash,""),p=document.getElementsByTagName("script");c===u&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./PasswordField.vue?vue&type=template&id=2be9a996&\"\nimport script from \"./PasswordField.vue?vue&type=script&lang=js&\"\nexport * from \"./PasswordField.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n \n
\n\n
\n
\n \n {{ loading }}\n
\n
\n\n\n \n
\n \n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AdministrationPcru.vue?vue&type=template&id=417a28ea&\"\nimport script from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\nexport * from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack://AdministrationPcru/webpack/universalModuleDefinition","webpack://AdministrationPcru/webpack/bootstrap","webpack://AdministrationPcru/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://AdministrationPcru/./src/AdministrationPcru.vue?7375","webpack://AdministrationPcru/./src/components/PasswordField.vue?4534","webpack://AdministrationPcru/src/components/PasswordField.vue","webpack://AdministrationPcru/./src/components/PasswordField.vue?6b33","webpack://AdministrationPcru/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://AdministrationPcru/./src/components/PasswordField.vue","webpack://AdministrationPcru/src/AdministrationPcru.vue","webpack://AdministrationPcru/./src/AdministrationPcru.vue?0944","webpack://AdministrationPcru/./src/AdministrationPcru.vue","webpack://AdministrationPcru/./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","currentScript","document","src","match","render","_vm","_h","$createElement","_c","_self","staticStyle","staticClass","class","success","_v","_s","loading","_e","attrs","configuration","pcru_enabled","directives","rawName","expression","domProps","Array","isArray","_i","on","$event","$$a","$$el","target","$$c","checked","$$v","$$i","$set","concat","slice","_m","composing","pcru_pass","$$selectedVal","filter","options","selected","map","val","_value","multiple","_l","type","pcru_contract_type","role","pcru_incharge_role","index","pcru_partner_roles","join","pcru_partenaire_principal_roles","pcru_unit_roles","performEdit","staticRenderFns","label","handlerShowPassword","normalizeComponent","scriptExports","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","component","components","PasswordField","props","url","required","formData","methods","FormData","append","pcru_host","pcru_port","pcru_user","pcru_ssh","$http","post","then","ok","fetch","data","configuration_pcru","handlerSuccess","foo","setInterval"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,IACQ,oBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,kBAAZC,QACdA,QAAQ,sBAAwBD,IAEhCD,EAAK,sBAAwBC,KAR/B,CASoB,qBAATK,KAAuBA,KAAOC,MAAO,WAChD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUR,QAGnC,IAAIC,EAASK,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQH,GAAUI,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASO,GAG/DN,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAO,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASf,EAASgB,EAAMC,GAC3CV,EAAoBW,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASvB,GACX,qBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOnB,EAAoBQ,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRvB,EAAoB2B,EAAI,SAASjC,GAChC,IAAIgB,EAAShB,GAAUA,EAAO4B,WAC7B,WAAwB,OAAO5B,EAAO,YACtC,WAA8B,OAAOA,GAEtC,OADAM,EAAoBQ,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRV,EAAoBW,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG7B,EAAoBgC,EAAI,GAIjBhC,EAAoBA,EAAoBiC,EAAI,Q,oCChFrD,G,OAAsB,qBAAXC,OAAwB,CACjC,IAAIC,EAAgBD,OAAOE,SAASD,cAWhCE,EAAMF,GAAiBA,EAAcE,IAAIC,MAAM,2BAC/CD,IACF,IAA0BA,EAAI,IAKnB,ICrBXE,EAAS,WAAa,IAAIC,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,UAAU,CAACE,YAAY,CAAC,SAAW,WAAW,aAAa,UAAU,CAAEL,EAAiB,cAAEG,EAAG,MAAM,CAACG,YAAY,aAAa,CAAEN,EAAW,QAAEG,EAAG,MAAM,CAACG,YAAY,WAAW,CAACH,EAAG,MAAM,CAACG,YAAY,kBAAkBC,MAAM,CAAE,oBAAqBP,EAAIQ,UAAU,CAACL,EAAG,IAAI,CAACG,YAAY,8BAA8BN,EAAIS,GAAG,IAAIT,EAAIU,GAAGV,EAAIW,SAAS,SAASX,EAAIY,KAAKT,EAAG,OAAO,CAACU,MAAM,CAAC,OAAS,GAAG,OAAS,SAAS,CAACV,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,YAAY,CAACN,EAAIS,GAAG,YAAYN,EAAG,SAAS,CAACH,EAAIS,GAAGT,EAAIU,GAAGV,EAAIc,cAAcC,aAAe,QAAU,gBAAgBZ,EAAG,MAAM,CAACG,YAAY,YAAY,CAACH,EAAG,MAAM,CAACG,YAAY,mBAAmB,CAACH,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAA0B,aAAEI,WAAW,+BAA+BL,MAAM,CAAC,GAAK,eAAe,KAAO,eAAe,KAAO,YAAYM,SAAS,CAAC,QAAUC,MAAMC,QAAQrB,EAAIc,cAAcC,cAAcf,EAAIsB,GAAGtB,EAAIc,cAAcC,aAAa,OAAO,EAAGf,EAAIc,cAA0B,cAAGS,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIC,EAAIzB,EAAIc,cAAcC,aAAaW,EAAKF,EAAOG,OAAOC,IAAIF,EAAKG,QAAuB,GAAGT,MAAMC,QAAQI,GAAK,CAAC,IAAIK,EAAI,KAAKC,EAAI/B,EAAIsB,GAAGG,EAAIK,GAAQJ,EAAKG,QAASE,EAAI,GAAI/B,EAAIgC,KAAKhC,EAAIc,cAAe,eAAgBW,EAAIQ,OAAO,CAACH,KAAaC,GAAK,GAAI/B,EAAIgC,KAAKhC,EAAIc,cAAe,eAAgBW,EAAIS,MAAM,EAAEH,GAAKE,OAAOR,EAAIS,MAAMH,EAAI,UAAY/B,EAAIgC,KAAKhC,EAAIc,cAAe,eAAgBc,OAAUzB,EAAG,QAAQ,CAACG,YAAY,gBAAgBO,MAAM,CAAC,IAAM,wBAAwBV,EAAG,UAAU,CAACI,MAAMP,EAAIc,cAAcC,aAAe,UAAY,YAAY,CAACZ,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,YAAY,CAACN,EAAImC,GAAG,GAAGnC,EAAImC,GAAG,GAAGhC,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAACH,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACN,EAAImC,GAAG,GAAGhC,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAAuB,UAAEI,WAAW,4BAA4BZ,YAAY,eAAeO,MAAM,CAAC,KAAO,OAAO,GAAK,OAAO,KAAO,QAAQM,SAAS,CAAC,MAASnB,EAAIc,cAAuB,WAAGS,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,WAAqBpC,EAAIgC,KAAKhC,EAAIc,cAAe,YAAaU,EAAOG,OAAOhD,mBAAmBwB,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAACH,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACN,EAAImC,GAAG,GAAGhC,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAAuB,UAAEI,WAAW,4BAA4BZ,YAAY,eAAeO,MAAM,CAAC,KAAO,OAAO,GAAK,OAAO,KAAO,QAAQM,SAAS,CAAC,MAASnB,EAAIc,cAAuB,WAAGS,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,WAAqBpC,EAAIgC,KAAKhC,EAAIc,cAAe,YAAaU,EAAOG,OAAOhD,mBAAmBwB,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAACH,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACN,EAAImC,GAAG,GAAGhC,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAAuB,UAAEI,WAAW,4BAA4BZ,YAAY,eAAeO,MAAM,CAAC,KAAO,OAAO,GAAK,OAAO,KAAO,QAAQM,SAAS,CAAC,MAASnB,EAAIc,cAAuB,WAAGS,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,WAAqBpC,EAAIgC,KAAKhC,EAAIc,cAAe,YAAaU,EAAOG,OAAOhD,mBAAmBwB,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAACH,EAAG,iBAAiB,CAACU,MAAM,CAAC,MAAQb,EAAIc,cAAcuB,UAAU,KAAO,OAAO,KAAO,gBAAgBd,GAAG,CAAC,OAAS,SAASC,GAAQxB,EAAIc,cAAcuB,UAAYb,OAAY,KAAKrB,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAACH,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,SAASV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACN,EAAImC,GAAG,GAAGhC,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAAsB,SAAEI,WAAW,2BAA2BZ,YAAY,eAAeO,MAAM,CAAC,KAAO,OAAO,GAAK,MAAM,KAAO,OAAOM,SAAS,CAAC,MAASnB,EAAIc,cAAsB,UAAGS,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,WAAqBpC,EAAIgC,KAAKhC,EAAIc,cAAe,WAAYU,EAAOG,OAAOhD,qBAAqBwB,EAAG,MAAM,CAACG,YAAY,YAAY,CAACN,EAAImC,GAAG,GAAGhC,EAAG,MAAM,CAACG,YAAY,OAAO,CAACH,EAAG,MAAM,CAACG,YAAY,2BAA2B,CAACH,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACN,EAAImC,GAAG,GAAGhC,EAAG,SAAS,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAAgC,mBAAEI,WAAW,qCAAqCZ,YAAY,eAAeO,MAAM,CAAC,KAAO,GAAG,GAAK,IAAIU,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIc,EAAgBlB,MAAM9B,UAAUiD,OAAO1E,KAAK2D,EAAOG,OAAOa,SAAQ,SAASrE,GAAG,OAAOA,EAAEsE,YAAWC,KAAI,SAASvE,GAAG,IAAIwE,EAAM,WAAYxE,EAAIA,EAAEyE,OAASzE,EAAEQ,MAAM,OAAOgE,KAAO3C,EAAIgC,KAAKhC,EAAIc,cAAe,qBAAsBU,EAAOG,OAAOkB,SAAWP,EAAgBA,EAAc,OAAOtC,EAAI8C,GAAI9C,EAAIc,cAA4B,gBAAE,SAASiC,GAAM,OAAO5C,EAAG,SAAS,CAAClB,IAAI8D,EAAK5B,SAAS,CAAC,MAAQ4B,IAAO,CAAC/C,EAAIS,GAAGT,EAAIU,GAAGqC,GAAM,UAAS,KAAK5C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBN,EAAIS,GAAG,wBAAwBN,EAAG,SAAS,CAACH,EAAIS,GAAGT,EAAIU,GAAGV,EAAIc,cAAckC,uBAAuBhD,EAAIS,GAAG,8FAA8FN,EAAG,MAAMA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACN,EAAImC,GAAG,GAAGhC,EAAG,SAAS,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAAgC,mBAAEI,WAAW,qCAAqCZ,YAAY,eAAeO,MAAM,CAAC,KAAO,GAAG,GAAK,IAAIU,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIc,EAAgBlB,MAAM9B,UAAUiD,OAAO1E,KAAK2D,EAAOG,OAAOa,SAAQ,SAASrE,GAAG,OAAOA,EAAEsE,YAAWC,KAAI,SAASvE,GAAG,IAAIwE,EAAM,WAAYxE,EAAIA,EAAEyE,OAASzE,EAAEQ,MAAM,OAAOgE,KAAO3C,EAAIgC,KAAKhC,EAAIc,cAAe,qBAAsBU,EAAOG,OAAOkB,SAAWP,EAAgBA,EAAc,OAAOtC,EAAI8C,GAAI9C,EAAIc,cAA4B,gBAAE,SAASmC,GAAM,OAAO9C,EAAG,SAAS,CAAClB,IAAIgE,EAAK9B,SAAS,CAAC,MAAQ8B,IAAO,CAACjD,EAAIS,GAAGT,EAAIU,GAAGuC,GAAM,UAAS,KAAK9C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBN,EAAIS,GAAG,oDAAoDN,EAAG,SAAS,CAACH,EAAIS,GAAGT,EAAIU,GAAGV,EAAIc,cAAcoC,uBAAuBlD,EAAIS,GAAG,2CAA2CN,EAAG,KAAK,CAACH,EAAIS,GAAG,wCAAwCT,EAAIS,GAAG,SAASN,EAAG,MAAMA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACN,EAAImC,GAAG,GAAGnC,EAAI8C,GAAI9C,EAAIc,cAA2B,eAAE,SAASmC,EAAKE,GAAO,OAAOhD,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAAgC,mBAAEI,WAAW,qCAAqCL,MAAM,CAAC,KAAO,WAAW,GAAK,uBAAyBsC,GAAOhC,SAAS,CAAC,MAAQ8B,EAAK,QAAU7B,MAAMC,QAAQrB,EAAIc,cAAcsC,oBAAoBpD,EAAIsB,GAAGtB,EAAIc,cAAcsC,mBAAmBH,IAAO,EAAGjD,EAAIc,cAAgC,oBAAGS,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIC,EAAIzB,EAAIc,cAAcsC,mBAAmB1B,EAAKF,EAAOG,OAAOC,IAAIF,EAAKG,QAAuB,GAAGT,MAAMC,QAAQI,GAAK,CAAC,IAAIK,EAAImB,EAAKlB,EAAI/B,EAAIsB,GAAGG,EAAIK,GAAQJ,EAAKG,QAASE,EAAI,GAAI/B,EAAIgC,KAAKhC,EAAIc,cAAe,qBAAsBW,EAAIQ,OAAO,CAACH,KAAaC,GAAK,GAAI/B,EAAIgC,KAAKhC,EAAIc,cAAe,qBAAsBW,EAAIS,MAAM,EAAEH,GAAKE,OAAOR,EAAIS,MAAMH,EAAI,UAAY/B,EAAIgC,KAAKhC,EAAIc,cAAe,qBAAsBc,OAAUzB,EAAG,QAAQ,CAACG,YAAY,mBAAmBO,MAAM,CAAC,IAAM,uBAAyBsC,IAAQ,CAACnD,EAAIS,GAAGT,EAAIU,GAAGuC,YAAc,GAAG9C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBN,EAAIS,GAAG,mCAAmCN,EAAG,SAAS,CAACH,EAAIS,GAAGT,EAAIU,GAAGV,EAAIc,cAAcsC,mBAAmBC,KAAK,UAAUrD,EAAIS,GAAG,+HAA+HN,EAAG,MAAMA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACN,EAAImC,GAAG,IAAInC,EAAI8C,GAAI9C,EAAIc,cAA2B,eAAE,SAASmC,EAAKE,GAAO,OAAOhD,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAA6C,gCAAEI,WAAW,kDAAkDL,MAAM,CAAC,KAAO,WAAW,GAAK,oCAAsCsC,GAAOhC,SAAS,CAAC,MAAQ8B,EAAK,QAAU7B,MAAMC,QAAQrB,EAAIc,cAAcwC,iCAAiCtD,EAAIsB,GAAGtB,EAAIc,cAAcwC,gCAAgCL,IAAO,EAAGjD,EAAIc,cAA6C,iCAAGS,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIC,EAAIzB,EAAIc,cAAcwC,gCAAgC5B,EAAKF,EAAOG,OAAOC,IAAIF,EAAKG,QAAuB,GAAGT,MAAMC,QAAQI,GAAK,CAAC,IAAIK,EAAImB,EAAKlB,EAAI/B,EAAIsB,GAAGG,EAAIK,GAAQJ,EAAKG,QAASE,EAAI,GAAI/B,EAAIgC,KAAKhC,EAAIc,cAAe,kCAAmCW,EAAIQ,OAAO,CAACH,KAAaC,GAAK,GAAI/B,EAAIgC,KAAKhC,EAAIc,cAAe,kCAAmCW,EAAIS,MAAM,EAAEH,GAAKE,OAAOR,EAAIS,MAAMH,EAAI,UAAY/B,EAAIgC,KAAKhC,EAAIc,cAAe,kCAAmCc,OAAUzB,EAAG,QAAQ,CAACG,YAAY,mBAAmBO,MAAM,CAAC,IAAM,oCAAsCsC,IAAQ,CAACnD,EAAIS,GAAGT,EAAIU,GAAGuC,YAAc,GAAG9C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBN,EAAIS,GAAG,mCAAmCN,EAAG,SAAS,CAACH,EAAIS,GAAGT,EAAIU,GAAGV,EAAIc,cAAcwC,gCAAgCD,KAAK,UAAUrD,EAAIS,GAAG,sFAAsFN,EAAG,MAAMA,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAM,UAAUV,EAAG,MAAM,CAACG,YAAY,wBAAwB,CAACN,EAAImC,GAAG,IAAInC,EAAI8C,GAAI9C,EAAIc,cAAwB,YAAE,SAASmC,EAAKE,GAAO,OAAOhD,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAIc,cAA6B,gBAAEI,WAAW,kCAAkCL,MAAM,CAAC,KAAO,WAAW,GAAK,oBAAsBsC,GAAOhC,SAAS,CAAC,MAAQ8B,EAAK,QAAU7B,MAAMC,QAAQrB,EAAIc,cAAcyC,iBAAiBvD,EAAIsB,GAAGtB,EAAIc,cAAcyC,gBAAgBN,IAAO,EAAGjD,EAAIc,cAA6B,iBAAGS,GAAG,CAAC,OAAS,SAASC,GAAQ,IAAIC,EAAIzB,EAAIc,cAAcyC,gBAAgB7B,EAAKF,EAAOG,OAAOC,IAAIF,EAAKG,QAAuB,GAAGT,MAAMC,QAAQI,GAAK,CAAC,IAAIK,EAAImB,EAAKlB,EAAI/B,EAAIsB,GAAGG,EAAIK,GAAQJ,EAAKG,QAASE,EAAI,GAAI/B,EAAIgC,KAAKhC,EAAIc,cAAe,kBAAmBW,EAAIQ,OAAO,CAACH,KAAaC,GAAK,GAAI/B,EAAIgC,KAAKhC,EAAIc,cAAe,kBAAmBW,EAAIS,MAAM,EAAEH,GAAKE,OAAOR,EAAIS,MAAMH,EAAI,UAAY/B,EAAIgC,KAAKhC,EAAIc,cAAe,kBAAmBc,OAAUzB,EAAG,QAAQ,CAACG,YAAY,mBAAmBO,MAAM,CAAC,IAAM,oBAAsBsC,IAAQ,CAACnD,EAAIS,GAAGT,EAAIU,GAAGuC,YAAc,KAAK9C,EAAG,IAAI,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBN,EAAIS,GAAG,mCAAmCN,EAAG,SAAS,CAACH,EAAIS,GAAGT,EAAIU,GAAGV,EAAIc,cAAcyC,gBAAgBF,KAAK,UAAUrD,EAAIS,GAAG,kFAAkFN,EAAG,MAAM,CAACG,YAAY,uBAAuB,CAACH,EAAG,SAAS,CAACG,YAAY,kBAAkBO,MAAM,CAAC,KAAO,UAAUU,GAAG,CAAC,MAAQvB,EAAIwD,cAAc,CAACrD,EAAG,IAAI,CAACG,YAAY,gBAAgBN,EAAIS,GAAG,yBAAyBT,EAAIY,QACvhX6C,EAAkB,CAAC,WAAa,IAAIzD,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,KAAK,CAACA,EAAG,IAAI,CAACG,YAAY,gBAAgBN,EAAIS,GAAG,iBAAiB,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,oBAAoB,CAACH,EAAG,IAAI,CAACG,YAAY,sBAAsBN,EAAIS,GAAG,oEAAoE,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,4BAA4BN,EAAIS,GAAG,KAAKN,EAAG,SAAS,CAACH,EAAIS,GAAG,aAAa,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,0BAA0BN,EAAIS,GAAG,KAAKN,EAAG,SAAS,CAACH,EAAIS,GAAG,aAAa,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBN,EAAIS,GAAG,KAAKN,EAAG,SAAS,CAACH,EAAIS,GAAG,oBAAoB,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBN,EAAIS,GAAG,KAAKN,EAAG,SAAS,CAACH,EAAIS,GAAG,iBAAiB,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,KAAK,CAACA,EAAG,IAAI,CAACG,YAAY,aAAaN,EAAIS,GAAG,eAAe,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACH,EAAIS,GAAG,mCAAmC,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACH,EAAIS,GAAG,iCAAiC,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACH,EAAIS,GAAG,sBAAsB,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACH,EAAIS,GAAG,6BAA6B,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBH,EAAG,SAAS,CAACH,EAAIS,GAAG,kBCDp9E,EAAS,WAAa,IAAIT,EAAI1C,KAAS2C,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACG,YAAY,cAAc,CAACH,EAAG,QAAQ,CAACG,YAAY,UAAUO,MAAM,CAAC,IAAMb,EAAI/B,OAAO,CAAC+B,EAAIS,GAAG,gBAAgBT,EAAIU,GAAGV,EAAI+C,MAAM,MAAM/C,EAAIU,GAAGV,EAAIrB,UAAUwB,EAAG,MAAM,CAACG,YAAY,uCAAuC,CAACH,EAAG,MAAM,CAACG,YAAY,qBAAqB,CAACH,EAAG,IAAI,CAACG,YAAY,wBAAwBN,EAAIS,GAAG,KAAKN,EAAG,SAAS,CAACH,EAAIS,GAAGT,EAAIU,GAAGV,EAAI0D,YAAyB,QAAZ1D,EAAI+C,KAAgB5C,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAS,MAAEkB,WAAW,UAAUZ,YAAY,eAAeD,YAAY,CAAC,cAAc,aAAaQ,MAAM,CAAC,KAAOb,EAAI/B,KAAK,KAAO,OAAO,YAAc,eAAe,GAAK+B,EAAI/B,MAAMkD,SAAS,CAAC,MAASnB,EAAS,OAAGuB,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,YAAqBpC,EAAIrB,MAAM6C,EAAOG,OAAOhD,WAAUwB,EAAG,QAAQ,CAACa,WAAW,CAAC,CAAC/C,KAAK,QAAQgD,QAAQ,UAAUtC,MAAOqB,EAAS,MAAEkB,WAAW,UAAUZ,YAAY,eAAeD,YAAY,CAAC,cAAc,aAAaQ,MAAM,CAAC,KAAOb,EAAI/B,KAAK,KAAO,WAAW,YAAc,eAAe,GAAK+B,EAAI/B,MAAMkD,SAAS,CAAC,MAASnB,EAAS,OAAGuB,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOG,OAAOS,YAAqBpC,EAAIrB,MAAM6C,EAAOG,OAAOhD,WAAUwB,EAAG,MAAM,CAACG,YAAY,oBAAoBC,MAAM,CAAC,qBAAkC,QAAZP,EAAI+C,MAAgB1C,YAAY,CAAC,OAAS,UAAU,WAAa,SAASQ,MAAM,CAAC,MAAQ,+CAA+CU,GAAG,CAAC,MAAQvB,EAAI2D,sBAAsB,CAAc,QAAZ3D,EAAI+C,KAAgB5C,EAAG,IAAI,CAACG,YAAY,uBAAuBH,EAAG,IAAI,CAACG,YAAY,kCAC7hD,EAAkB,GCiBtB,WACA,mBACA,SAEA,OACI,MAAJ,CACQ,KAAR,cACQ,MAAR,aACQ,MAAR,cAEI,OACI,MAAR,CACY,iBAAZ,EACY,KAAZ,IAGI,MAAJ,CACQ,MAAR,GACY,KAAZ,kBACY,KAAZ,mBAGI,QAAJ,CACQ,sBAER,UACgB,KAAhB,OACgB,EAAhB,gBACoB,WAApB,KACwB,KAAxB,OACwB,EAAxB,MACA,SAGgB,EAAhB,KACgB,KAAhB,WCrDsM,ICMvL,SAASsD,EACtBC,EACA9D,EACA0D,EACAK,EACAC,EACAC,EACAC,EACAC,GAGA,IAqBIC,EArBA3B,EAAmC,oBAAlBqB,EACjBA,EAAcrB,QACdqB,EAsDJ,GAnDI9D,IACFyC,EAAQzC,OAASA,EACjByC,EAAQiB,gBAAkBA,EAC1BjB,EAAQ4B,WAAY,GAIlBN,IACFtB,EAAQ6B,YAAa,GAInBL,IACFxB,EAAQ8B,SAAW,UAAYN,GAI7BC,GACFE,EAAO,SAAUI,GAEfA,EACEA,GACCjH,KAAKkH,QAAUlH,KAAKkH,OAAOC,YAC3BnH,KAAKoH,QAAUpH,KAAKoH,OAAOF,QAAUlH,KAAKoH,OAAOF,OAAOC,WAEtDF,GAA0C,qBAAxBI,sBACrBJ,EAAUI,qBAGRZ,GACFA,EAAalG,KAAKP,KAAMiH,GAGtBA,GAAWA,EAAQK,uBACrBL,EAAQK,sBAAsBC,IAAIZ,IAKtCzB,EAAQsC,aAAeX,GACdJ,IACTI,EAAOD,EACH,WACAH,EAAalG,KACXP,MACCkF,EAAQ6B,WAAa/G,KAAKoH,OAASpH,MAAMyH,MAAMC,SAASC,aAG3DlB,GAGFI,EACF,GAAI3B,EAAQ6B,WAAY,CAGtB7B,EAAQ0C,cAAgBf,EAExB,IAAIgB,EAAiB3C,EAAQzC,OAC7ByC,EAAQzC,OAAS,SAAmCqF,EAAGb,GAErD,OADAJ,EAAKtG,KAAK0G,GACHY,EAAeC,EAAGb,QAEtB,CAEL,IAAIc,EAAW7C,EAAQ8C,aACvB9C,EAAQ8C,aAAeD,EACnB,GAAGpD,OAAOoD,EAAUlB,GACpB,CAACA,GAIT,MAAO,CACLlH,QAAS4G,EACTrB,QAASA,GCxFb,IAAI+C,EAAY,EACd,EACA,EACA,GACA,EACA,KACA,KACA,MAIa,EAAAA,E,QCiPA,OAEbC,WAAY,CACV,iBAAkBC,GAGpBC,MAAO,CACLC,IAAK,CAACC,UAAU,IAGlB,OACE,MAAO,CACLC,SAAU,KACV/E,cAAe,KACfH,QAAS,KACTH,SAAS,IAIbsF,QAAS,CAGP,cAEExI,KAAKqD,QAAU,qCAEf,IAAIkF,EAAW,IAAIE,SACnBF,EAASG,OAAO,eAAgB1I,KAAKwD,cAAcC,cACnD8E,EAASG,OAAO,OAAQ1I,KAAKwD,cAAcmF,WAC3CJ,EAASG,OAAO,OAAQ1I,KAAKwD,cAAcoF,WAC3CL,EAASG,OAAO,OAAQ1I,KAAKwD,cAAcqF,WAC3CN,EAASG,OAAO,OAAQ1I,KAAKwD,cAAcuB,WAC3CwD,EAASG,OAAO,MAAO1I,KAAKwD,cAAcsF,UAC1CP,EAASG,OAAO,qBAAsB1I,KAAKwD,cAAcsC,oBACzDyC,EAASG,OAAO,kCAAmC1I,KAAKwD,cAAcwC,iCACtEuC,EAASG,OAAO,kBAAmB1I,KAAKwD,cAAcyC,iBACtDsC,EAASG,OAAO,qBAAsB1I,KAAKwD,cAAcoC,oBACzD2C,EAASG,OAAO,qBAAsB1I,KAAKwD,cAAckC,oBAEzD1F,KAAK+I,MAAMC,KAAKhJ,KAAKqI,IAAKE,GAAUU,KAAKC,IACvClJ,KAAKmJ,WAIT,eAAejG,GACb,IAAIkG,EAAOlG,EAAQkG,KACnBpJ,KAAKwD,cAAgB4F,EAAKC,oBAG5B,QACErJ,KAAKkD,QAAU,GACflD,KAAKqD,QAAU,iCACfrD,KAAK+I,MAAM9H,IAAIjB,KAAKqI,KAAKY,KACrBC,IACElJ,KAAKsJ,eAAeJ,KAExBD,KAAKM,IACLvJ,KAAKkD,SAAU,EACflD,KAAKqD,QAAU,qBACfmG,YAAY,WACVxJ,KAAKqD,QAAU,IACfzB,KAAK5B,MAAO,SAKpB,UACEA,KAAKmJ,UCtU4L,ICOjM,EAAY,EACd,EACA1G,EACA0D,GACA,EACA,KACA,KACA,MAIa,I,QChBA,kB","file":"AdministrationPcru.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AdministrationPcru\"] = factory();\n\telse\n\t\troot[\"AdministrationPcru\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fb15\");\n","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticStyle:{\"position\":\"relative\",\"min-height\":\"100px\"}},[(_vm.configuration)?_c('div',{staticClass:\"container\"},[(_vm.loading)?_c('div',{staticClass:\"overlay\"},[_c('div',{staticClass:\"overlay-content\",class:{ 'text-success bold': _vm.success}},[_c('i',{staticClass:\"animate-spin icon-spinner\"}),_vm._v(\" \"+_vm._s(_vm.loading)+\" \")])]):_vm._e(),_c('form',{attrs:{\"action\":\"\",\"method\":\"post\"}},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-3\"},[_vm._v(\" Module \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_enabled ? 'Actif' : 'Inactif'))])]),_c('div',{staticClass:\"col-md-9\"},[_c('div',{staticClass:\"material-switch\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_enabled),expression:\"configuration.pcru_enabled\"}],attrs:{\"id\":\"pcru_enabled\",\"name\":\"pcru_enabled\",\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.configuration.pcru_enabled)?_vm._i(_vm.configuration.pcru_enabled,null)>-1:(_vm.configuration.pcru_enabled)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_enabled,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_enabled\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_enabled\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_enabled\", $$c)}}}}),_c('label',{staticClass:\"label-primary\",attrs:{\"for\":\"pcru_enabled\"}})])])]),_c('section',{class:_vm.configuration.pcru_enabled ? 'enabled' : 'disabled'},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-6\"},[_vm._m(0),_vm._m(1),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"host\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(2),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_host),expression:\"configuration.pcru_host\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"host\",\"name\":\"host\"},domProps:{\"value\":(_vm.configuration.pcru_host)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.configuration, \"pcru_host\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"port\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(3),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_port),expression:\"configuration.pcru_port\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"port\",\"name\":\"port\"},domProps:{\"value\":(_vm.configuration.pcru_port)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.configuration, \"pcru_port\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(4),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_user),expression:\"configuration.pcru_user\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"user\",\"name\":\"user\"},domProps:{\"value\":(_vm.configuration.pcru_user)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.configuration, \"pcru_user\", $event.target.value)}}})])])])]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('password-field',{attrs:{\"value\":_vm.configuration.pcru_pass,\"name\":'pass',\"text\":'Mot de passe'},on:{\"change\":function($event){_vm.configuration.pcru_pass = $event}}})],1)]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-8 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"ssh\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(5),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_ssh),expression:\"configuration.pcru_ssh\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"id\":\"ssh\",\"name\":\"ssh\"},domProps:{\"value\":(_vm.configuration.pcru_ssh)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.configuration, \"pcru_ssh\", $event.target.value)}}})])])])])]),_c('div',{staticClass:\"col-md-6\"},[_vm._m(6),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-10 col-md-push-1\"},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(7),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_contract_type),expression:\"configuration.pcru_contract_type\"}],staticClass:\"form-control\",attrs:{\"name\":\"\",\"id\":\"\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(_vm.configuration, \"pcru_contract_type\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.configuration.contract_types),function(type){return _c('option',{key:type,domProps:{\"value\":type}},[_vm._v(_vm._s(type)+\" \")])}),0)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Le type de contrat \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_contract_type))]),_vm._v(\" sera utilisé par oscar pour selectionner le document à utiliser pour les données PCRU\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(8),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_incharge_role),expression:\"configuration.pcru_incharge_role\"}],staticClass:\"form-control\",attrs:{\"name\":\"\",\"id\":\"\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(_vm.configuration, \"pcru_incharge_role\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])}}},_vm._l((_vm.configuration.incharge_roles),function(role){return _c('option',{key:role,domProps:{\"value\":role}},[_vm._v(_vm._s(role)+\" \")])}),0)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar selectionnera les personnes avec le rôle \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_incharge_role))]),_vm._v(\" de la fiche activité pour extraire le \"),_c('em',[_vm._v(\"Responsable scientifique côté PCRU\")]),_vm._v(\".\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(9),_vm._l((_vm.configuration.partner_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_partner_roles),expression:\"configuration.pcru_partner_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'partner_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_partner_roles)?_vm._i(_vm.configuration.pcru_partner_roles,role)>-1:(_vm.configuration.pcru_partner_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_partner_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_partner_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'partner_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_partner_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le(s) partenaire(s) (les codes SIRET/EN doivent être renseignés).\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(10),_vm._l((_vm.configuration.partner_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_partenaire_principal_roles),expression:\"configuration.pcru_partenaire_principal_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'partenaire_principal_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_partenaire_principal_roles)?_vm._i(_vm.configuration.pcru_partenaire_principal_roles,role)>-1:(_vm.configuration.pcru_partenaire_principal_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_partenaire_principal_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_partenaire_principal_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'partenaire_principal_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_partenaire_principal_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le partenaire principal.\")])]),_c('hr'),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":\"user\"}}),_c('div',{staticClass:\"input-group input-lg\"},[_vm._m(11),_vm._l((_vm.configuration.unit_roles),function(role,index){return _c('div',{staticClass:\"form-check\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.configuration.pcru_unit_roles),expression:\"configuration.pcru_unit_roles\"}],attrs:{\"type\":\"checkbox\",\"id\":'unit_role_option_' + index},domProps:{\"value\":role,\"checked\":Array.isArray(_vm.configuration.pcru_unit_roles)?_vm._i(_vm.configuration.pcru_unit_roles,role)>-1:(_vm.configuration.pcru_unit_roles)},on:{\"change\":function($event){var $$a=_vm.configuration.pcru_unit_roles,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=role,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.configuration, \"pcru_unit_roles\", $$c)}}}}),_c('label',{staticClass:\"form-check-label\",attrs:{\"for\":'unit_role_option_' + index}},[_vm._v(_vm._s(role))])])})],2)]),_c('p',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Oscar utilisera le(s) rôle(s) \"),_c('strong',[_vm._v(_vm._s(_vm.configuration.pcru_unit_roles.join(\", \")))]),_vm._v(\" des organisations de la fiche activité pour extraire le code URM.\")])])])])])]),_c('nav',{staticClass:\"buttons text-center\"},[_c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.performEdit}},[_c('i',{staticClass:\"icon-floppy\"}),_vm._v(\" Enregistrer \")])])])]):_vm._e()])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h2',[_c('i',{staticClass:\"icon-upload\"}),_vm._v(\" Accès FTP\")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"alert alert-info\"},[_c('i',{staticClass:\"icon-info-circled\"}),_vm._v(\" Le transfert FTP n'est pas encore activé dans cette version \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-building\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Hôte\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-logout\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Port\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Identifiant\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-plug\"}),_vm._v(\" \"),_c('strong',[_vm._v(\"Clef SSH\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('h2',[_c('i',{staticClass:\"icon-cog\"}),_vm._v(\" Options\")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Type pour le contrat signé\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Responsable scientifique\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Partenaire(s)\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Partenaire principal\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-user\"}),_c('strong',[_vm._v(\"Unité(s)\")])])}]\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"sr-only\",attrs:{\"for\":_vm.name}},[_vm._v(\"Mot de passe \"+_vm._s(_vm.type)+\" / \"+_vm._s(_vm.value))]),_c('div',{staticClass:\"input-group input-lg password-field\"},[_c('div',{staticClass:\"input-group-addon\"},[_c('i',{staticClass:\"glyphicon icon-lock\"}),_vm._v(\" \"),_c('strong',[_vm._v(_vm._s(_vm.label))])]),(_vm.type == 'text')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.value),expression:\"value\"}],staticClass:\"form-control\",staticStyle:{\"font-family\":\"monospace\"},attrs:{\"name\":_vm.name,\"type\":\"text\",\"placeholder\":\"Mot de passe\",\"id\":_vm.name},domProps:{\"value\":(_vm.value)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.value=$event.target.value}}}):_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.value),expression:\"value\"}],staticClass:\"form-control\",staticStyle:{\"font-family\":\"monospace\"},attrs:{\"name\":_vm.name,\"type\":\"password\",\"placeholder\":\"Mot de passe\",\"id\":_vm.name},domProps:{\"value\":(_vm.value)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.value=$event.target.value}}}),_c('div',{staticClass:\"input-group-addon\",class:{'password-displayed': _vm.type == 'text'},staticStyle:{\"cursor\":\"pointer\",\"background\":\"white\"},attrs:{\"title\":\"Afficher le mot de passe pendant 5 secondes\"},on:{\"click\":_vm.handlerShowPassword}},[(_vm.type == 'text')?_c('i',{staticClass:\"glyphicon icon-eye\"}):_c('i',{staticClass:\"glyphicon icon-eye-off\"})])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n
\n\n \n
\n
\n {{ label }}\n
\n \n \n
\n \n \n
\n
\n
\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PasswordField.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./PasswordField.vue?vue&type=template&id=2be9a996&\"\nimport script from \"./PasswordField.vue?vue&type=script&lang=js&\"\nexport * from \"./PasswordField.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n \n
\n\n
\n
\n \n {{ loading }}\n
\n
\n\n\n \n
\n \n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--1-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdministrationPcru.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AdministrationPcru.vue?vue&type=template&id=6af8ccf8&\"\nimport script from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\nexport * from \"./AdministrationPcru.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n"],"sourceRoot":""}
\ No newline at end of file
--
GitLab
From 4f6943208c29903ec36233d303f1aab4d923ca5c Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Oellers
Date: Wed, 26 Mar 2025 11:35:05 +0100
Subject: [PATCH 02/32] Ajout configuration globale PCRU
---
config/autoload/global.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/config/autoload/global.php b/config/autoload/global.php
index c115568b2..fbdcf0db3 100755
--- a/config/autoload/global.php
+++ b/config/autoload/global.php
@@ -107,6 +107,7 @@ return array(
'contracttype' => __DIR__ .'/../../install/pcru-contracts-types.json',
// Paramètres de la POOL d'envoi PCRU
+ 'repertoire_sftp' => '/Echanges', // Chemin absolu du dossier du serveur SFTP PCRU distant dans lequel les fichiers seront déposés
'files_path' => __DIR__.'/../../tmp', // Dossier où seront gérés les fichiers à envoyer
'filename_contrats' => 'SitePMA_UniCaen.csv', // Nom du fichier CSV (contrats)
'filename_partenaires' => 'SitePMA_UniCaen.PARTENAIRES.csv', // Nom du fichier (Partenaires)
@@ -118,6 +119,8 @@ return array(
'pool_log' => 'pcru.log', // Nom du fichier de log
'pool_lock' => 'PCRU.LOCK', // Nom du fichier de verrouillage
'filename_errors' => 'DEPOT-CSV.ERRORS.json', // Nom du fichier d'erreur PCRU
+ 'filename_retour_pcru_ok' => 'RETOUR-PCRU.OK', // Nom du fichier (Marqueur de retour OK de la part de PCRU)
+ 'filename_retour_pcru_ok_csv' => 'RETOUR-PCRU.csv', // Nom du fichier (Marqueur de retour PCRU contenant la liste les contrats dont il manque le fichier pdf)
],
'htmltopdfrenderer' => [
--
GitLab
From e0108fa3fd0c4951a23b453e6392144e4be0932b Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Oellers
Date: Wed, 26 Mar 2025 17:45:37 +0100
Subject: [PATCH 03/32] Ajout PCRU
---
module/Oscar/config/module.config.php | 9 +
module/Oscar/config/routes.yml | 31 +
.../Command/OscarPcruProcessFtpCommand.php | 55 +
.../src/Oscar/Controller/PcruController.php | 385 ++++
.../Controller/PcruControllerFactory.php | 26 +
module/Oscar/src/Oscar/Entity/Activity.php | 23 +
.../Oscar/Entity/ActivityPcruInformations.php | 1617 ++++++++++++++
.../ActivityPcruInformationsRepository.php | 9 +
module/Oscar/src/Oscar/Entity/PcruFtpLog.php | 123 ++
.../src/Oscar/Entity/PcruFtpLogRepository.php | 9 +
.../Oscar/Exception/OscarPCRUException.php | 2 +-
.../src/Oscar/Service/PcruFtpService.php | 866 ++++++++
.../Oscar/Service/PcruFtpServiceFactory.php | 20 +
.../src/Oscar/Service/PcruInformation.php | 177 ++
.../Oscar/Service/PcruInformationComplete.php | 94 +
.../Service/PcruInformationParDefaut.php | 252 +++
.../Oscar/Service/PcruInformationsService.php | 816 +++++++
.../PcruInformationsServiceFactory.php | 18 +
.../Oscar/Service/ProjectGrantApiService.php | 31 +-
.../src/Oscar/Traits/UsePcruFtpService.php | 17 +
.../Oscar/Traits/UsePcruFtpServiceTrait.php | 29 +
.../Traits/UsePcruInformationsService.php | 17 +
.../UsePcruInformationsServiceTrait.php | 29 +
.../view/oscar/pcru/pcru-informations.phtml | 7 +
.../view/oscar/pcru/pcru-transmissions.phtml | 6 +
.../view/partials/menu-administration.phtml | 2 +-
ui/src/ActivityPcruInformations.js | 15 +
ui/src/PcruTransmissions.js | 14 +
ui/src/views/ActivityPcruInformations.vue | 1886 +++++++++++++++++
ui/src/views/PcruTransmissions.vue | 209 ++
ui/vite.config.js | 2 +
31 files changed, 6792 insertions(+), 4 deletions(-)
create mode 100644 module/Oscar/src/Oscar/Command/OscarPcruProcessFtpCommand.php
create mode 100644 module/Oscar/src/Oscar/Controller/PcruController.php
create mode 100644 module/Oscar/src/Oscar/Controller/PcruControllerFactory.php
create mode 100644 module/Oscar/src/Oscar/Entity/ActivityPcruInformations.php
create mode 100644 module/Oscar/src/Oscar/Entity/ActivityPcruInformationsRepository.php
create mode 100644 module/Oscar/src/Oscar/Entity/PcruFtpLog.php
create mode 100644 module/Oscar/src/Oscar/Entity/PcruFtpLogRepository.php
create mode 100644 module/Oscar/src/Oscar/Service/PcruFtpService.php
create mode 100644 module/Oscar/src/Oscar/Service/PcruFtpServiceFactory.php
create mode 100644 module/Oscar/src/Oscar/Service/PcruInformation.php
create mode 100644 module/Oscar/src/Oscar/Service/PcruInformationComplete.php
create mode 100644 module/Oscar/src/Oscar/Service/PcruInformationParDefaut.php
create mode 100644 module/Oscar/src/Oscar/Service/PcruInformationsService.php
create mode 100644 module/Oscar/src/Oscar/Service/PcruInformationsServiceFactory.php
create mode 100644 module/Oscar/src/Oscar/Traits/UsePcruFtpService.php
create mode 100644 module/Oscar/src/Oscar/Traits/UsePcruFtpServiceTrait.php
create mode 100644 module/Oscar/src/Oscar/Traits/UsePcruInformationsService.php
create mode 100644 module/Oscar/src/Oscar/Traits/UsePcruInformationsServiceTrait.php
create mode 100644 module/Oscar/view/oscar/pcru/pcru-informations.phtml
create mode 100644 module/Oscar/view/oscar/pcru/pcru-transmissions.phtml
create mode 100644 ui/src/ActivityPcruInformations.js
create mode 100644 ui/src/PcruTransmissions.js
create mode 100644 ui/src/views/ActivityPcruInformations.vue
create mode 100644 ui/src/views/PcruTransmissions.vue
diff --git a/module/Oscar/config/module.config.php b/module/Oscar/config/module.config.php
index fd6074a02..9cd6e7401 100755
--- a/module/Oscar/config/module.config.php
+++ b/module/Oscar/config/module.config.php
@@ -371,6 +371,12 @@ return array(
'roles' => ['user'],
],
+ [
+ 'controller' => 'Pcru',
+ 'action' => ['api', 'pcruInformations', 'pcruTransmissions'],
+ 'roles' => ['user'],
+ ],
+
////////////////////////////////////////////////////////////////
// PERSON
///////////////////////////////////////////////////////////////
@@ -596,6 +602,8 @@ return array(
\Oscar\Service\OrganizationService::class => \Oscar\Service\OrganizationServiceFactory::class,
\Oscar\Service\OscarConfigurationService::class => \Oscar\Service\OscarConfigurationServiceFactory::class,
\Oscar\Service\OscarUserContext::class => \Oscar\Service\OscarUserContextFactory::class,
+ \Oscar\Service\PcruFtpService::class => \Oscar\Service\PcruFtpServiceFactory::class,
+ \Oscar\Service\PcruInformationsService::class => \Oscar\Service\PcruInformationsServiceFactory::class,
\Oscar\Service\PCRUService::class => \Oscar\Service\PCRUServiceFactory::class,
\Oscar\Service\PersonService::class => \Oscar\Service\PersonServiceFactory::class,
\Oscar\Service\ProjectService::class => \Oscar\Service\ProjectServiceFactory::class,
@@ -644,6 +652,7 @@ return array(
'TabDocument' => \Oscar\Controller\TabDocumentControllerFactory::class,
'Notification' => \Oscar\Controller\NotificationControllerFactory::class,
'Organization' => \Oscar\Controller\OrganizationControllerFactory::class,
+ 'Pcru' => \Oscar\Controller\PcruControllerFactory::class,
'Project' => \Oscar\Controller\ProjectControllerFactory::class,
'Public' => \Oscar\Controller\PublicControllerFactory::class,
'Timesheet' => \Oscar\Controller\TimesheetControllerFactory::class,
diff --git a/module/Oscar/config/routes.yml b/module/Oscar/config/routes.yml
index 95b396c26..2ae5dc660 100644
--- a/module/Oscar/config/routes.yml
+++ b/module/Oscar/config/routes.yml
@@ -1006,6 +1006,14 @@ contract:
defaults:
action: pcruList
+ pcru-transmissions:
+ type: segment
+ options:
+ route: /transmissions-pcru
+ defaults:
+ controller: Pcru
+ action: pcruTransmissions
+
gant:
type: segment
options:
@@ -1042,6 +1050,14 @@ contract:
defaults:
action: pcruInfos
+ pcru-informations:
+ type: segment
+ options:
+ route: /pcru-informations/:id
+ defaults:
+ controller: Pcru
+ action: pcruInformations
+
estimated-spent:
type: segment
options:
@@ -2214,3 +2230,18 @@ activity-mots-cles:
route: /api
defaults:
action: api
+
+pcru:
+ type: literal
+ options:
+ route: /pcru
+ defaults:
+ controller: Pcru
+ may_terminate: false
+ child_routes:
+ api:
+ type: segment
+ options:
+ route: /api
+ defaults:
+ action: api
diff --git a/module/Oscar/src/Oscar/Command/OscarPcruProcessFtpCommand.php b/module/Oscar/src/Oscar/Command/OscarPcruProcessFtpCommand.php
new file mode 100644
index 000000000..a92cba18b
--- /dev/null
+++ b/module/Oscar/src/Oscar/Command/OscarPcruProcessFtpCommand.php
@@ -0,0 +1,55 @@
+setDescription("Délencher un échange FTP avec PCRU.");
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $this->addOutputStyle($output);
+
+ /** @var OscarConfigurationService $configuration */
+ $configuration = $this->getServicemanager()->get(OscarConfigurationService::class);
+
+ /** @var PcruFtpService $pcruFtpService */
+ $pcruFtpService = $this->getServicemanager()->get(PcruFtpService::class);
+
+ /** @var SymfonyStyle $io */
+ $io = new SymfonyStyle($input, $output);
+
+ if( !$configuration->getPcruEnabled() ){
+ $io->error("Le module PCRU n'est pas actif");
+ return self::FAILURE;
+ } else {
+ $logs = [];
+ try {
+ $logs = $pcruFtpService->processPcruFtp();
+ } catch (OscarPCRUException $e) {
+ $logs = $e->details;
+ }
+ foreach ($logs as $log) {
+ $io->writeln($log);
+ }
+ }
+
+ return self::SUCCESS;
+ }
+}
\ No newline at end of file
diff --git a/module/Oscar/src/Oscar/Controller/PcruController.php b/module/Oscar/src/Oscar/Controller/PcruController.php
new file mode 100644
index 000000000..23d84925f
--- /dev/null
+++ b/module/Oscar/src/Oscar/Controller/PcruController.php
@@ -0,0 +1,385 @@
+pcruFtpService;
+ }
+
+ /**
+ * @param PcruFtpService $pcruFtpService
+ */
+ public function setPcruFtpService(PcruFtpService $pcruFtpService): void
+ {
+ $this->pcruFtpService = $pcruFtpService;
+ }
+
+ /** @var PcruInformationsService */
+ private $pcruInformationsService;
+
+ /**
+ * @return PcruInformationsService
+ */
+ public function getPcruInformationsService(): PcruInformationsService
+ {
+ return $this->pcruInformationsService;
+ }
+
+ /**
+ * @param PcruInformationsService $pcruInformationsService
+ */
+ public function setPcruInformationsService(PcruInformationsService $pcruInformationsService): void
+ {
+ $this->pcruInformationsService = $pcruInformationsService;
+ }
+
+ /**
+ * @return OscarConfigurationService
+ */
+ public function getOscarConfigurationService(): OscarConfigurationService
+ {
+ return $this->oscarConfigurationService;
+ }
+
+ /**
+ * @param OscarConfigurationService $oscarConfigurationService
+ */
+ public function setOscarConfigurationService(OscarConfigurationService $oscarConfigurationService): void
+ {
+ $this->oscarConfigurationService = $oscarConfigurationService;
+ }
+
+ public function apiAction()
+ {
+ try {
+
+ if ($this->getRequest()->getMethod() == "GET") {
+ $action = $this->getRequest()->getQuery('action');
+
+ if ($action == "transmissions-pcru") {
+ $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_PCRU_LIST);
+
+ $infos = [];
+
+ $sql = "
+ select
+ a.id as activityId,
+ a.label,
+ a.description,
+ pcru.id as activitypcruinformationsid,
+ pcru.status,
+ pcru.dateupdated,
+ pcru.datepremierdepot,
+ pcru.dateenvoifichiercontrat
+ from
+ activitypcruinformations pcru
+ left join
+ activity a on a.id = pcru.activity_id
+ where
+ pcru.envoiactif is true
+ and (pcru.dateupdated > now() - interval '6' month
+ or pcru.status not in ('retour-pcru-ok', 'retour-pcru-ok-mais-fichier-manquant')
+ or dateenvoifichiercontrat is null)
+ order by
+ pcru.dateupdated desc;
+ ";
+
+ $infos = $this->getEntityManager()->getConnection()
+ ->executeQuery($sql)->fetchAllAssociative();
+
+
+ foreach ($infos as &$info) {
+ $info['activityUrl'] = $this->url()->fromRoute('contract/show', ['id' => $info['activityid']]);
+ $info['activityPcruUrl'] = $this->url()->fromRoute('contract/pcru-informations', ['id' => $info['activityid']]);
+
+
+ $info['enErreur'] = false;
+ if ($info['status'] === ActivityPcruInformations::STATUS_JAMAIS_ENVOYEE) {
+
+ $activity = $this->getEntityManager()
+ ->getRepository(Activity::class)
+ ->findOneBy(array('id' => $info['activityid']));
+
+ $pcruInformationComplete = $this->pcruInformationsService->getPcruInformationsForActivity($activity);
+ $info['enErreur'] = $pcruInformationComplete->enErreur;
+ $info['fichierContratManquant'] = $pcruInformationComplete->avertissementFichierContratManquant != NULL;
+ }
+
+ $dateupdated = new \DateTime($info['dateupdated']);
+ $dateupdated->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $info['dateupdated'] = $dateupdated->format(\DateTime::ATOM);
+
+ if ($info['datepremierdepot'] != NULL) {
+ $datepremierdepot = new \DateTime($info['datepremierdepot']);
+ $datepremierdepot->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $info['datepremierdepot'] = $datepremierdepot->format(\DateTime::ATOM);
+ }
+
+ if ($info['dateenvoifichiercontrat'] != NULL) {
+ $dateenvoifichiercontrat = new \DateTime($info['dateenvoifichiercontrat']);
+ $dateenvoifichiercontrat->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $info['dateenvoifichiercontrat'] = $dateenvoifichiercontrat->format(\DateTime::ATOM);
+ }
+ }
+
+ $sql = "
+ select
+ id,
+ createdat,
+ titre,
+ status,
+ details
+ from
+ pcruftplog
+ where
+ createdat > now() - interval '6' month
+ order by
+ createdat DESC;
+ ";
+ $stm = $this->getEntityManager()->getConnection()->prepare($sql);
+ $logs = $stm->executeQuery()->fetchAllAssociative();
+
+ foreach ($logs as &$log) {
+ $createdat = new \DateTime($log['createdat']);
+ $createdat->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $info['createdat'] = $createdat->format(\DateTime::ATOM);
+ }
+
+ $response = new JsonModel();
+ $response->setVariables(['transmissionsPcru' => $infos, 'logs' => $logs]);
+ return $response;
+ }
+
+ } else if ($this->getRequest()->getMethod() == "POST") {
+ $action_json = json_decode($this->getRequest()->getContent());
+
+ if ($action_json->action == "enregistrer") {
+ $this->getOscarUserContextService()->check(Privileges::ACTIVITY_PCRU);
+
+ $activity = $this->getEntityManager()
+ ->getRepository(Activity::class)
+ ->findOneBy(array('id' => $action_json->activityId));
+ if (!$activity) {
+ throw new \Exception("L'activité demandée n'existe pas. Veuillez actualiser la page.");
+ }
+
+ $pcruInformations = $activity->getPcruInformations();
+ if ($pcruInformations === NULL) {
+ $pcruInformations = new ActivityPcruInformations();
+ $pcruInformations->setActivity($activity);
+ } else if ($pcruInformations->getStatus() !== ActivityPcruInformations::STATUS_JAMAIS_ENVOYEE) {
+ throw new \Exception("L'activité a déjà été envoyée à PCRU, il n'est plus possible de modifier ces informations.");
+ }
+
+ $a = $action_json->activityPcruInformations;
+ $pcruInformations->setUtiliserObjetParDefaut($a->utiliserObjetParDefaut);
+ $pcruInformations->setObjet($a->objet);
+ $pcruInformations->setUtiliserLabintelParDefaut($a->utiliserLabintelParDefaut);
+ $pcruInformations->setLabintel($a->labintel);
+ $pcruInformations->setUtiliserSigleParDefaut($a->utiliserSigleParDefaut);
+ $pcruInformations->setSigle($a->sigle);
+ $pcruInformations->setUtiliserNumContratParDefaut($a->utiliserNumContratParDefaut);
+ $pcruInformations->setNumContrat($a->numContrat);
+ $pcruInformations->setEquipe($a->equipe);
+ if ($a->envoiActif && !$pcruInformations->isEnvoiActif()) {
+ $this->getOscarUserContextService()->check(Privileges::ACTIVITY_PCRU_ACTIVATE);
+ $pcruInformations->dateActivationEnvoi = new \DateTime();
+ }
+ $pcruInformations->setEnvoiActif($a->envoiActif);
+ $pcruInformations->setUtiliserTypeContratParDefaut($a->utiliserTypeContratParDefaut);
+ if ($a->pcruTypeContractId) {
+ $pcruTypeContract = $this->getEntityManager()
+ ->getRepository(PcruTypeContract::class)
+ ->findOneBy(array('id' => $a->pcruTypeContractId));
+ if (!$pcruTypeContract) {
+ throw new \Exception("Le type de contrat PCRU demandé n'existe pas. Veuillez actualiser la page.");
+ }
+ $pcruInformations->setPcruTypeContract($pcruTypeContract);
+ } else {
+ $pcruInformations->setPcruTypeContract(NULL);
+ }
+ $pcruInformations->setUtiliserAcronymeParDefaut($a->utiliserAcronymeParDefaut);
+ $pcruInformations->setAcronyme($a->acronyme);
+ $pcruInformations->setContratsAssocies($a->contratsAssocies);
+ $pcruInformations->setUtiliserResponsableScientifiqueParDefaut($a->utiliserResponsableScientifiqueParDefaut);
+ $pcruInformations->setResponsableScientifique($a->responsableScientifique);
+ $pcruInformations->setEmployeurResponsableScientifique($a->employeurResponsableScientifique);
+ $pcruInformations->setCoordinateurConsortium(NULL);
+ if ($a->coordinateurConsortium) {
+ if ($a->coordinateurConsortium == "true") {
+ $pcruInformations->setCoordinateurConsortium(true);
+ } else if ($a->coordinateurConsortium == "false") {
+ $pcruInformations->setCoordinateurConsortium(false);
+ }
+ }
+ $pcruInformations->setUtiliserPartenairesParDefaut($a->utiliserPartenairesParDefaut);
+ $pcruInformations->setPartenaires($a->partenaires);
+ $pcruInformations->setUtiliserPartenairePrincipalParDefaut($a->utiliserPartenairePrincipalParDefaut);
+ $pcruInformations->setPartenairePrincipal($a->partenairePrincipal);
+ $pcruInformations->setUtiliserIdPartenairePrincipalParDefaut($a->utiliserIdPartenairePrincipalParDefaut);
+ $pcruInformations->setIdPartenairePrincipal($a->idPartenairePrincipal);
+ $pcruInformations->setLieuExecution($a->lieuExecution);
+ $pcruInformations->setUtiliserDateDerniereSignatureParDefaut($a->utiliserDateDerniereSignatureParDefaut);
+ $pcruInformations->setDateDerniereSignature($a->dateDerniereSignature);
+ $pcruInformations->setDuree(NULL);
+ if ($a->duree) {
+ $pcruInformations->setDuree($a->duree);
+ }
+ $pcruInformations->setUtiliserDateDebutParDefaut($a->utiliserDateDebutParDefaut);
+ $pcruInformations->setDateDebut($a->dateDebut);
+ $pcruInformations->setUtiliserDateFinParDefaut($a->utiliserDateFinParDefaut);
+ $pcruInformations->setDateFin($a->dateFin);
+ $pcruInformations->setMontantPercuUnite(NULL);
+ if ($a->montantPercuUnite || $a->montantPercuUnite === 0) {
+ $pcruInformations->setMontantPercuUnite($a->montantPercuUnite);
+ }
+ $pcruInformations->setCoutTotalEtude(NULL);
+ if ($a->coutTotalEtude || $a->coutTotalEtude === 0) {
+ $pcruInformations->setCoutTotalEtude($a->coutTotalEtude);
+ }
+ $pcruInformations->setUtiliserMontantTotalParDefaut($a->utiliserMontantTotalParDefaut);
+ $pcruInformations->setMontantTotal(NULL);
+ if ($a->montantTotal || $a->montantTotal === 0) {
+ $pcruInformations->setMontantTotal($a->montantTotal);
+ }
+ $pcruInformations->setCommentaires($a->commentaires);
+ $pcruInformations->setPia(NULL);
+ if ($a->pia) {
+ if ($a->pia == "true") {
+ $pcruInformations->setPia(true);
+ } else if ($a->pia == "false") {
+ $pcruInformations->setPia(false);
+ }
+ }
+ $pcruInformations->setUtiliserReferenceParDefaut($a->utiliserReferenceParDefaut);
+ $pcruInformations->setReference($a->reference);
+ $pcruInformations->setAccordCadre(NULL);
+ if ($a->accordCadre) {
+ if ($a->accordCadre == "true") {
+ $pcruInformations->setAccordCadre(true);
+ } else if ($a->accordCadre == "false") {
+ $pcruInformations->setAccordCadre(false);
+ }
+ }
+ $pcruInformations->setCifre(false);
+ if ($a->cifre == "true") {
+ $pcruInformations->setCifre(true);
+ }
+ $pcruInformations->setChaireIndustrielle(NULL);
+ if ($a->chaireIndustrielle) {
+ if ($a->chaireIndustrielle == "true") {
+ $pcruInformations->setChaireIndustrielle(true);
+ } else if ($a->chaireIndustrielle == "false") {
+ $pcruInformations->setChaireIndustrielle(false);
+ }
+ }
+ $pcruInformations->setPresencePartenaireIndustriel(NULL);
+ if ($a->presencePartenaireIndustriel) {
+ if ($a->presencePartenaireIndustriel == "true") {
+ $pcruInformations->setPresencePartenaireIndustriel(true);
+ } else if ($a->presencePartenaireIndustriel == "false") {
+ $pcruInformations->setPresencePartenaireIndustriel(false);
+ }
+ }
+
+ $pcruInformations->setDateUpdated(new \DateTime());
+ $this->getEntityManager()->persist($pcruInformations);
+ $this->getEntityManager()->flush();
+ $this->getEntityManager()->refresh($activity);
+
+ $response = new JsonModel();
+ $response->setVariables(
+ [
+ 'pcru' => $this->pcruInformationsService->getPcruInformationsForActivity($activity)
+ ]);
+ return $response;
+
+ } else if ($action_json->action == "transferer") {
+
+ $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_PCRU_UPLOAD);
+
+ $logs = $this->getPcruFtpService()->processPcruFtp();
+
+ $response = new JsonModel();
+ $response->setVariables(['logs' => $logs]);
+ return $response;
+ }
+ }
+
+ $response = new Response();
+ $response->setStatusCode(Response::STATUS_CODE_405);
+ $response->setContent("Method Not Allowed.");
+ return $response;
+
+ } catch (OscarPCRUException $e) {
+ $response = new Response();
+ $response->setStatusCode(Response::STATUS_CODE_500);
+ header('Content-type: application/json; charset=utf-8');
+ $responseJson = new JsonModel();
+ $responseJson->setVariables(['logs' => $e->details]);
+ $response->setContent($responseJson->serialize());
+ return $response;
+ } catch (Throwable $e) {
+ $response = new Response();
+ $response->setStatusCode(Response::STATUS_CODE_500);
+ $response->setContent($e->getMessage());
+ return $response;
+ }
+ }
+
+ public function pcruInformationsAction() {
+ $this->getOscarUserContextService()->check(Privileges::ACTIVITY_PCRU);
+ if (!$this->getOscarConfigurationService()->getPcruEnabled()) {
+ throw new OscarException("Le module PCRU n'est pas activé");
+ }
+ return [
+ 'urlActivity' => $this->url()->fromRoute('contract/show', ['id' => $this->params()->fromRoute('id')]),
+ 'urlPcruApi' => $this->url()->fromRoute('pcru/api')
+ ];
+ }
+
+ public function pcruTransmissionsAction() {
+ $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_PCRU_LIST);
+ if (!$this->getOscarConfigurationService()->getPcruEnabled()) {
+ throw new OscarException("Le module PCRU n'est pas activé");
+ }
+ return [
+ 'urlPcruApi' => $this->url()->fromRoute('pcru/api')
+ ];
+ }
+
+}
diff --git a/module/Oscar/src/Oscar/Controller/PcruControllerFactory.php b/module/Oscar/src/Oscar/Controller/PcruControllerFactory.php
new file mode 100644
index 000000000..d9144ce26
--- /dev/null
+++ b/module/Oscar/src/Oscar/Controller/PcruControllerFactory.php
@@ -0,0 +1,26 @@
+setEntityManager($container->get(EntityManager::class));
+ $c->setOscarUserContextService($container->get(OscarUserContext::class));
+ $c->setLoggerService($container->get('Logger'));
+ $c->setPcruFtpService($container->get(PcruFtpService::class));
+ $c->setPcruInformationsService($container->get(PcruInformationsService::class));
+ $c->setOscarConfigurationService($container->get(OscarConfigurationService::class));
+ return $c;
+ }
+}
diff --git a/module/Oscar/src/Oscar/Entity/Activity.php b/module/Oscar/src/Oscar/Entity/Activity.php
index 9b876f769..ab84a205f 100644
--- a/module/Oscar/src/Oscar/Entity/Activity.php
+++ b/module/Oscar/src/Oscar/Entity/Activity.php
@@ -534,6 +534,12 @@ class Activity implements ResourceInterface
*/
private $pcruInfo;
+ /**
+ * Informations complémentaires PCRU
+ * @OneToOne(targetEntity="ActivityPcruInformations", mappedBy="activity", orphanRemoval=true, cascade={"remove"})
+ */
+ private $pcruInformations;
+
/**
* @var String
* @ORM\Column(type="string", options={"default":"none"}, nullable=false)
@@ -998,6 +1004,23 @@ class Activity implements ResourceInterface
return $this;
}
+ /**
+ * @return mixed
+ */
+ public function getPcruInformations()
+ {
+ return $this->pcruInformations;
+ }
+
+ /**
+ * @param mixed $pcruInformations
+ */
+ public function setPcruInformations($pcruInformations): self
+ {
+ $this->pcruInformations = $pcruInformations;
+ return $this;
+ }
+
/**
* @return String
*/
diff --git a/module/Oscar/src/Oscar/Entity/ActivityPcruInformations.php b/module/Oscar/src/Oscar/Entity/ActivityPcruInformations.php
new file mode 100644
index 000000000..b85addfcd
--- /dev/null
+++ b/module/Oscar/src/Oscar/Entity/ActivityPcruInformations.php
@@ -0,0 +1,1617 @@
+dateUpdated = new \DateTime();
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * @return Activity
+ */
+ public function getActivity(): Activity
+ {
+ return $this->activity;
+ }
+
+ /**
+ * @param Activity $activity
+ */
+ public function setActivity(Activity $activity): self
+ {
+ $this->activity = $activity;
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserObjetParDefaut()
+ {
+ return $this->utiliserObjetParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserObjetParDefaut
+ */
+ public function setUtiliserObjetParDefaut(bool $utiliserObjetParDefaut): self
+ {
+ $this->utiliserObjetParDefaut = $utiliserObjetParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getObjet(): ?string
+ {
+ return $this->objet;
+ }
+
+ /**
+ * @param ?string $objet
+ */
+ public function setObjet(?string $objet): self
+ {
+ $objet = self::trimToNull($objet);
+ if ($objet == NULL) {
+ $this->objet = NULL;
+ } else {
+ $this->objet = mb_substr($objet, 0, 1000);
+ }
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserLabintelParDefaut()
+ {
+ return $this->utiliserLabintelParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserLabintelParDefaut
+ */
+ public function setUtiliserLabintelParDefaut(bool $utiliserLabintelParDefaut): self
+ {
+ $this->utiliserLabintelParDefaut = $utiliserLabintelParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getLabintel(): ?string
+ {
+ return $this->labintel;
+ }
+
+ /**
+ * @param ?string $labintel
+ */
+ public function setLabintel(?string $labintel): self
+ {
+ $labintel = self::trimToNull($labintel);
+ if ($labintel == NULL) {
+ $this->labintel = NULL;
+ } else {
+ $this->labintel = mb_substr($labintel, 0, 10);
+ }
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserSigleParDefaut()
+ {
+ return $this->utiliserSigleParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserSigleParDefaut
+ */
+ public function setUtiliserSigleParDefaut(bool $utiliserSigleParDefaut): self
+ {
+ $this->utiliserSigleParDefaut = $utiliserSigleParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getSigle(): ?string
+ {
+ return $this->sigle;
+ }
+
+ /**
+ * @param ?string $sigle
+ */
+ public function setSigle(?string $sigle): self
+ {
+ $sigle = self::trimToNull($sigle);
+ if ($sigle == NULL) {
+ $this->sigle = NULL;
+ } else {
+ $this->sigle = mb_substr($sigle, 0, 20);
+ }
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserNumContratParDefaut()
+ {
+ return $this->utiliserNumContratParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserNumContratParDefaut
+ */
+ public function setUtiliserNumContratParDefaut(bool $utiliserNumContratParDefaut): self
+ {
+ $this->utiliserNumContratParDefaut = $utiliserNumContratParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getNumContrat(): ?string
+ {
+ return $this->numContrat;
+ }
+
+ /**
+ * @param ?string $numContrat
+ */
+ public function setNumContrat(?string $numContrat): self
+ {
+ $numContrat = self::trimToNull($numContrat);
+ if ($numContrat == NULL) {
+ $this->numContrat = NULL;
+ } else {
+ $this->numContrat = mb_substr($numContrat, 0, 30);
+ }
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getEquipe(): ?string
+ {
+ return $this->equipe;
+ }
+
+ /**
+ * @param ?string $equipe
+ */
+ public function setEquipe(?string $equipe): self
+ {
+ $equipe = self::trimToNull($equipe);
+ if ($equipe == NULL) {
+ $this->equipe = NULL;
+ } else {
+ $this->equipe = mb_substr($equipe, 0, 150);
+ }
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserTypeContratParDefaut()
+ {
+ return $this->utiliserTypeContratParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserTypeContratParDefaut
+ */
+ public function setUtiliserTypeContratParDefaut(bool $utiliserTypeContratParDefaut): self
+ {
+ $this->utiliserTypeContratParDefaut = $utiliserTypeContratParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return PcruTypeContract
+ */
+ public function getPcruTypeContract(): ?PcruTypeContract
+ {
+ return $this->pcruTypeContract;
+ }
+
+ /**
+ * @param PcruTypeContract $pcruTypeContract
+ */
+ public function setPcruTypeContract(?PcruTypeContract $pcruTypeContract): self
+ {
+ $this->pcruTypeContract = $pcruTypeContract;
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserAcronymeParDefaut()
+ {
+ return $this->utiliserAcronymeParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserAcronymeParDefaut
+ */
+ public function setUtiliserAcronymeParDefaut(bool $utiliserAcronymeParDefaut): self
+ {
+ $this->utiliserAcronymeParDefaut = $utiliserAcronymeParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getAcronyme(): ?string
+ {
+ return $this->acronyme;
+ }
+
+ /**
+ * @param ?string $acronyme
+ */
+ public function setAcronyme(?string $acronyme): self
+ {
+ $acronyme = self::trimToNull($acronyme);
+ if ($acronyme == NULL) {
+ $this->acronyme = NULL;
+ } else {
+ $this->acronyme = mb_substr($acronyme, 0, 50);
+ }
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getContratsAssocies(): ?string
+ {
+ return $this->contratsAssocies;
+ }
+
+ /**
+ * @param ?string $contratsAssocies
+ */
+ public function setContratsAssocies(?string $contratsAssocies): self
+ {
+ $contratsAssocies = self::trimToNull($contratsAssocies);
+ if ($contratsAssocies == NULL) {
+ $this->contratsAssocies = NULL;
+ } else {
+ $this->contratsAssocies = mb_substr($contratsAssocies, 0, 300);
+ }
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserResponsableScientifiqueParDefaut()
+ {
+ return $this->utiliserResponsableScientifiqueParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserResponsableScientifiqueParDefaut
+ */
+ public function setUtiliserResponsableScientifiqueParDefaut(bool $utiliserResponsableScientifiqueParDefaut): self
+ {
+ $this->utiliserResponsableScientifiqueParDefaut = $utiliserResponsableScientifiqueParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getResponsableScientifique(): ?string
+ {
+ return $this->responsableScientifique;
+ }
+
+ /**
+ * @param ?string $responsableScientifique
+ */
+ public function setResponsableScientifique(?string $responsableScientifique): self
+ {
+ $responsableScientifique = self::trimToNull($responsableScientifique);
+ if ($responsableScientifique == NULL) {
+ $this->responsableScientifique = NULL;
+ } else {
+ $this->responsableScientifique = mb_substr($responsableScientifique, 0, 50);
+ }
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getEmployeurResponsableScientifique(): ?string
+ {
+ return $this->employeurResponsableScientifique;
+ }
+
+ /**
+ * @param ?string $employeurResponsableScientifique
+ */
+ public function setEmployeurResponsableScientifique(?string $employeurResponsableScientifique): self
+ {
+ $employeurResponsableScientifique = self::trimToNull($employeurResponsableScientifique);
+ if ($employeurResponsableScientifique == NULL) {
+ $this->employeurResponsableScientifique = NULL;
+ } else {
+ $this->employeurResponsableScientifique = mb_substr($employeurResponsableScientifique, 0, 50);
+ }
+ return $this;
+ }
+
+ /**
+ * @return ?bool
+ */
+ public function isCoordinateurConsortium()
+ {
+ return $this->coordinateurConsortium;
+ }
+
+ /**
+ * @param ?bool $coordinateurConsortium
+ */
+ public function setCoordinateurConsortium(?bool $coordinateurConsortium): self
+ {
+ $this->coordinateurConsortium = $coordinateurConsortium;
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserPartenairesParDefaut()
+ {
+ return $this->utiliserPartenairesParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserPartenairesParDefaut
+ */
+ public function setUtiliserPartenairesParDefaut(bool $utiliserPartenairesParDefaut): self
+ {
+ $this->utiliserPartenairesParDefaut = $utiliserPartenairesParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getPartenaires(): ?string
+ {
+ return $this->partenaires;
+ }
+
+ /**
+ * @param ?string $partenaires
+ */
+ public function setPartenaires(?string $partenaires): self
+ {
+ $partenaires = self::trimToNull($partenaires);
+ if ($partenaires == NULL) {
+ $this->partenaires = NULL;
+ } else {
+ $this->partenaires = mb_substr($partenaires, 0, 200);
+ }
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserPartenairePrincipalParDefaut()
+ {
+ return $this->utiliserPartenairePrincipalParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserPartenairePrincipalParDefaut
+ */
+ public function setUtiliserPartenairePrincipalParDefaut(bool $utiliserPartenairePrincipalParDefaut): self
+ {
+ $this->utiliserPartenairePrincipalParDefaut = $utiliserPartenairePrincipalParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getPartenairePrincipal(): ?string
+ {
+ return $this->partenairePrincipal;
+ }
+
+ /**
+ * @param ?string $partenairePrincipal
+ */
+ public function setPartenairePrincipal(?string $partenairePrincipal): self
+ {
+ $partenairePrincipal = self::trimToNull($partenairePrincipal);
+ if ($partenairePrincipal == NULL) {
+ $this->partenairePrincipal = NULL;
+ } else {
+ $this->partenairePrincipal = mb_substr($partenairePrincipal, 0, self::PARTENAIRE_PRINCIPAL_MAX_LENGTH);
+ }
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserIdPartenairePrincipalParDefaut()
+ {
+ return $this->utiliserIdPartenairePrincipalParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserIdPartenairePrincipalParDefaut
+ */
+ public function setUtiliserIdPartenairePrincipalParDefaut(bool $utiliserIdPartenairePrincipalParDefaut): self
+ {
+ $this->utiliserIdPartenairePrincipalParDefaut = $utiliserIdPartenairePrincipalParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getIdPartenairePrincipal(): ?string
+ {
+ return $this->idPartenairePrincipal;
+ }
+
+ /**
+ * @param ?string $idPartenairePrincipal
+ */
+ public function setIdPartenairePrincipal(?string $idPartenairePrincipal): self
+ {
+ $idPartenairePrincipal = self::trimToNull($idPartenairePrincipal);
+ if ($idPartenairePrincipal == NULL) {
+ $this->idPartenairePrincipal = NULL;
+ } else {
+ $this->idPartenairePrincipal = mb_substr($idPartenairePrincipal, 0, self::ID_PARTENAIRE_PRINCIPAL_MAX_LENGTH);
+ }
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getLieuExecution(): ?string
+ {
+ return $this->lieuExecution;
+ }
+
+ /**
+ * @param ?string $lieuExecution
+ */
+ public function setLieuExecution(?string $lieuExecution): self
+ {
+ $lieuExecution = self::trimToNull($lieuExecution);
+ if ($lieuExecution == NULL) {
+ $this->lieuExecution = NULL;
+ } else {
+ $this->lieuExecution = mb_substr($lieuExecution, 0, self::LIEU_EXECUTION_MAX_LENGTH);
+ }
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserDateDerniereSignatureParDefaut()
+ {
+ return $this->utiliserDateDerniereSignatureParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserDateDerniereSignatureParDefaut
+ */
+ public function setUtiliserDateDerniereSignatureParDefaut(bool $utiliserDateDerniereSignatureParDefaut): self
+ {
+ $this->utiliserDateDerniereSignatureParDefaut = $utiliserDateDerniereSignatureParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getDateDerniereSignature(): ?string
+ {
+ return $this->dateDerniereSignature;
+ }
+
+ /**
+ * @param ?string $dateDerniereSignature
+ */
+ public function setDateDerniereSignature(?string $dateDerniereSignature): self
+ {
+ $dateDerniereSignature = self::trimToNull($dateDerniereSignature);
+ if ($dateDerniereSignature == NULL) {
+ $this->dateDerniereSignature = NULL;
+ } else {
+ $this->dateDerniereSignature = mb_substr($dateDerniereSignature, 0, 10);
+ }
+ return $this;
+ }
+
+ /**
+ * @return ?float
+ */
+ public function getDuree(): ?float
+ {
+ return $this->duree;
+ }
+
+ /**
+ * @param ?float $duree
+ */
+ public function setDuree(?float $duree): self
+ {
+ $this->duree = $duree;
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserDateDebutParDefaut()
+ {
+ return $this->utiliserDateDebutParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserDateDebutParDefaut
+ */
+ public function setUtiliserDateDebutParDefaut(bool $utiliserDateDebutParDefaut): self
+ {
+ $this->utiliserDateDebutParDefaut = $utiliserDateDebutParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getDateDebut(): ?string
+ {
+ return $this->dateDebut;
+ }
+
+ /**
+ * @param ?string $dateDebut
+ */
+ public function setDateDebut(?string $dateDebut): self
+ {
+ $dateDebut = self::trimToNull($dateDebut);
+ if ($dateDebut == NULL) {
+ $this->dateDebut = NULL;
+ } else {
+ $this->dateDebut = mb_substr($dateDebut, 0, 10);
+ }
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserDateFinParDefaut()
+ {
+ return $this->utiliserDateFinParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserDateFinParDefaut
+ */
+ public function setUtiliserDateFinParDefaut(bool $utiliserDateFinParDefaut): self
+ {
+ $this->utiliserDateFinParDefaut = $utiliserDateFinParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getDateFin(): ?string
+ {
+ return $this->dateFin;
+ }
+
+ /**
+ * @param ?string $dateFin
+ */
+ public function setDateFin(?string $dateFin): self
+ {
+ $dateFin = self::trimToNull($dateFin);
+ if ($dateFin == NULL) {
+ $this->dateFin = NULL;
+ } else {
+ $this->dateFin = mb_substr($dateFin, 0, 10);
+ }
+ return $this;
+ }
+
+ /**
+ * @return ?float
+ */
+ public function getMontantPercuUnite(): ?float
+ {
+ return $this->montantPercuUnite;
+ }
+
+ /**
+ * @param ?float $montantPercuUnite
+ */
+ public function setMontantPercuUnite(?float $montantPercuUnite): self
+ {
+ $this->montantPercuUnite = $montantPercuUnite;
+ return $this;
+ }
+
+ /**
+ * @return ?float
+ */
+ public function getCoutTotalEtude(): ?float
+ {
+ return $this->coutTotalEtude;
+ }
+
+ /**
+ * @param ?float $coutTotalEtude
+ */
+ public function setCoutTotalEtude(?float $coutTotalEtude): self
+ {
+ $this->coutTotalEtude = $coutTotalEtude;
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserMontantTotalParDefaut()
+ {
+ return $this->utiliserMontantTotalParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserMontantTotalParDefaut
+ */
+ public function setUtiliserMontantTotalParDefaut(bool $utiliserMontantTotalParDefaut): self
+ {
+ $this->utiliserMontantTotalParDefaut = $utiliserMontantTotalParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?float
+ */
+ public function getMontantTotal(): ?float
+ {
+ return $this->montantTotal;
+ }
+
+ /**
+ * @param ?float $montantTotal
+ */
+ public function setMontantTotal(?float $montantTotal): self
+ {
+ $this->montantTotal = $montantTotal;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getCommentaires(): ?string
+ {
+ return $this->commentaires;
+ }
+
+ /**
+ * @param ?string $commentaires
+ */
+ public function setCommentaires(?string $commentaires): self
+ {
+ $commentaires = self::trimToNull($commentaires);
+ if ($commentaires == NULL) {
+ $this->commentaires = NULL;
+ } else {
+ $this->commentaires = mb_substr($commentaires, 0, self::COMMENTAIRES_MAX_LENGTH);
+ }
+ return $this;
+ }
+
+ /**
+ * @return ?bool
+ */
+ public function isPia()
+ {
+ return $this->pia;
+ }
+
+ /**
+ * @param ?bool $pia
+ */
+ public function setPia(?bool $pia): self
+ {
+ $this->pia = $pia;
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isUtiliserReferenceParDefaut()
+ {
+ return $this->utiliserReferenceParDefaut;
+ }
+
+ /**
+ * @param bool $utiliserReferenceParDefaut
+ */
+ public function setUtiliserReferenceParDefaut(bool $utiliserReferenceParDefaut): self
+ {
+ $this->utiliserReferenceParDefaut = $utiliserReferenceParDefaut;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getReference(): ?string
+ {
+ return $this->reference;
+ }
+
+ /**
+ * @param ?string $reference
+ */
+ public function setReference(?string $reference): self
+ {
+ $reference = self::trimToNull($reference);
+ if ($reference == NULL) {
+ $this->reference = NULL;
+ } else {
+ $this->reference = mb_substr($reference, 0, self::REFERENCE_MAX_LENGTH);
+ }
+ return $this;
+ }
+
+ /**
+ * @return ?bool
+ */
+ public function isAccordCadre()
+ {
+ return $this->accordCadre;
+ }
+
+ /**
+ * @param ?bool $accordCadre
+ */
+ public function setAccordCadre(?bool $accordCadre): self
+ {
+ $this->accordCadre = $accordCadre;
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isCifre()
+ {
+ return $this->cifre;
+ }
+
+ /**
+ * @param bool $cifre
+ */
+ public function setCifre(bool $cifre): self
+ {
+ $this->cifre = $cifre;
+ return $this;
+ }
+
+ /**
+ * @return ?bool
+ */
+ public function isChaireIndustrielle()
+ {
+ return $this->chaireIndustrielle;
+ }
+
+ /**
+ * @param ?bool $chaireIndustrielle
+ */
+ public function setChaireIndustrielle(?bool $chaireIndustrielle): self
+ {
+ $this->chaireIndustrielle = $chaireIndustrielle;
+ return $this;
+ }
+
+ /**
+ * @return ?bool
+ */
+ public function isPresencePartenaireIndustriel()
+ {
+ return $this->presencePartenaireIndustriel;
+ }
+
+ /**
+ * @param ?bool $presencePartenaireIndustriel
+ */
+ public function setPresencePartenaireIndustriel(?bool $presencePartenaireIndustriel): self
+ {
+ $this->presencePartenaireIndustriel = $presencePartenaireIndustriel;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getStatus(): string
+ {
+ return $this->status;
+ }
+
+ /**
+ * @param string $status
+ */
+ public function setStatus(string $status): self
+ {
+ $this->status = $status;
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isEnvoiActif(): bool
+ {
+ return $this->envoiActif;
+ }
+
+ /**
+ * @param bool $envoiActif
+ */
+ public function setEnvoiActif(bool $envoiActif): self
+ {
+ $this->envoiActif = $envoiActif;
+ return $this;
+ }
+
+ /**
+ * @return \DateTime
+ */
+ public function getDateUpdated(): \DateTime
+ {
+ return $this->dateUpdated;
+ }
+
+ /**
+ * @param \DateTime $dateUpdated
+ */
+ public function setDateUpdated(\DateTime $dateUpdated): self
+ {
+ $this->dateUpdated = $dateUpdated;
+ return $this;
+ }
+
+ /**
+ * @return ?\DateTime
+ */
+ public function getDatePremierDepot(): ?\DateTime
+ {
+ return $this->datePremierDepot;
+ }
+
+ /**
+ * @param ?\DateTime $datePremierDepot
+ */
+ public function setDatePremierDepot(?\DateTime $datePremierDepot): self
+ {
+ $this->datePremierDepot = $datePremierDepot;
+ return $this;
+ }
+
+ public function toArray() :array
+ {
+ $out = [];
+ $out['id'] = $this->getId();
+ $out['utiliserObjetParDefaut'] = $this->isUtiliserObjetParDefaut();
+ $out['objet'] = $this->getObjet();
+ $out['utiliserLabintelParDefaut'] = $this->isUtiliserLabintelParDefaut();
+ $out['labintel'] = $this->getLabintel();
+ $out['utiliserSigleParDefaut'] = $this->isUtiliserSigleParDefaut();
+ $out['sigle'] = $this->getSigle();
+ $out['utiliserNumContratParDefaut'] = $this->isUtiliserNumContratParDefaut();
+ $out['numContrat'] = $this->getNumContrat();
+ $out['equipe'] = $this->getEquipe();
+ $out['utiliserTypeContratParDefaut'] = $this->isUtiliserTypeContratParDefaut();
+ if ($this->pcruTypeContract != NULL) {
+ $out['pcruTypeContractId'] = $this->pcruTypeContract->getId();
+ } else {
+ $out['pcruTypeContractId'] = NULL;
+ }
+ $out['utiliserAcronymeParDefaut'] = $this->isUtiliserAcronymeParDefaut();
+ $out['acronyme'] = $this->getAcronyme();
+ $out['contratsAssocies'] = $this->getContratsAssocies();
+ $out['utiliserResponsableScientifiqueParDefaut'] = $this->isUtiliserResponsableScientifiqueParDefaut();
+ $out['responsableScientifique'] = $this->getResponsableScientifique();
+ $out['employeurResponsableScientifique'] = $this->getEmployeurResponsableScientifique();
+ $out['coordinateurConsortium'] = $this->isCoordinateurConsortium() === NULL ? NULL : ($this->isCoordinateurConsortium() ? "true" : "false");
+ $out['utiliserPartenairesParDefaut'] = $this->isUtiliserPartenairesParDefaut();
+ $out['partenaires'] = $this->getPartenaires();
+ $out['utiliserPartenairePrincipalParDefaut'] = $this->isUtiliserPartenairePrincipalParDefaut();
+ $out['partenairePrincipal'] = $this->getPartenairePrincipal();
+ $out['utiliserIdPartenairePrincipalParDefaut'] = $this->isUtiliserIdPartenairePrincipalParDefaut();
+ $out['idPartenairePrincipal'] = $this->getIdPartenairePrincipal();
+ $out['lieuExecution'] = $this->getLieuExecution();
+ $out['utiliserDateDerniereSignatureParDefaut'] = $this->isUtiliserDateDerniereSignatureParDefaut();
+ $out['dateDerniereSignature'] = $this->getDateDerniereSignature();
+ $out['duree'] = $this->getDuree();
+ $out['utiliserDateDebutParDefaut'] = $this->isUtiliserDateDebutParDefaut();
+ $out['dateDebut'] = $this->getDateDebut();
+ $out['utiliserDateFinParDefaut'] = $this->isUtiliserDateFinParDefaut();
+ $out['dateFin'] = $this->getDateFin();
+ $out['montantPercuUnite'] = $this->getMontantPercuUnite();
+ $out['coutTotalEtude'] = $this->getCoutTotalEtude();
+ $out['utiliserMontantTotalParDefaut'] = $this->isUtiliserMontantTotalParDefaut();
+ $out['montantTotal'] = $this->getMontantTotal();
+ $out['commentaires'] = $this->getCommentaires();
+ $out['pia'] = $this->isPia() === NULL ? NULL : ($this->isPia() ? "true" : "false");
+ $out['utiliserReferenceParDefaut'] = $this->isUtiliserReferenceParDefaut();
+ $out['reference'] = $this->getReference();
+ $out['accordCadre'] = $this->isAccordCadre() === NULL ? NULL : ($this->isAccordCadre() ? "true" : "false");
+ $out['cifre'] = $this->isCifre() ? "true" : "false";
+ $out['chaireIndustrielle'] = $this->isChaireIndustrielle() === NULL ? NULL : ($this->isChaireIndustrielle() ? "true" : "false");
+ $out['presencePartenaireIndustriel'] = $this->isPresencePartenaireIndustriel() === NULL ? NULL : ($this->isPresencePartenaireIndustriel() ? "true" : "false");
+ $out['status'] = $this->getStatus();
+ $out['envoiActif'] = $this->isEnvoiActif();
+ $dateupdated = $this->getDateUpdated();
+ $dateupdated->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $out['dateUpdated'] = $dateupdated->format(\DateTime::ATOM);
+ $dateActivationEnvoi = $this->dateActivationEnvoi;
+ $out['dateActivationEnvoi'] = NULL;
+ if ($dateActivationEnvoi != NULL) {
+ $dateActivationEnvoi->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $out['dateActivationEnvoi'] = $dateActivationEnvoi->format(\DateTime::ATOM);
+ }
+ $datepremierdepot = $this->getDatePremierDepot();
+ $out['datePremierDepot'] = NULL;
+ if ($datepremierdepot != NULL) {
+ $datepremierdepot->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $out['datePremierDepot'] = $datepremierdepot->format(\DateTime::ATOM);
+ }
+ $dateRetourOK = $this->dateRetourOK;
+ $out['dateRetourOK'] = NULL;
+ if ($dateRetourOK != NULL) {
+ $dateRetourOK->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $out['dateRetourOK'] = $dateRetourOK->format(\DateTime::ATOM);
+ }
+ $dateRetourOKMaisContratManquant = $this->dateRetourOKMaisContratManquant;
+ $out['dateRetourOKMaisContratManquant'] = NULL;
+ if ($dateRetourOKMaisContratManquant != NULL) {
+ $dateRetourOKMaisContratManquant->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $out['dateRetourOKMaisContratManquant'] = $dateRetourOKMaisContratManquant->format(\DateTime::ATOM);
+ }
+ $dateEnvoiFichierContrat = $this->dateEnvoiFichierContrat;
+ $out['dateEnvoiFichierContrat'] = NULL;
+ if ($dateEnvoiFichierContrat != NULL) {
+ $dateEnvoiFichierContrat->setTimezone(new \DateTimeZone( date_default_timezone_get() ));
+ $out['dateEnvoiFichierContrat'] = $dateEnvoiFichierContrat->format(\DateTime::ATOM);
+ }
+ $out['envoiObjet'] = $this->envoiObjet;
+ $out['envoiLabintel'] = $this->envoiLabintel;
+ $out['envoiSigle'] = $this->envoiSigle;
+ $out['envoiNumContrat'] = $this->envoiNumContrat;
+ $out['envoiEquipe'] = $this->envoiEquipe;
+ $out['envoiTypeContrat'] = $this->envoiTypeContrat;
+ $out['envoiAcronyme'] = $this->envoiAcronyme;
+ $out['envoiContratsAssocies'] = $this->envoiContratsAssocies;
+ $out['envoiResponsableScientifique'] = $this->envoiResponsableScientifique;
+ $out['envoiEmployeurResponsableScientifique'] = $this->envoiEmployeurResponsableScientifique;
+ $out['envoiCoordinateurConsortium'] = $this->envoiCoordinateurConsortium;
+ $out['envoiPartenaires'] = $this->envoiPartenaires;
+ $out['envoiPartenairePrincipal'] = $this->envoiPartenairePrincipal;
+ $out['envoiIdPartenairePrincipal'] = $this->envoiIdPartenairePrincipal;
+ $out['envoiSourceFinancement'] = $this->envoiSourceFinancement;
+ $out['envoiLieuExecution'] = $this->envoiLieuExecution;
+ $out['envoiDateDerniereSignature'] = $this->envoiDateDerniereSignature;
+ $out['envoiDuree'] = $this->envoiDuree;
+ $out['envoiDateDebut'] = $this->envoiDateDebut;
+ $out['envoiDateFin'] = $this->envoiDateFin;
+ $out['envoiMontantPercuUnite'] = $this->envoiMontantPercuUnite;
+ $out['envoiCoutTotalEtude'] = $this->envoiCoutTotalEtude;
+ $out['envoiMontantTotal'] = $this->envoiMontantTotal;
+ $out['envoiValidePoleCompetitivite'] = $this->envoiValidePoleCompetitivite;
+ $out['envoiPoleCompetitivite'] = $this->envoiPoleCompetitivite;
+ $out['envoiCommentaires'] = $this->envoiCommentaires;
+ $out['envoiPia'] = $this->envoiPia;
+ $out['envoiReference'] = $this->envoiReference;
+ $out['envoiAccordCadre'] = $this->envoiAccordCadre;
+ $out['envoiCifre'] = $this->envoiCifre;
+ $out['envoiChaireIndustrielle'] = $this->envoiChaireIndustrielle;
+ $out['envoiPresencePartenaireIndustriel'] = $this->envoiPresencePartenaireIndustriel;
+ return $out;
+ }
+
+ static private function trimToNull(?string $s) : ?string {
+ if ($s === NULL) {
+ return NULL;
+ }
+ $t = trim($s);
+ if ($t === '') {
+ return NULL;
+ }
+ return $t;
+ }
+}
diff --git a/module/Oscar/src/Oscar/Entity/ActivityPcruInformationsRepository.php b/module/Oscar/src/Oscar/Entity/ActivityPcruInformationsRepository.php
new file mode 100644
index 000000000..47008aa3f
--- /dev/null
+++ b/module/Oscar/src/Oscar/Entity/ActivityPcruInformationsRepository.php
@@ -0,0 +1,9 @@
+createdAt = new \DateTime();
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * @return string
+ */
+ public function getStatus(): string
+ {
+ return $this->status;
+ }
+
+ /**
+ * @param string $status
+ */
+ public function setStatus(string $status): self
+ {
+ $this->status = $status;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getTitre(): ?string
+ {
+ return $this->titre;
+ }
+
+ /**
+ * @param ?string $titre
+ */
+ public function setTitre(?string $titre): self
+ {
+ $this->titre = $titre;
+ return $this;
+ }
+
+ /**
+ * @return ?string
+ */
+ public function getDetails(): ?string
+ {
+ return $this->details;
+ }
+
+ /**
+ * @param ?string $details
+ */
+ public function setDetails(?string $details): self
+ {
+ $this->details = $details;
+ return $this;
+ }
+
+ /**
+ * @return \DateTime
+ */
+ public function getCreatedAt(): \DateTime
+ {
+ return $this->createdAt;
+ }
+}
diff --git a/module/Oscar/src/Oscar/Entity/PcruFtpLogRepository.php b/module/Oscar/src/Oscar/Entity/PcruFtpLogRepository.php
new file mode 100644
index 000000000..f16133c3a
--- /dev/null
+++ b/module/Oscar/src/Oscar/Entity/PcruFtpLogRepository.php
@@ -0,0 +1,9 @@
+pcruInformationsService;
+ }
+
+ /**
+ * @param PcruInformationsService $pcruInformationsService
+ */
+ public function setPcruInformationsService(PcruInformationsService $pcruInformationsService): void
+ {
+ $this->pcruInformationsService = $pcruInformationsService;
+ }
+
+ public function processPcruFtp()
+ {
+ $logs = array();
+
+ try {
+
+ $repertoireDistant = $this->getOscarConfigurationService()->getConfiguration('pcru.repertoire_sftp');
+ $nomFichierContrats = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_contrats');
+ $nomFichierContratsDeposesOK = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_csv_ok');
+ $nomFichierRetourPcruOK = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_retour_pcru_ok');
+ $nomFichierRetourPcruOKCsv = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_retour_pcru_ok_csv');
+ $nomFichierDocumentsContratsPDFDeposesOK = $this->getOscarConfigurationService()->getConfiguration('pcru.filename_pdf_ok');
+
+ $config = $this->getConfiguration();
+ $logs[] = $this->log("Tentative de connexion au serveur SFTP PCRU : '" . $config['host'].":".$config['port']."'");
+ $conn = ssh2_connect($config['host'], $config['port']);
+
+ if (!$conn) {
+ $logs[] = $this->error('Impossible de se connecter au serveur SFTP PCRU');
+ $e = new OscarPCRUException("Impossible de se connecter au serveur SFTP PCRU");
+ $e->details = $logs;
+ throw $e;
+ }
+
+ $logs[] = $this->log("Le serveur est joignable");
+
+ $logs[] = $this->log("Tentative d'identification, utilisateur : '".$config['user']."'");
+ if (!ssh2_auth_password($conn, $config['user'], $config['pass'])) {
+ $logs[] = $this->error("Échec de l'identification au serveur SFTP PCRU");
+ $e = new OscarPCRUException("Échec de l'identification au serveur SFTP PCRU");
+ $e->details = $logs;
+ throw $e;
+ }
+
+ $logs[] = $this->log("Identification SFTP réussie");
+
+ $logs[] = $this->log("Initialisation du sous-système SFTP");
+ $sftp = ssh2_sftp($conn);
+ if (!$sftp) {
+ $logs[] = $this->error("Échec de l'initialisation du sous-système SFTP");
+ $e = new OscarPCRUException("Échec de l'initialisation du sous-système SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ $logs[] = $this->log("Initialisation du sous-système SFTP réussie");
+
+
+
+
+ $logs[] = $this->log("Ouverture du répertoire " . $repertoireDistant . " sur le serveur SFTP");
+
+ $dir = 'ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/';
+ $files = array();
+ $handle = opendir($dir);
+ if (!$handle) {
+ $logs[] = $this->error("Impossible d'ouvrir le répertoire " . $repertoireDistant . " sur le serveur SFTP.");
+ $e = new OscarPCRUException("Impossible d'ouvrir le répertoire " . $repertoireDistant . " sur le serveur SFTP.");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ $logs[] = $this->log("Ouverture du répertoire " . $repertoireDistant . " réussie");
+
+ $logs[] = $this->log("Parcours des fichiers du répertoire");
+ while (false !== ($file = readdir($handle))) {
+ if(!is_dir($file)){
+ $files[] = $file;
+ }
+ }
+ closedir($handle);
+
+ if (count($files) === 0) {
+
+ $sql = "
+ select
+ pcru.id AS activitypcruinformationsId
+ from
+ activitypcruinformations pcru
+ where
+ pcru.status = ?
+ ";
+ $activitesEnAttenteRetourPCRU = $this->getEntityManager()->getConnection()
+ ->executeQuery($sql,
+ [ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU],
+ ["string"])->fetchAllAssociative();
+
+ if (count($activitesEnAttenteRetourPCRU) !== 0) {
+ $logs[] = $this->error("Le serveur SFTP PCRU ne contient plus aucun fichier alors que certaines activité sont toujours en attente d'un retour de PCRU.");
+ $e = new OscarPCRUException("Le serveur SFTP PCRU ne contient plus aucun fichier alors que certaines activité sont toujours en attente d'un retour de PCRU.");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+
+ } else {
+
+ // Il y a des fichier sur le serveur SFTP, voyons ce que c'est
+
+ // On récupère les fichiers que l'on a déposé pour la dernière fois
+ $sql = "
+ select
+ p.fichiersdeposes
+ from
+ pcruftplog p
+ where
+ p.fichiersdeposes IS NOT NULL
+ order by id desc limit 1
+ ";
+ $fichiersDeposesLines = $this->getEntityManager()->getConnection()
+ ->executeQuery($sql)->fetchAllAssociative();
+
+ $fichiersDeposes = [];
+ if (count($fichiersDeposesLines) === 1) {
+ $fichiersDeposes = explode(",", $fichiersDeposesLines[0]['fichiersdeposes']);
+ }
+
+ foreach ($fichiersDeposes as $fichierDeposé) {
+ if (!in_array($fichierDeposé, $files)) {
+ $logs[] = $this->error("Le serveur SFTP PCRU contient des fichiers, mais il manque l'un de ceux qu'Oscar avait déposé la dernière fois. Vérifiez manuellement le contenu du serveur SFTP.");
+ $e = new OscarPCRUException("Le serveur SFTP PCRU contient des fichiers, mais il manque l'un de ceux qu'Oscar avait déposé la dernière fois. Vérifiez manuellement le contenu du serveur SFTP.");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ }
+
+ if (count($fichiersDeposes) == count($files)) {
+ $logs[] = $this->log("Seuls les fichiers que nous avons déposés la dernière fois sont présents sur le serveur FTP. Nous attendons donc toujours un retour de PCRU.");
+ $logs[] = $this->log("Fin du traitement et fermeture des connexions SFTP");
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+
+ $pcruFtpLog = new PcruFtpLog();
+ $pcruFtpLog->setStatus("succès");
+ $pcruFtpLog->setTitre("Aucun envoi car nous sommes en attente d'un retour PCRU concernant le précédent envoi.");
+ $pcruFtpLog->setDetails(implode("\r\n", $logs));
+ $this->getEntityManager()->persist($pcruFtpLog);
+ $this->getEntityManager()->flush();
+
+ return $logs;
+ }
+
+ if ((count($files) == count($fichiersDeposes) + 1 && in_array($nomFichierRetourPcruOK, $files))
+ || (count($files) == count($fichiersDeposes) + 2 && in_array($nomFichierRetourPcruOK, $files) && in_array($nomFichierRetourPcruOKCsv, $files))) {
+
+ $logs[] = $this->log("Le fichier " . $nomFichierRetourPcruOK . " est présent sur le serveur SFTP, ce qui indique un retour OK de la part de PCRU.");
+
+ // Intégration du fichier qui contient la liste les contrats dont il manque le fichier pdf
+ if (in_array($nomFichierRetourPcruOKCsv, $files)) {
+ $logs[] = $this->log("Cependant, le fichier " . $nomFichierRetourPcruOKCsv . " est présent sur le serveur SFTP, ce qui indique que certains contrats n'ont pas déposé de fichier PDF.");
+
+ $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierRetourPcruOKCsv, 'r');
+ if (!$stream) {
+ $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierRetourPcruOKCsv . " dans le répertoire " . $repertoireDistant . " en lecture sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierRetourPcruOKCsv . " dans le répertoire " . $repertoireDistant . " en lecture sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+
+ $first_line = true;
+ while (($data = fgetcsv($stream, NULL, ";")) !== FALSE) {
+ $reference = $data[0];
+ if ($first_line) {
+ // Remove BOM https://stackoverflow.com/questions/39026992/how-do-i-read-a-utf-csv-file-in-php-with-a-bom
+ $first_line = false;
+ $reference = preg_replace(sprintf('/^%s/', pack('H*','EFBBBF')), "", $data[0]);
+ }
+ $reference = trim($reference);
+
+ if ($reference == "Reference" || mb_strlen($reference) === 0) {
+ continue;
+ }
+
+ $logs[] = $this->log("Mise à jour du statut de l'activité dont la référence est " . $reference . " qui était en attente de retour PCRU. Elle va passer du statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU . " au statut " .ActivityPcruInformations::STATUS_RETOUR_PCRU_OK_MAIS_FICHIER_MANQUANT);
+
+
+ // On cherche l'id correspondant à la référence
+ $sql = "
+ select
+ id,
+ dateenvoifichiercontrat,
+ status
+ from
+ activitypcruinformations
+ where
+ envoireference = ?
+ ";
+ $activitesParReference = $this->getEntityManager()->getConnection()
+ ->executeQuery($sql, [$reference])->fetchAllAssociative();
+
+ $id = NULL;
+ if (count($activitesParReference) === 0) {
+ $logs[] = $this->error("Aucune activitée (activitypcruinformations) trouvée pour la référence " . $reference);
+ continue;
+ } else if (count($activitesParReference) > 1) {
+ $logs[] = $this->error("Plusieur activités (activitypcruinformations) trouvées pour la référence " . $reference);
+ continue;
+ } else {
+ $id = $activitesParReference[0]['id'];
+ if ($activitesParReference[0]['dateenvoifichiercontrat'] != NULL) {
+ $logs[] = $this->error("PCRU indique que le fichier contrat est manquant pour l'activité " . $reference . " alors que nous l'avons bien envoyé. Étrange.");
+ }
+ if ($activitesParReference[0]['status'] != ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU) {
+ $logs[] = $this->error("PCRU indique que le fichier contrat est manquant pour l'activité " . $reference . " alors que nous n'étions pas en attente d'un retour PCRU pour cette activité. Son statut était : " . $activitesParReference[0]['status'] . ". Étrange.");
+ }
+ }
+
+ $now = new \DateTime();
+ $this->getEntityManager()->getConnection()->executeStatement("
+ UPDATE
+ activitypcruinformations
+ SET
+ status = ?,
+ dateretourokmaiscontratmanquant = ?,
+ dateupdated = ?
+ WHERE id = ?;
+ ", [ActivityPcruInformations::STATUS_RETOUR_PCRU_OK_MAIS_FICHIER_MANQUANT, $now, $now, $id], ["string", "datetime", "datetime", "integer"]);
+ }
+
+ $r = fclose($stream);
+ if (!$r) {
+ $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierRetourPcruOKCsv . " sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierRetourPcruOKCsv . " sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ }
+
+ $logs[] = $this->log("Mise à jour du statut des activités envoyées qui étaient en attente de retour PCRU. Elles vont passer du statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU . " au statut " .ActivityPcruInformations::STATUS_RETOUR_PCRU_OK);
+
+ $now = new \DateTime();
+ $nb = $this->getEntityManager()->getConnection()->executeStatement("
+ UPDATE
+ activitypcruinformations
+ SET
+ status = ?,
+ dateretourok = ?,
+ dateupdated = ?
+ WHERE status = ?;
+ ", [ActivityPcruInformations::STATUS_RETOUR_PCRU_OK, $now, $now, ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU], ["string", "datetime", "datetime", "string"]);
+ if ($nb == 0) {
+ $logs[] = $this->log("Aucune activitée n'est passée au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_OK);
+ } else if ($nb == 1) {
+ $logs[] = $this->log("Une activité est passée au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_OK);
+ } else {
+ $logs[] = $this->log($nb . " activités sont passées au statut " . ActivityPcruInformations::STATUS_RETOUR_PCRU_OK);
+ }
+
+ $logs[] = $this->log("Suppression des fichiers présents sur le serveur sftp.");
+
+ foreach ($fichiersDeposes as $fichierDeposé) {
+ $this->supprimerFichier($sftp, $conn, $repertoireDistant, $fichierDeposé, $logs);
+ }
+ $this->supprimerFichier($sftp, $conn, $repertoireDistant, $nomFichierRetourPcruOK, $logs);
+ if (in_array($nomFichierRetourPcruOKCsv, $files)) {
+ $this->supprimerFichier($sftp, $conn, $repertoireDistant, $nomFichierRetourPcruOKCsv, $logs);
+ }
+
+ } else {
+ $logs[] = $this->error("Le serveur SFTP PCRU contient des fichiers inconnus. Vérifiez manuellement le contenu du serveur SFTP.");
+ $e = new OscarPCRUException("Le serveur SFTP PCRU contient des fichiers inconnus. Vérifiez manuellement le contenu du serveur SFTP.");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ }
+
+
+ $logs[] = $this->log("Le répertoire distant ne contient aucun fichier, Oscar peut déposer les activités en attente");
+
+ $logs[] = $this->log("Chargement des activités à envoyer : activités ayant activé l'envoi PCRU et n'ayant encore jamais été envoyées");
+
+ $sql = "
+ select
+ a.id as activityid,
+ pcru.id AS activitypcruinformationsId
+ from
+ activitypcruinformations pcru
+ left join
+ activity a on a.id = pcru.activity_id
+ where
+ pcru.envoiactif is TRUE
+ AND pcru.status = ?
+ order by
+ pcru.dateupdated DESC;
+ ";
+ $activitesAEnvoyer = $this->getEntityManager()->getConnection()
+ ->executeQuery($sql,
+ [ActivityPcruInformations::STATUS_JAMAIS_ENVOYEE],
+ ["string"])->fetchAllAssociative();
+
+ $auMoinsUnFichierPDFAÉtéEnvoyé = false;
+ $fichiersDeposes = [];
+ $activitesAEnvoyerValidesNb = 0;
+
+ $activitesAEnvoyerNb = count($activitesAEnvoyer);
+ if ($activitesAEnvoyerNb == 0) {
+ $logs[] = $this->log("Aucune activité en attente d'envoi.");
+ } else {
+
+ if ($activitesAEnvoyerNb == 1) {
+ $logs[] = $this->log("Une activité à envoyer");
+ } else {
+ $logs[] = $this->log($activitesAEnvoyerNb . " activités à envoyer");
+ }
+
+ $activitesAEnvoyerValides = [];
+
+ foreach ($activitesAEnvoyer as $a) {
+
+ $activity = $this->getEntityManager()
+ ->getRepository(Activity::class)
+ ->findOneBy(array('id' => $a['activityid']));
+
+ $pcruInformationComplete = $this->pcruInformationsService->getPcruInformationsForActivity($activity);
+ if (!$pcruInformationComplete->enErreur) {
+ $a['pcruInformation'] = $pcruInformationComplete->pcruInformation;
+ $a['cheminFichierContrat'] = $pcruInformationComplete->cheminFichierContrat;
+ $activitesAEnvoyerValides[] = $a;
+ }
+ }
+
+ $activitesAEnvoyerValidesNb = count($activitesAEnvoyerValides);
+ $activitesEnErreurNb = $activitesAEnvoyerNb - $activitesAEnvoyerValidesNb;
+ if ($activitesEnErreurNb == 0) {
+ $logs[] = $this->log("Aucune activité n'est en erreur, toutes celles en attente seront envoyées");
+ } else if ($activitesEnErreurNb == 1) {
+ $logs[] = $this->log("Une activité est en erreur et ne sera pas envoyée");
+ } else {
+ $logs[] = $this->log($activitesEnErreurNb . " activités sont en erreur et ne seront pas envoyées");
+ }
+
+ if ($activitesAEnvoyerValidesNb == 0) {
+ $logs[] = $this->log("Aucune activité valide à envoyer");
+ } else {
+
+ if ($activitesAEnvoyerValidesNb == 1) {
+ $logs[] = $this->log("Une activité valide sera envoyée");
+ } else {
+ $logs[] = $this->log($activitesAEnvoyerValidesNb . " activités valides seront envoyées");
+ }
+
+ $logs[] = $this->log("Ouverture du fichier " . $nomFichierContrats . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP");
+
+ $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierContrats, 'w');
+ if (!$stream) {
+ $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierContrats . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierContrats . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+
+ $logs[] = $this->log("Écriture des en-têtes du fichier CSV");
+
+ $r = fputcsv($stream, ['Objet', 'CodeUniteLabintel', 'SigleUnite', 'NumContratTutelleGestionnaire', 'Equipe', 'TypeContrat', 'Acronyme', 'ContratsAssocies', 'ResponsableScientifique', 'EmployeurResponsableScientifique', 'CoordinateurConsortium', 'Partenaires', 'PartenairePrincipal', 'IdPartenairePrincipal', 'SourceFinancement', 'LieuExecution', 'DateDerniereSignature', 'Duree', 'DateDebut', 'DateFin', 'MontantPercuUnite', 'CoutTotalEtude', 'MontantTotal', 'ValidePoleCompetitivite', 'PoleCompetitivite', 'Commentaires', 'PIA', 'Reference', 'AccordCadre', 'Cifre', 'ChaireIndustrielle', 'PresencePartenaireIndustriel'], ';');
+ if (!$r) {
+ $logs[] = $this->error("Impossible d'écrire dans le fichier " . $nomFichierContrats . " sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible d'écrire dans le fichier " . $nomFichierContrats . " sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+
+ $logs[] = $this->log("Écriture des activités");
+ foreach ($activitesAEnvoyerValides as $a) {
+ $line = [];
+ $line[] = $a['pcruInformation']->objet;
+ $line[] = $a['pcruInformation']->labintel;
+ $line[] = $a['pcruInformation']->sigle;
+ $line[] = $a['pcruInformation']->numContrat;
+ $line[] = $a['pcruInformation']->equipe;
+ $line[] = $a['pcruInformation']->typeContrat;
+ $line[] = $a['pcruInformation']->acronyme;
+ $line[] = $a['pcruInformation']->contratsAssocies;
+ $line[] = $a['pcruInformation']->responsableScientifique;
+ $line[] = $a['pcruInformation']->employeurResponsableScientifique;
+ $line[] = $a['pcruInformation']->coordinateurConsortium === NULL ? NULL : ($a['pcruInformation']->coordinateurConsortium ? "True" : "False");
+ $line[] = $a['pcruInformation']->partenaires;
+ $line[] = $a['pcruInformation']->partenairePrincipal;
+ $line[] = $a['pcruInformation']->idPartenairePrincipal;
+ $line[] = $a['pcruInformation']->sourceFinancement;
+ $line[] = $a['pcruInformation']->lieuExecution;
+ $line[] = $a['pcruInformation']->dateDerniereSignature;
+ $line[] = $a['pcruInformation']->duree;
+ $line[] = $a['pcruInformation']->dateDebut;
+ $line[] = $a['pcruInformation']->dateFin;
+ $line[] = $a['pcruInformation']->montantPercuUnite;
+ $line[] = $a['pcruInformation']->coutTotalEtude;
+ $line[] = $a['pcruInformation']->montantTotal;
+ $line[] = $a['pcruInformation']->validePoleCompetitivite ? 'True' : 'False';
+ $line[] = $a['pcruInformation']->poleCompetitivite;
+ $line[] = $a['pcruInformation']->commentaires;
+ $line[] = $a['pcruInformation']->pia === NULL ? NULL : ($a['pcruInformation']->pia ? "True" : "False");
+ $line[] = $a['pcruInformation']->reference;
+ $line[] = $a['pcruInformation']->accordCadre === NULL ? NULL : ($a['pcruInformation']->accordCadre ? "True" : "False");
+ $line[] = $a['pcruInformation']->cifre ? 'True' : 'False';
+ $line[] = $a['pcruInformation']->chaireIndustrielle === NULL ? NULL : ($a['pcruInformation']->chaireIndustrielle ? "True" : "False");
+ $line[] = $a['pcruInformation']->presencePartenaireIndustriel === NULL ? NULL : ($a['pcruInformation']->presencePartenaireIndustriel ? "True" : "False");
+ $r = fputcsv($stream, $line, ';');
+ if (!$r) {
+ $logs[] = $this->error("Impossible d'écrire dans le fichier " . $nomFichierContrats . " sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible d'écrire dans le fichier " . $nomFichierContrats . " sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+
+ $nb = $this->getEntityManager()->getConnection()->executeStatement("
+ UPDATE
+ activitypcruinformations
+ SET
+ envoiobjet = ?,
+ envoilabintel = ?,
+ envoisigle = ?,
+ envoinumcontrat = ?,
+ envoiequipe = ?,
+ envoitypecontrat = ?,
+ envoiacronyme = ?,
+ envoicontratsassocies = ?,
+ envoiresponsablescientifique = ?,
+ envoiemployeurresponsablescientifique = ?,
+ envoicoordinateurconsortium = ?,
+ envoipartenaires = ?,
+ envoipartenaireprincipal = ?,
+ envoiidpartenaireprincipal = ?,
+ envoisourcefinancement = ?,
+ envoilieuexecution = ?,
+ envoidatedernieresignature = ?,
+ envoiduree = ?,
+ envoidatedebut = ?,
+ envoidatefin = ?,
+ envoimontantpercuunite = ?,
+ envoicouttotaletude = ?,
+ envoimontanttotal = ?,
+ envoivalidepolecompetitivite = ?,
+ envoipolecompetitivite = ?,
+ envoicommentaires = ?,
+ envoipia = ?,
+ envoireference = ?,
+ envoiaccordcadre = ?,
+ envoicifre = ?,
+ envoichaireindustrielle = ?,
+ envoipresencepartenaireindustriel = ?
+ WHERE id = ?;
+ ", [$a['pcruInformation']->objet,
+ $a['pcruInformation']->labintel,
+ $a['pcruInformation']->sigle,
+ $a['pcruInformation']->numContrat,
+ $a['pcruInformation']->equipe,
+ $a['pcruInformation']->typeContrat,
+ $a['pcruInformation']->acronyme,
+ $a['pcruInformation']->contratsAssocies,
+ $a['pcruInformation']->responsableScientifique,
+ $a['pcruInformation']->employeurResponsableScientifique,
+ $a['pcruInformation']->coordinateurConsortium === NULL ? NULL : ($a['pcruInformation']->coordinateurConsortium ? "True" : "False"),
+ $a['pcruInformation']->partenaires,
+ $a['pcruInformation']->partenairePrincipal,
+ $a['pcruInformation']->idPartenairePrincipal,
+ $a['pcruInformation']->sourceFinancement,
+ $a['pcruInformation']->lieuExecution,
+ $a['pcruInformation']->dateDerniereSignature,
+ $a['pcruInformation']->duree,
+ $a['pcruInformation']->dateDebut,
+ $a['pcruInformation']->dateFin,
+ $a['pcruInformation']->montantPercuUnite,
+ $a['pcruInformation']->coutTotalEtude,
+ $a['pcruInformation']->montantTotal,
+ $a['pcruInformation']->validePoleCompetitivite ? 'True' : 'False',
+ $a['pcruInformation']->poleCompetitivite,
+ $a['pcruInformation']->commentaires,
+ $a['pcruInformation']->pia === NULL ? NULL : ($a['pcruInformation']->pia ? "True" : "False"),
+ $a['pcruInformation']->reference,
+ $a['pcruInformation']->accordCadre === NULL ? NULL : ($a['pcruInformation']->accordCadre ? "True" : "False"),
+ $a['pcruInformation']->cifre ? 'True' : 'False',
+ $a['pcruInformation']->chaireIndustrielle === NULL ? NULL : ($a['pcruInformation']->chaireIndustrielle ? "True" : "False"),
+ $a['pcruInformation']->presencePartenaireIndustriel === NULL ? NULL : ($a['pcruInformation']->presencePartenaireIndustriel ? "True" : "False"),
+ $a['activitypcruinformationsid']]);
+ }
+
+ $logs[] = $this->log("Fermeture du fichier");
+ $r = fclose($stream);
+ if (!$r) {
+ $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierContrats . " sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierContrats . " sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ $fichiersDeposes[] = $nomFichierContrats;
+
+
+
+ if ($activitesAEnvoyerValidesNb == 1) {
+ $logs[] = $this->log("Une activité a été envoyée");
+ } else {
+ $logs[] = $this->log($activitesAEnvoyerValidesNb . " activités ont été envoyées");
+ }
+
+ $logs[] = $this->log("Création du fichier marqueur contrats OK : " . $nomFichierContratsDeposesOK);
+ $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierContratsDeposesOK, 'w');
+ if (!$stream) {
+ $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierContratsDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierContratsDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+
+ $logs[] = $this->log("Fermeture du fichier marqueur contrats OK");
+ $r = fclose($stream);
+ if (!$r) {
+ $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierContratsDeposesOK . " sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierContratsDeposesOK . " sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ $fichiersDeposes[] = $nomFichierContratsDeposesOK;
+
+
+ $logs[] = $this->log("Mise à jour du statut des activités envoyées");
+
+ $ids = [];
+ foreach ($activitesAEnvoyerValides as $a) {
+ $ids[] = $a['activitypcruinformationsid'];
+ }
+ $now = new \DateTime();
+ $nb = $this->getEntityManager()->getConnection()->executeStatement("
+ UPDATE
+ activitypcruinformations
+ SET
+ status = ?,
+ dateupdated = ?,
+ datepremierdepot = ?
+ WHERE id IN (?);
+ ", [ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU, $now, $now, $ids], ["string", "datetime", "datetime", \Doctrine\DBAL\ArrayParameterType::INTEGER]);
+ if ($nb == 0) {
+ $logs[] = $this->log("Aucune activité n'est passée au statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU . ". Très étrange.");
+ } else if ($nb == 1) {
+ $logs[] = $this->log("Une activité est passée au statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU);
+ } else {
+ $logs[] = $this->log($nb . " activités sont passées au statut " . ActivityPcruInformations::STATUS_ENVOYEE_ATTENTE_RETOUR_PCRU);
+ }
+
+ /* Contrats signés PDF documents */
+ $logs[] = $this->log("Envoi des documents PDF de contrats signés");
+ foreach ($activitesAEnvoyerValides as $a) {
+ if (!$a['cheminFichierContrat']) {
+ $logs[] = $this->log("Envoi du PDF impossible pour l'activité " . $a['pcruInformation']->reference . " car elle n'a pas de PDF de contrat signé");
+ continue;
+ }
+
+ $pdfFileName = $this->envoyerUnDocumentPDFContrat($sftp, $conn, $a['cheminFichierContrat'], $repertoireDistant, $a['activitypcruinformationsid'], $a['pcruInformation']->reference, $logs);
+
+ $fichiersDeposes[] = $pdfFileName;
+ $auMoinsUnFichierPDFAÉtéEnvoyé = true;
+ }
+ }
+ }
+
+ $logs[] = $this->log("Envoi des documents PDF qui étaient manquant lors de précédents envois et indiqués par PCRU comme manquants");
+ $sql = "
+ select
+ id as activitypcruinformationsid,
+ activity_id,
+ envoireference
+ from
+ activitypcruinformations
+ where
+ dateenvoifichiercontrat IS NULL
+ AND status = ?
+ ";
+ $activitesAvecContratARenvoyer = $this->getEntityManager()->getConnection()
+ ->executeQuery($sql, [ActivityPcruInformations::STATUS_RETOUR_PCRU_OK_MAIS_FICHIER_MANQUANT])->fetchAllAssociative();
+
+ if (count($activitesAvecContratARenvoyer) == 0) {
+ $logs[] = $this->log("Aucun document manquant à envoyer.");
+ } else {
+ $logs[] = $this->log(count($activitesAvecContratARenvoyer) . " activités marquées comme ayant un document manquant. Pour chacune, on vérifie si le document est maintenant présent et si oui on l'envoi à PCRU.");
+ }
+
+ foreach ($activitesAvecContratARenvoyer as $a) {
+
+ $activity = $this->getEntityManager()
+ ->getRepository(Activity::class)
+ ->findOneBy(array('id' => $a['activity_id']));
+
+ // Document signé
+ $typeDocumentSigne = $this->getOscarConfigurationService()->getPcruContractType();
+ $logs[] = $this->log("Recherche du document de type " . $typeDocumentSigne . " pour l'activité ayant pour référence " . $activity->getOscarNum());
+
+ $documentsSigne = [];
+ /** @var ContractDocument $document */
+ foreach ($activity->getDocuments() as $document) {
+ if ($document->getTypeDocument()->getLabel() == $typeDocumentSigne) {
+ // Test sur les versions
+ if (count($documentsSigne) > 0) {
+ // On regarde si on est pas entrain de parser une ancienne version du fichier
+ if ($documentsSigne[0]->getFileName() == $document->getFileName()) {
+ continue;
+ }
+ }
+ $documentsSigne[] = $document;
+ }
+ }
+ if (count($documentsSigne) > 1) {
+ $logs[] = $this->error("Impossible de déterminer automatiquement le fichier PDF de contrat signé à envoyer car il y a plusieurs documents de type '$typeDocumentSigne' sur cette activité");
+ continue;
+ } else if (count($documentsSigne) == 0) {
+ $logs[] = $this->log("Impossible d'envoyer le fichier PDF de contrat signé car l'activité n'a aucun document de type '$typeDocumentSigne'");
+ continue;
+ } else {
+ $fichiersDeposes[] = $this->envoyerUnDocumentPDFContrat($sftp, $conn, $documentsSigne[0]->getPath(), $repertoireDistant, $a['activitypcruinformationsid'], $a['envoireference'], $logs);
+ $auMoinsUnFichierPDFAÉtéEnvoyé = true;
+ }
+ }
+
+ if ($auMoinsUnFichierPDFAÉtéEnvoyé) {
+ $logs[] = $this->log("Création du fichier marqueur fichiers PDF contrats OK : " . $nomFichierDocumentsContratsPDFDeposesOK);
+ $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $nomFichierDocumentsContratsPDFDeposesOK, 'w');
+ if (!$stream) {
+ $logs[] = $this->error("Impossible d'ouvrir le fichier " . $nomFichierDocumentsContratsPDFDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $nomFichierDocumentsContratsPDFDeposesOK . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+
+ $logs[] = $this->log("Fermeture du fichier marqueur fichiers PDF contrats OK");
+ $r = fclose($stream);
+ if (!$r) {
+ $logs[] = $this->error("Impossible de fermer le fichier " . $nomFichierDocumentsContratsPDFDeposesOK . " sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible de fermer le fichier " . $nomFichierDocumentsContratsPDFDeposesOK . " sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ $fichiersDeposes[] = $nomFichierDocumentsContratsPDFDeposesOK;
+ }
+
+
+
+ $logs[] = $this->log("Fin du traitement, fermeture des connexions SFTP");
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+
+ $pcruFtpLog = new PcruFtpLog();
+ $pcruFtpLog->setStatus("succès");
+ if ($activitesAEnvoyerValidesNb == 1) {
+ $pcruFtpLog->setTitre("Une activité a été envoyée");
+ } else {
+ $pcruFtpLog->setTitre($activitesAEnvoyerValidesNb . " activités ont été envoyées");
+ }
+ $pcruFtpLog->setDetails(implode("\r\n", $logs));
+ $pcruFtpLog->fichiersDeposes = implode(",", $fichiersDeposes);
+ $this->getEntityManager()->persist($pcruFtpLog);
+ $this->getEntityManager()->flush();
+
+ return $logs;
+
+ } catch (OscarPCRUException $e) {
+
+ $pcruFtpLog = new PcruFtpLog();
+ $pcruFtpLog->setStatus("erreur");
+ $pcruFtpLog->setTitre($e->getMessage());
+ if (count($e->details) > 0) {
+ $pcruFtpLog->setTitre($e->details[count($e->details) - 1]);
+ }
+ $pcruFtpLog->setDetails(implode("\r\n", $e->details));
+ $this->getEntityManager()->persist($pcruFtpLog);
+ $this->getEntityManager()->flush();
+ throw $e;
+
+ } catch (\Exception $e) {
+
+ $pcruFtpLog = new PcruFtpLog();
+ $pcruFtpLog->setStatus("erreur");
+ $pcruFtpLog->setTitre($e->getMessage());
+ $pcruFtpLog->setDetails(implode("\r\n", $logs));
+ $this->getEntityManager()->persist($pcruFtpLog);
+ $this->getEntityManager()->flush();
+
+ throw $e;
+ } catch (Throwable $e) {
+
+ $pcruFtpLog = new PcruFtpLog();
+ $pcruFtpLog->setStatus("erreur");
+ $pcruFtpLog->setTitre($e->getMessage());
+ $pcruFtpLog->setDetails(implode("\r\n", $logs));
+ $this->getEntityManager()->persist($pcruFtpLog);
+ $this->getEntityManager()->flush();
+
+ throw $e;
+ }
+ }
+
+ private function envoyerUnDocumentPDFContrat($sftp, $conn, $cheminFichierLocalDansDocumentDropLocation, $repertoireDistant, $activityPcruInformationsId, $reference, &$logs) {
+ $docpath = $this->getOscarConfigurationService()->getDocumentDropLocation()
+ . DIRECTORY_SEPARATOR
+ . $cheminFichierLocalDansDocumentDropLocation;
+
+ $pdfFileName = $reference . '.pdf';
+
+ $logs[] = $this->log("Envoi du fichier " . $cheminFichierLocalDansDocumentDropLocation . ", renommé en " . $pdfFileName );
+
+ $stream = fopen('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $pdfFileName, 'w');
+ if (!$stream) {
+ $logs[] = $this->error("Impossible d'ouvrir le fichier " . $pdfFileName . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible d'ouvrir le fichier " . $pdfFileName . " dans le répertoire " . $repertoireDistant . " en écriture sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+
+ $r = fwrite($stream, file_get_contents($docpath));
+ if (!$r) {
+ $logs[] = $this->error("Impossible d'écrire dans le fichier " . $pdfFileName . " sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible d'écrire dans le fichier " . $pdfFileName . " sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+
+ $r = fclose($stream);
+ if (!$r) {
+ $logs[] = $this->error("Impossible de fermer le fichier " . $pdfFileName . " sur le serveur SFTP");
+ $e = new OscarPCRUException("Impossible de fermer le fichier " . $pdfFileName . " sur le serveur SFTP");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ $fichiersDeposes[] = $pdfFileName;
+ $logs[] = $this->log("Envoi du fichier " . $cheminFichierLocalDansDocumentDropLocation . ", renommé en " . $pdfFileName . " réussi");
+
+
+ $now = new \DateTime();
+ $nb = $this->getEntityManager()->getConnection()->executeStatement("
+ UPDATE
+ activitypcruinformations
+ SET
+ dateenvoifichiercontrat = ?
+ WHERE id = ?;
+ ", [$now, $activityPcruInformationsId], ["datetime", "integer"]);
+ if ($nb == 0) {
+ $logs[] = $this->log("dateEnvoiFichierContrat mise à jour pour aucune activitée. Étrange.");
+ } else if ($nb == 1) {
+ $logs[] = $this->log("dateEnvoiFichierContrat mise à jour pour une activité.");
+ } else {
+ $logs[] = $this->log($nb . " activités ont eu leur dateEnvoiFichierContrat mise à jour. Étrange.");
+ }
+
+ return $pdfFileName;
+ }
+
+ private function supprimerFichier($sftp, $conn, $repertoireDistant, $fichier, &$logs) {
+ $logs[] = $this->log("Suppression du fichier " . $fichier);
+ $result = unlink('ssh2.sftp://' . intval($sftp) . $repertoireDistant . '/' . $fichier);
+ if (!$result) {
+ $logs[] = $this->error("Impossible de supprimer le fichier " . $fichier . " sur le serveur SFTP.");
+ $e = new OscarPCRUException("Impossible de supprimer le fichier " . $fichier . " sur le serveur SFTP.");
+ $e->details = $logs;
+ ssh2_disconnect($sftp);
+ ssh2_disconnect($conn);
+ throw $e;
+ }
+ }
+
+ protected function getConfiguration()
+ {
+ return $this->getOscarConfigurationService()->getPcruFtpInfos();
+ }
+
+ protected function log( string $msg ): string
+ {
+ $this->getLoggerService()->info(sprintf('[process pcru - info] %s', $msg), []);
+ $this->logPool($msg);
+ return '[INFO] ' . $msg;
+ }
+
+ protected function error( string $msg ): string
+ {
+ $this->getLoggerService()->error(sprintf('[process pcru - erro] %s', $msg), []);
+ $this->logPool("Erreur : '". $msg . "'");
+ return '[ERREUR] ' . $msg;
+ }
+
+ private $_logpool;
+
+ public function logPool(string $message): void
+ {
+ if ($this->_logpool == null) {
+ $this->_logpool = fopen($this->getOscarConfigurationService()->getPcruLogPoolFile(), 'w');
+ }
+ $msg = sprintf("%s \t%s\n", date('Y-m-d h:i:s'), $message);
+ fwrite($this->_logpool, $msg);
+ }
+
+ public function __destruct()
+ {
+ if ($this->_logpool) {
+ fclose($this->_logpool);
+ }
+ }
+}
diff --git a/module/Oscar/src/Oscar/Service/PcruFtpServiceFactory.php b/module/Oscar/src/Oscar/Service/PcruFtpServiceFactory.php
new file mode 100644
index 000000000..f26da5073
--- /dev/null
+++ b/module/Oscar/src/Oscar/Service/PcruFtpServiceFactory.php
@@ -0,0 +1,20 @@
+setOscarConfigurationService($container->get(OscarConfigurationService::class));
+ $s->setEntityManager($container->get(EntityManager::class));
+ $s->setLoggerService($container->get('Logger'));
+ $s->setPcruInformationsService($container->get(PcruInformationsService::class));
+ return $s;
+ }
+}
diff --git a/module/Oscar/src/Oscar/Service/PcruInformation.php b/module/Oscar/src/Oscar/Service/PcruInformation.php
new file mode 100644
index 000000000..d3d17259e
--- /dev/null
+++ b/module/Oscar/src/Oscar/Service/PcruInformation.php
@@ -0,0 +1,177 @@
+oscarConfigurationService;
+ }
+
+ /**
+ * @param OscarConfigurationService $oscarConfigurationService
+ */
+ public function setOscarConfigurationService(OscarConfigurationService $oscarConfigurationService): void
+ {
+ $this->oscarConfigurationService = $oscarConfigurationService;
+ }
+
+ /**
+ *
+ * @param Activity $activity
+ */
+ public function getPcruInformationsForActivity(Activity $activity): PcruInformationComplete
+ {
+ if (!$activity) {
+ throw new \Exception("L'activité demandée n'existe pas. Veuillez actualiser la page.");
+ }
+
+ $typesContrat = $this->entityManager->getRepository(PcruTypeContract::class)->findAll();
+ $pcruInformationParDefaut = $this->getPcruInformationParDefaut($activity, $typesContrat);
+
+ $activityPcruInformations = $activity->getPcruInformations();
+ if ($activityPcruInformations == null) {
+ $activityPcruInformations = new ActivityPcruInformations();
+ }
+ $pasParDefautErreurs = $this->validatePasParDefaut($activityPcruInformations);
+
+ $pcruInformation = new PcruInformation();
+ $pcruInformation->objet = $activityPcruInformations->isUtiliserObjetParDefaut() ? $pcruInformationParDefaut->objet : $activityPcruInformations->getObjet();
+ $pcruInformation->labintel = $activityPcruInformations->isUtiliserLabintelParDefaut() ? $pcruInformationParDefaut->labintel : $activityPcruInformations->getLabintel();
+ $pcruInformation->sigle = $activityPcruInformations->isUtiliserSigleParDefaut() ? $pcruInformationParDefaut->sigle : $activityPcruInformations->getSigle();
+ $pcruInformation->numContrat = $activityPcruInformations->isUtiliserNumContratParDefaut() ? $pcruInformationParDefaut->numContrat : $activityPcruInformations->getNumContrat();
+ $pcruInformation->equipe = $activityPcruInformations->getEquipe();
+ $pcruInformation->typeContrat = $activityPcruInformations->isUtiliserTypeContratParDefaut() ? $pcruInformationParDefaut->typeContratLabel : ($activityPcruInformations->getPcruTypeContract() == NULL ? NULL : $activityPcruInformations->getPcruTypeContract()->getLabel());
+ $pcruInformation->acronyme = $activityPcruInformations->isUtiliserAcronymeParDefaut() ? $pcruInformationParDefaut->acronyme : $activityPcruInformations->getAcronyme();
+ $pcruInformation->contratsAssocies = $activityPcruInformations->getContratsAssocies();
+ $pcruInformation->responsableScientifique = $activityPcruInformations->isUtiliserResponsableScientifiqueParDefaut() ? $pcruInformationParDefaut->responsableScientifique : $activityPcruInformations->getResponsableScientifique();
+ $pcruInformation->employeurResponsableScientifique = $activityPcruInformations->getEmployeurResponsableScientifique();
+ $pcruInformation->coordinateurConsortium = $activityPcruInformations->isCoordinateurConsortium();
+ $pcruInformation->partenaires = $activityPcruInformations->isUtiliserPartenairesParDefaut() ? $pcruInformationParDefaut->partenaires : $activityPcruInformations->getPartenaires();
+ $pcruInformation->partenairePrincipal = $activityPcruInformations->isUtiliserPartenairePrincipalParDefaut() ? $pcruInformationParDefaut->partenairePrincipal : $activityPcruInformations->getPartenairePrincipal();
+ $pcruInformation->idPartenairePrincipal = $activityPcruInformations->isUtiliserIdPartenairePrincipalParDefaut() ? $pcruInformationParDefaut->idPartenairePrincipal : $activityPcruInformations->getIdPartenairePrincipal();
+ $pcruInformation->sourceFinancement = $pcruInformationParDefaut->sourceFinancement;
+ $pcruInformation->lieuExecution = $activityPcruInformations->getLieuExecution();
+ $pcruInformation->dateDerniereSignature = $activityPcruInformations->isUtiliserDateDerniereSignatureParDefaut() ? $pcruInformationParDefaut->dateDerniereSignature : $activityPcruInformations->getDateDerniereSignature();
+ $pcruInformation->duree = $activityPcruInformations->getDuree();
+ $pcruInformation->dateDebut = $activityPcruInformations->isUtiliserDateDebutParDefaut() ? $pcruInformationParDefaut->dateDebut : $activityPcruInformations->getDateDebut();
+ $pcruInformation->dateFin = $activityPcruInformations->isUtiliserDateFinParDefaut() ? $pcruInformationParDefaut->dateFin : $activityPcruInformations->getDateFin();
+ $pcruInformation->montantPercuUnite = $activityPcruInformations->getMontantPercuUnite();
+ $pcruInformation->coutTotalEtude = $activityPcruInformations->getCoutTotalEtude();
+ $pcruInformation->montantTotal = $activityPcruInformations->isUtiliserMontantTotalParDefaut() ? $pcruInformationParDefaut->montantTotal : $activityPcruInformations->getMontantTotal();
+ $pcruInformation->montantTotalDevise = $activityPcruInformations->isUtiliserMontantTotalParDefaut() ? $pcruInformationParDefaut->montantTotalDevise : 'Euro';
+ $pcruInformation->validePoleCompetitivite = $pcruInformationParDefaut->validePoleCompetitivite;
+ $pcruInformation->poleCompetitivite = $pcruInformationParDefaut->poleCompetitivite;
+ $pcruInformation->commentaires = $activityPcruInformations->getCommentaires();
+ $pcruInformation->pia = $activityPcruInformations->isPia();
+ $pcruInformation->reference = $activityPcruInformations->isUtiliserReferenceParDefaut() ? $pcruInformationParDefaut->reference : $activityPcruInformations->getReference();
+ $pcruInformation->accordCadre = $activityPcruInformations->isAccordCadre();
+ $pcruInformation->cifre = $activityPcruInformations->isCifre();
+ $pcruInformation->chaireIndustrielle = $activityPcruInformations->isChaireIndustrielle();
+ $pcruInformation->presencePartenaireIndustriel = $activityPcruInformations->isPresencePartenaireIndustriel();
+
+ $erreurs = $this->validate($pcruInformation);
+
+ // Erreurs concernant deux champs, un par défaut et un pas par défaut
+ if ($pcruInformation->duree === NULL && $activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($pcruInformationParDefaut->dateFin)) == 0) {
+ $pcruInformationParDefaut->dateFinErreurs[] = "Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être.";
+ $pasParDefautErreurs['dureeErreurs'][] = "Si la date de fin du contrat n'est pas renseignée, alors le champ Duree doit l'être.";
+ }
+
+ if ($activityPcruInformations->isUtiliserDateDebutParDefaut() && count($pcruInformationParDefaut->dateDebutErreurs) == 0 && !$activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($activityPcruInformations->getDateFin())) != 0 && count($pasParDefautErreurs['dateFinErreurs']) == 0) {
+ $debut = \DateTime::createFromFormat('d-m-Y', $pcruInformationParDefaut->dateDebut);
+ $fin = \DateTime::createFromFormat('d-m-Y', $activityPcruInformations->getDateFin());
+ if ($fin < $debut) {
+ $pasParDefautErreurs['dateFinErreurs'][] = "La date de fin doit être postérieure à la date de début";
+ }
+ }
+ if (!$activityPcruInformations->isUtiliserDateDebutParDefaut() && count($pasParDefautErreurs['dateDebutErreurs']) == 0 && $activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($pcruInformationParDefaut->dateFin)) != 0 && count($pcruInformationParDefaut->dateFinErreurs) == 0) {
+ $debut = \DateTime::createFromFormat('d-m-Y', $activityPcruInformations->getDateDebut());
+ $fin = \DateTime::createFromFormat('d-m-Y', $pcruInformationParDefaut->dateFin);
+ if ($fin < $debut) {
+ $pcruInformationParDefaut->dateFinErreurs[] = "La date de fin doit être postérieure à la date de début";
+ }
+ }
+
+ $pcruInformationComplete = new PcruInformationComplete();
+ $pcruInformationComplete->pcruInformationParDefaut = $pcruInformationParDefaut;
+ $pcruInformationComplete->activityPcruInformations = array_merge($activityPcruInformations->toArray(), $pasParDefautErreurs);
+ $pcruInformationComplete->pcruInformation = $pcruInformation;
+ $pcruInformationComplete->erreurs = $erreurs;
+ $pcruInformationComplete->enErreur = count($erreurs) > 0;
+
+ $pcruInformationComplete->unitRoles = $this->getOscarConfigurationService()->getPcruUnitRoles();
+
+ $pcruInformationComplete->typesContrat = [];
+ foreach ($typesContrat as $typeContrat) {
+ $pcruInformationComplete->typesContrat[] = ['id' => $typeContrat->getId(), 'label' => $typeContrat->getLabel()];
+ }
+
+ $pcruInformationComplete->roleResponsableScientifique = $this->getOscarConfigurationService()->getPcruInChargeRole();
+
+ $pcruInformationComplete->rolesPartenaires = $this->getOscarConfigurationService()->getPcruPartnerRoles();
+ $pcruInformationComplete->rolesPartenairePrincipal = $this->getOscarConfigurationService()->getPcruPartenairePrincipalRoles();
+
+ // Document signé
+ $typeDocumentSigne = $this->getOscarConfigurationService()->getPcruContractType();
+ $documentSigne = NULL;
+ /** @var ContractDocument $document */
+ foreach ($activity->getDocuments() as $document) {
+ if ($document->getTypeDocument()->getLabel() == $typeDocumentSigne) {
+ // Test sur les versions
+ if ($documentSigne != null) {
+ // On regarde si on est pas entrain de parser une ancienne version du fichier
+ if ($documentSigne->getFileName() == $document->getFileName()) {
+ continue;
+ }
+ $pcruInformationComplete->avertissementFichierContratManquant = "Impossible de déterminer automatiquement le fichier PDF de contrat signé à envoyer car il y a plusieurs documents de type '$typeDocumentSigne' sur cette activité";
+ } else {
+ $documentSigne = $document;
+ }
+ }
+ }
+ if (!$documentSigne) {
+ $pcruInformationComplete->avertissementFichierContratManquant = "Impossible de déterminer automatiquement le fichier PDF de contrat signé à envoyer car l'activité n'a aucun document de type '$typeDocumentSigne'";
+ } else {
+ $pcruInformationComplete->cheminFichierContrat = $documentSigne->getPath();
+ }
+
+ return $pcruInformationComplete;
+ }
+
+ private function getPcruInformationParDefaut(Activity $activity, $typesContrat): PcruInformationParDefaut {
+ $pcruInformationParDefaut = new PcruInformationParDefaut();
+
+ $pcruInformationParDefaut->objet = $activity->getLabel();
+
+ $pcruUnitRoles = $this->getOscarConfigurationService()->getPcruUnitRoles();
+ if (count($pcruUnitRoles) === 0) {
+ throw new \Exception("Veuillez renseigner dans la configuration la clé pcru_unit_roles. Cette clé décrit une liste de rôles (le plus souvent 'Laboratoire') que peuvent avoir les unité PCRU lorsque ces organisations sont liées à des activités. C'est ce qui nous permet de récupérer automatiquement les valeurs par défaut à envoyer à PCRU. Sinon les valeurs doivent être saisies à la main.");
+ }
+
+ $pcruUnits = $activity->getOrganizationsWithOneRoleIn($pcruUnitRoles);
+
+ if (count($pcruUnits) == 0) {
+ $pcruInformationParDefaut->unitePcruParDefautErreur = "Impossible de déterminer automatiquement une organisation (unité) PCRU par défaut car l'activité n'a aucun partenaire de type (" . implode(', ', $pcruUnitRoles) . ")";
+ } else if (count($pcruUnits) == 1) {
+ if ($pcruUnits[0]->getLabintel() != null && trim($pcruUnits[0]->getLabintel()) !== '') {
+ $pcruInformationParDefaut->labintel = $pcruUnits[0]->getLabintel();
+ $pcruInformationParDefaut->sigle = $pcruUnits[0]->getShortName();
+ } else {
+ $pcruInformationParDefaut->labintelParDefautErreur = "Impossible de déterminer automatiquement un code labintel par défaut car l'organisation " . $pcruUnits[0]->fullOrShortName() . " n'en a pas de renseigné.";
+ $pcruInformationParDefaut->sigle = $pcruUnits[0]->getShortName();
+ }
+ } else {
+ $organisationAvecUnCodeLabintel = [];
+ foreach ($pcruUnits as $pcruUnit) {
+ if ($pcruUnit->getLabintel() != null && trim($pcruUnit->getLabintel()) !== '') {
+ $organisationAvecUnCodeLabintel[] = $pcruUnit;
+ }
+ }
+ if (count($organisationAvecUnCodeLabintel) === 0) {
+ $pcruInformationParDefaut->unitePcruParDefautErreur = "Impossible de déterminer automatiquement une organisation (unité) PCRU par défaut car aucun des partenaires de type (" . implode(', ', $pcruUnitRoles) . ") de l'activité n'a de code labintel de renseigné";
+ } else if (count($organisationAvecUnCodeLabintel) === 1) {
+ $pcruInformationParDefaut->labintel = $organisationAvecUnCodeLabintel[0]->getLabintel();
+ $pcruInformationParDefaut->sigle = $organisationAvecUnCodeLabintel[0]->getShortName();
+ } else {
+ $pcruInformationParDefaut->unitePcruParDefautErreur = "Impossible de déterminer automatiquement une organisation (unité) PCRU par défaut car plusieurs partenaires de type (" . implode(', ', $pcruUnitRoles) . ") de l'activité ont un code labintel de renseigné.";
+ }
+ }
+
+ $pcruInformationParDefaut->numContrat = $activity->getOscarNum();
+
+ $activityType = $activity->getActivityType();
+ if ($activityType == NULL) {
+ $pcruInformationParDefaut->typeContratParDefautErreur = "Impossible de déterminer automatiquement le type de contrat car l'activité n'a pas de type";
+ } else {
+ $typeContratParDefaut = [];
+ $typeContratParDefautToString = "";
+ foreach ($typesContrat as $typeContrat) {
+ if ($typeContrat->getActivityType() && $typeContrat->getActivityType()->getId() === $activityType->getId()) {
+ $typeContratParDefaut[] = $typeContrat;
+ if ($typeContratParDefautToString != "") {
+ $typeContratParDefautToString .= ", ";
+ }
+ $typeContratParDefautToString .= "[" . $typeContrat->getId() . "] " . $typeContrat->getLabel();
+ }
+ }
+ if (count($typeContratParDefaut) == 0) {
+ $pcruInformationParDefaut->typeContratParDefautErreur = "Impossible de déterminer automatiquement le type de contrat PCRU car aucune correspondance n'a été configurée pour le type de l'activité (" . $activityType->getLabel() . ")";
+ } else if (count($typeContratParDefaut) == 1) {
+ $pcruInformationParDefaut->typeContratId = $typeContratParDefaut[0]->getId();
+ $pcruInformationParDefaut->typeContratLabel = $typeContratParDefaut[0]->getLabel();
+ } else {
+ $pcruInformationParDefaut->typeContratParDefautErreur = "Impossible de déterminer automatiquement le type de contrat PCRU car plusieurs correspondances PCRU (" . $typeContratParDefautToString . ") ont été configurées pour le type de l'activité dans Oscar (" . $activityType->getLabel() . ")";
+ }
+ }
+
+ $pcruInformationParDefaut->acronyme = $activity->getAcronym();
+
+
+ $pcruInChargeRole = $this->getOscarConfigurationService()->getPcruInChargeRole();
+ if ($pcruInChargeRole === NULL || mb_strlen(trim($pcruInChargeRole)) === 0) {
+ throw new \Exception("Veuillez renseigner dans la configuration la clé pcru_incharge_role. Cette clé décrit le nom du rôle correspondant au responsable scientifique dans l'application (le plus souvent c'est tout simplement 'Responsable scientifique'). C'est ce qui nous permet de récupérer automatiquement la valeur par défaut à envoyer à PCRU. Sinon la valeur doit être saisie à la main.");
+ }
+ $personsWithRole = $activity->getPersonsWithRole($pcruInChargeRole);
+ if (count($personsWithRole) == 0) {
+ $pcruInformationParDefaut->responsableScientifiqueParDefautErreur = "Impossible de déterminer automatiquement un reponsable scientifique par défaut car l'activité n'a aucun membre ayant le rôle (" . $pcruInChargeRole . ")";
+ } else if (count($personsWithRole) == 1) {
+ $pcruInformationParDefaut->responsableScientifique = mb_strtoupper($personsWithRole[0]->getPerson()->getLastName()) . " " . $personsWithRole[0]->getPerson()->getFirstName();
+ } else {
+ $pcruInformationParDefaut->responsableScientifiqueParDefautErreur = "Impossible de déterminer automatiquement un reponsable scientifique par défaut car l'activité a plusieurs membres ayant le rôle (" . $pcruInChargeRole . ")";
+ }
+
+ $pcruPartnerRoles = $this->getOscarConfigurationService()->getPcruPartnerRoles();
+ if ($pcruPartnerRoles === NULL || count($pcruPartnerRoles) === 0) {
+ $pcruInformationParDefaut->partenairesParDefautErreur = "Impossible de déterminer automatiquement les partenaires par défaut car la clé pcru_partner_roles n'est pas renseignée dans la configuration. Cette clé décrit une liste de rôles (par exemple ['Partenaires']) que doivent avoir les organisations liées à l'activité pour être considérées comme des partenaires du point de vue de PCRU.";
+ } else {
+ $partenaires = $activity->getOrganizationsWithOneRoleIn($pcruPartnerRoles);
+ if (count($partenaires) == 0) {
+ $pcruInformationParDefaut->partenairesParDefautInfo = "Impossible de déterminer automatiquement les partenaires par défaut car l'activité n'a aucun partenaire de type (" . implode(', ', $pcruPartnerRoles) . ")";
+ } else {
+ $pcruInformationParDefaut->partenaires = "";
+ foreach ($partenaires as $partenaire) {
+ if ($pcruInformationParDefaut->partenaires != '') {
+ $pcruInformationParDefaut->partenaires .= ' | ';
+ }
+ $pcruInformationParDefaut->partenaires .= $partenaire->getShortName();
+ }
+ }
+ }
+
+ $pcruPartenairePrincipalRoles = $this->getOscarConfigurationService()->getPcruPartenairePrincipalRoles();
+ if ($pcruPartenairePrincipalRoles === NULL || count($pcruPartenairePrincipalRoles) === 0) {
+ $pcruInformationParDefaut->partenairePrincipalParDefautErreur = "Impossible de déterminer automatiquement le partenaire principal par défaut car la clé pcru_partenaire_principal_roles n'est pas renseignée dans la configuration. Cette clé décrit une liste de rôles (par exemple ['Partenaires']) que doit avoir une organisation liée à l'activité pour être considérée comme le partenaire principal du point de vue de PCRU.";
+ } else {
+ $partenaires = $activity->getOrganizationsWithOneRoleIn($pcruPartenairePrincipalRoles);
+ if (count($partenaires) == 0) {
+ $pcruInformationParDefaut->partenairePrincipalParDefautErreur = "Impossible de déterminer automatiquement le partenaire principal par défaut car l'activité n'a aucun partenaire de type (" . implode(', ', $pcruPartenairePrincipalRoles) . ")";
+ } else if (count($partenaires) == 1) {
+
+ $pcruInformationParDefaut->partenairePrincipal = $partenaires[0]->getShortName();
+
+ if ($partenaires[0]->getCodePcru() == NULL || mb_strlen(trim($partenaires[0]->getCodePcru())) == 0) {
+ $pcruInformationParDefaut->idPartenairePrincipalParDefautErreur = "Impossible de déterminer automatiquement l'identifiant du partenaire principal par défaut car l'organization ([" . $partenaires[0]->getId() . "] " . $partenaires[0]->getShortName() . ") n'a ni SIRET, ni TVA intracommunautaire ni DUNS.";
+ } else {
+ $pcruInformationParDefaut->idPartenairePrincipal = $partenaires[0]->getCodePcru();
+ }
+ } else {
+ $pcruInformationParDefaut->partenairePrincipalParDefautErreur = "Impossible de déterminer automatiquement le partenaire principal par défaut car l'activité a plusieurs partenaires de type (" . implode(', ', $pcruPartenairePrincipalRoles) . ")";
+ }
+ }
+
+ $pcruInformationParDefaut->sourceFinancement = $activity->getPcruSourceFinancement() ? $activity->getPcruSourceFinancement()->getLabel() : NULL;
+
+ if ($activity->getDateSigned() != NULL) {
+ $pcruInformationParDefaut->dateDerniereSignature = $activity->getDateSigned()->format('d-m-Y');
+ } else {
+ $pcruInformationParDefaut->dateDerniereSignatureParDefautErreur = "Impossible de déterminer automatiquement la date de dernière signature car la date de signature n'est pas renseignée dans la fiche de l'activité.";
+ }
+
+ if ($activity->getDateStart() != NULL) {
+ $pcruInformationParDefaut->dateDebut = $activity->getDateStart()->format('d-m-Y');
+ } else {
+ $pcruInformationParDefaut->dateDebutParDefautErreur = "Impossible de déterminer automatiquement la date de début car la date de début du contrat n'est pas renseignée dans la fiche de l'activité.";
+ }
+
+ if ($activity->getDateEnd() != NULL) {
+ $pcruInformationParDefaut->dateFin = $activity->getDateEnd()->format('d-m-Y');
+ } else {
+ $pcruInformationParDefaut->dateFinParDefautErreur = "Impossible de déterminer automatiquement la date de fin car la date de fin du contrat n'est pas renseignée dans la fiche de l'activité.";
+ }
+
+ $pcruInformationParDefaut->montantTotal = $activity->getAmount();
+ $pcruInformationParDefaut->montantTotalDevise = $activity->getCurrency()->getLabel();
+
+ $pcruInformationParDefaut->validePoleCompetitivite = $activity->isPcruValidPoleCompetitivite() ? true : false;
+
+ if ($activity->getPcruPoleCompetitivite()) {
+ $pcruInformationParDefaut->poleCompetitivite = $activity->getPcruPoleCompetitivite()->getLabel();
+ }
+
+ $pcruInformationParDefaut->reference = $activity->getOscarNum();
+
+ $this->validateParDefaut($pcruInformationParDefaut);
+
+ return $pcruInformationParDefaut;
+ }
+
+ /**
+ * Validation des informations PCRU d'une activité
+ *
+ * @param PcruInformationParDefaut $info
+ */
+ public function validateParDefaut(PcruInformationParDefaut $info)
+ {
+ if ($info->objet == NULL || mb_strlen(trim($info->objet)) == 0) {
+ $info->objetErreurs[] = 'Le champ Objet est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($info->objet)) > 1000) {
+ $info->objetErreurs[] = 'Le champ Objet doit faire moins de 1000 caractères';
+ }
+
+ if ($info->labintel == NULL || mb_strlen(trim($info->labintel)) == 0) {
+ $info->labintelErreurs[] = 'Le champ CodeUniteLabintel est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($info->labintel)) > 10) {
+ $info->labintelErreurs[] = 'Le champ CodeUniteLabintel doit faire moins de 10 caractères';
+ }
+
+ if ($info->sigle != NULL && mb_strlen(trim($info->sigle)) > 20) {
+ $info->sigleErreurs[] = 'Le champ SigleUnite doit faire moins de 20 caractères';
+ }
+
+ if ($info->numContrat == NULL || mb_strlen(trim($info->numContrat)) == 0) {
+ $info->numContratErreurs[] = 'Le champ NumContratTutelleGestionnaire est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($info->numContrat)) > 30) {
+ $info->numContratErreurs[] = 'Le champ NumContratTutelleGestionnaire doit faire moins de 30 caractères';
+ }
+
+ if ($info->typeContratId == NULL) {
+ $info->typeContratErreurs[] = 'Le champ TypeContrat est obligatoire et doit être défini';
+ }
+
+ if ($info->acronyme != NULL && mb_strlen(trim($info->acronyme)) > 50) {
+ $info->acronymeErreurs[] = 'Le champ Acronyme doit faire moins de 50 caractères';
+ }
+
+ if ($info->responsableScientifique == NULL || mb_strlen(trim($info->responsableScientifique)) == 0) {
+ $info->responsableScientifiqueErreurs[] = 'Le champ ResponsableScientifique est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($info->responsableScientifique)) > 50) {
+ $info->responsableScientifiqueErreurs[] = 'Le champ ResponsableScientifique doit faire moins de 50 caractères';
+ }
+
+ if ($info->partenaires != NULL && mb_strlen(trim($info->partenaires)) > 200) {
+ $info->partenairesErreurs[] = 'Le champ Partenaires doit faire moins de 200 caractères';
+ }
+
+ $info->partenairePrincipalErreurs = $this->validateField($info->partenairePrincipal, 'PartenairePrincipal', ActivityPcruInformations::PARTENAIRE_PRINCIPAL_MAX_LENGTH);
+
+ $info->idPartenairePrincipalErreurs = $this->validateField($info->idPartenairePrincipal, 'IdPartenairePrincipal', ActivityPcruInformations::ID_PARTENAIRE_PRINCIPAL_MAX_LENGTH, true);
+
+ $info->sourceFinancementErreurs = $this->validateField($info->sourceFinancement, 'SourceFinancement', null);
+
+ $info->dateDerniereSignatureErreurs = $this->validateDateField($info->dateDerniereSignature, 'DateDerniereSignature');
+
+ $info->dateDebutErreurs = $this->validateDateField($info->dateDebut, 'DateDebut');
+
+ $info->dateFinErreurs = $this->validateDateField($info->dateFin, 'DateFin', true);
+
+ if (count($info->dateDebutErreurs) == 0 && count($info->dateFinErreurs) == 0 && mb_strlen(trim($info->dateFin)) != 0) {
+ $debut = \DateTime::createFromFormat('d-m-Y', $info->dateDebut);
+ $fin = \DateTime::createFromFormat('d-m-Y', $info->dateFin);
+ if ($fin < $debut) {
+ $info->dateFinErreurs[] = "La date de fin doit être postérieure à la date de début";
+ }
+ }
+
+ if ($this->aPlusDeDeuxDecimales($info->montantTotal)) {
+ $info->montantTotalErreurs[] = 'Le champ MontantTotal ne doit pas avoir plus de deux chiffres après la virgule';
+ }
+ if ($info->montantTotalDevise != "Euro") {
+ $info->montantTotalErreurs[] = 'Le champ MontantTotal doit être en euros';
+ }
+
+ if ($info->validePoleCompetitivite && mb_strlen(trim($info->poleCompetitivite)) == 0) {
+ $info->poleCompetitiviteErreurs[] = 'Si le contrat est validé par un pôle de compétitivité alors le champ PoleCompetitivite est obligatoire';
+ }
+
+ $info->referenceErreurs = $this->validateField($info->reference, 'Reference', ActivityPcruInformations::REFERENCE_MAX_LENGTH);
+ }
+
+ private function validateField(?string $fieldValue, string $fieldName, ?int $fieldMaxLength, bool $nullAllowed = false): array {
+ $erreurs = [];
+ if (!$nullAllowed && mb_strlen(trim($fieldValue)) == 0) {
+ $erreurs[] = 'Le champ ' . $fieldName . ' est obligatoire et doit être défini';
+ } else if ($fieldValue != NULL && $fieldMaxLength != NULL && mb_strlen(trim($fieldValue)) > $fieldMaxLength) {
+ $erreurs[] = 'Le champ ' . $fieldName . ' doit faire moins de ' . $fieldMaxLength . ' caractères';
+ }
+ return $erreurs;
+ }
+
+ private function validateDateField(?string $date, string $fieldName, bool $nullAllowed = false): array {
+ $erreurs = [];
+ $format = 'd-m-Y';
+ if (!$nullAllowed && mb_strlen(trim($date)) == 0) {
+ $erreurs[] = 'Le champ ' . $fieldName . ' est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($date)) != 0) {
+ $d = \DateTime::createFromFormat($format, $date);
+ // The Y ( 4 digits year ) returns TRUE for any integer with any number of digits so changing the comparison from == to === fixes the issue.
+ if (!$d || strtolower($d->format($format)) !== strtolower($date)) {
+ $erreurs[] = 'Le champ ' . $fieldName . ' doit être une date valide au format jj-mm-aaaa';
+ }
+ }
+ return $erreurs;
+ }
+
+ public function validatePasParDefaut(ActivityPcruInformations $activityPcruInformations): array
+ {
+ $erreurs = [];
+ $erreurs['objetErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserObjetParDefaut()) {
+ if ($activityPcruInformations->getObjet() == NULL || mb_strlen(trim($activityPcruInformations->getObjet())) == 0) {
+ $erreurs['objetErreurs'][] = 'Le champ Objet est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($activityPcruInformations->getObjet())) > 1000) {
+ $erreurs['objetErreurs'][] = 'Le champ Objet doit faire moins de 1000 caractères';
+ }
+ }
+ $erreurs['labintelErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserLabintelParDefaut()) {
+ if ($activityPcruInformations->getLabintel() == NULL || mb_strlen(trim($activityPcruInformations->getLabintel())) == 0) {
+ $erreurs['labintelErreurs'][] = 'Le champ CodeUniteLabintel est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($activityPcruInformations->getLabintel())) > 10) {
+ $erreurs['labintelErreurs'][] = 'Le champ CodeUniteLabintel doit faire moins de 10 caractères';
+ }
+ }
+ $erreurs['sigleErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserSigleParDefaut()) {
+ if ($activityPcruInformations->getSigle() == NULL && mb_strlen(trim($activityPcruInformations->getSigle())) > 20) {
+ $erreurs['sigleErreurs'][] = 'Le champ SigleUnite doit faire moins de 20 caractères';
+ }
+ }
+ $erreurs['numContratErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserNumContratParDefaut()) {
+ if ($activityPcruInformations->getNumContrat() == NULL || mb_strlen(trim($activityPcruInformations->getNumContrat())) == 0) {
+ $erreurs['numContratErreurs'][] = 'Le champ NumContratTutelleGestionnaire est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($activityPcruInformations->getNumContrat())) > 30) {
+ $erreurs['numContratErreurs'][] = 'Le champ NumContratTutelleGestionnaire doit faire moins de 30 caractères';
+ }
+ }
+ $erreurs['equipeErreurs'] = [];
+ if ($activityPcruInformations->getEquipe() != NULL && mb_strlen(trim($activityPcruInformations->getEquipe())) > 150) {
+ $erreurs['equipeErreurs'][] = 'Le champ Equipe doit faire moins de 150 caractères';
+ }
+ $erreurs['typeContratErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserTypeContratParDefaut() && $activityPcruInformations->getPcruTypeContract() == NULL) {
+ $erreurs['typeContratErreurs'][] = 'Le champ TypeContrat est obligatoire et doit être défini';
+ }
+ $erreurs['acronymeErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserAcronymeParDefaut() && $activityPcruInformations->getAcronyme() != NULL && mb_strlen(trim($activityPcruInformations->getAcronyme())) > 50) {
+ $erreurs['acronymeErreurs'][] = 'Le champ Acronyme doit faire moins de 50 caractères';
+ }
+ $erreurs['contratsAssociesErreurs'] = [];
+ if ($activityPcruInformations->getContratsAssocies() != NULL && mb_strlen(trim($activityPcruInformations->getContratsAssocies())) > 300) {
+ $erreurs['contratsAssociesErreurs'][] = 'Le champ ContratsAssocies doit faire moins de 300 caractères';
+ }
+ $erreurs['responsableScientifiqueErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserResponsableScientifiqueParDefaut()) {
+ if ($activityPcruInformations->getResponsableScientifique() == NULL || mb_strlen(trim($activityPcruInformations->getResponsableScientifique())) == 0) {
+ $erreurs['responsableScientifiqueErreurs'][] = 'Le champ ResponsableScientifique est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($activityPcruInformations->getResponsableScientifique())) > 50) {
+ $erreurs['responsableScientifiqueErreurs'][] = 'Le champ ResponsableScientifique doit faire moins de 50 caractères';
+ }
+ }
+ $erreurs['employeurResponsableScientifiqueErreurs'] = [];
+ if ($activityPcruInformations->getEmployeurResponsableScientifique() != NULL && mb_strlen(trim($activityPcruInformations->getEmployeurResponsableScientifique())) > 50) {
+ $erreurs['employeurResponsableScientifiqueErreurs'][] = 'Le champ EmployeurResponsableScientifique doit faire moins de 50 caractères';
+ }
+ $erreurs['partenairesErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserPartenairesParDefaut() && $activityPcruInformations->getPartenaires() != NULL && mb_strlen(trim($activityPcruInformations->getPartenaires())) > 200) {
+ $erreurs['partenairesErreurs'][] = 'Le champ Partenaires doit faire moins de 200 caractères';
+ }
+
+ $erreurs['partenairePrincipalErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserPartenairePrincipalParDefaut()) {
+ $erreurs['partenairePrincipalErreurs'] = $this->validateField($activityPcruInformations->getPartenairePrincipal(), 'PartenairePrincipal', ActivityPcruInformations::PARTENAIRE_PRINCIPAL_MAX_LENGTH);
+ }
+
+ $erreurs['idPartenairePrincipalErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserIdPartenairePrincipalParDefaut()) {
+ $erreurs['idPartenairePrincipalErreurs'] = $this->validateField($activityPcruInformations->getIdPartenairePrincipal(), 'IdPartenairePrincipal', ActivityPcruInformations::ID_PARTENAIRE_PRINCIPAL_MAX_LENGTH, true);
+ }
+
+ $erreurs['lieuExecutionErreurs'] = $this->validateField($activityPcruInformations->getLieuExecution(), 'LieuExecution', ActivityPcruInformations::LIEU_EXECUTION_MAX_LENGTH, true);
+
+ $erreurs['dateDerniereSignatureErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserDateDerniereSignatureParDefaut()) {
+ $erreurs['dateDerniereSignatureErreurs'] = $this->validateDateField($activityPcruInformations->getDateDerniereSignature(), 'DateDerniereSignature');
+ }
+
+ $erreurs['dureeErreurs'] = [];
+ if ($activityPcruInformations->getDuree() !== NULL) {
+ if ($activityPcruInformations->getDuree() > 999.5) {
+ $erreurs['dureeErreurs'][] = "Le champ Duree contient une valeur trop grande.";
+ } else if ($activityPcruInformations->getDuree() < 0.5) {
+ $erreurs['dureeErreurs'][] = "Le champ Duree ne peut pas être plus petit que 0,5 mois.";
+ }
+ $decimales = abs($activityPcruInformations->getDuree()) - floor(abs($activityPcruInformations->getDuree()));
+ if ($decimales != 0 && $decimales != 0.5) {
+ $erreurs['dureeErreurs'][] = "Si le champ Duree doit avoir une valeur après la virgule, ça ne peut être que 0,5";
+ }
+ }
+
+ $erreurs['dateDebutErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserDateDebutParDefaut()) {
+ $erreurs['dateDebutErreurs'] = $this->validateDateField($activityPcruInformations->getDateDebut(), 'DateDebut');
+ }
+
+ $erreurs['dateFinErreurs'] = [];
+ if (!$activityPcruInformations->isUtiliserDateFinParDefaut()) {
+ $erreurs['dateFinErreurs'] = $this->validateDateField($activityPcruInformations->getDateFin(), 'DateFin', true);
+ }
+
+ if ($activityPcruInformations->getDuree() === NULL && !$activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($activityPcruInformations->getDateFin())) == 0) {
+ $erreurs['dateFinErreurs'][] = "Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être.";
+ $erreurs['dureeErreurs'][] = "Si la date de fin du contrat n'est pas renseignée, alors le champ Duree doit l'être.";
+ }
+
+ if (!$activityPcruInformations->isUtiliserDateDebutParDefaut() && count($erreurs['dateDebutErreurs']) == 0 && !$activityPcruInformations->isUtiliserDateFinParDefaut() && mb_strlen(trim($activityPcruInformations->getDateFin())) != 0 && count($erreurs['dateFinErreurs']) == 0) {
+ $debut = \DateTime::createFromFormat('d-m-Y', $activityPcruInformations->getDateDebut());
+ $fin = \DateTime::createFromFormat('d-m-Y', $activityPcruInformations->getDateFin());
+ if ($fin < $debut) {
+ $erreurs['dateFinErreurs'][] = "La date de fin doit être postérieure à la date de début";
+ }
+ }
+
+ $erreurs['montantPercuUniteErreurs'] = [];
+ if ($activityPcruInformations->getMontantPercuUnite() === NULL) {
+ $erreurs['montantPercuUniteErreurs'][] = 'Le champ MontantPercuUnite est obligatoire et doit être défini';
+ } else {
+ if ($activityPcruInformations->getMontantPercuUnite() > 9999999999.99) {
+ $erreurs['montantPercuUniteErreurs'][] = "Le champ MontantPercuUnite contient une valeur trop grande.";
+ } else if ($activityPcruInformations->getMontantPercuUnite() < -9999999999.99) {
+ $erreurs['montantPercuUniteErreurs'][] = "Le champ MontantPercuUnite contient une valeur trop petite.";
+ }
+ }
+
+ $erreurs['coutTotalEtudeErreurs'] = [];
+ if ($activityPcruInformations->getCoutTotalEtude() !== NULL) {
+ if ($activityPcruInformations->getCoutTotalEtude() > 9999999999.99) {
+ $erreurs['coutTotalEtudeErreurs'][] = "Le champ CoutTotalEtude contient une valeur trop grande.";
+ } else if ($activityPcruInformations->getCoutTotalEtude() < -9999999999.99) {
+ $erreurs['coutTotalEtudeErreurs'][] = "Le champ CoutTotalEtude contient une valeur trop petite.";
+ }
+ }
+
+ $erreurs['montantTotalErreurs'] = [];
+ if ($activityPcruInformations->getMontantTotal() !== NULL) {
+ if ($activityPcruInformations->getMontantTotal() > 9999999999.99) {
+ $erreurs['montantTotalErreurs'][] = "Le champ MontantTotal contient une valeur trop grande.";
+ } else if ($activityPcruInformations->getMontantTotal() < -9999999999.99) {
+ $erreurs['montantTotalErreurs'][] = "Le champ MontantTotal contient une valeur trop petite.";
+ }
+ }
+
+ $erreurs['commentairesErreurs'] = $this->validateField($activityPcruInformations->getCommentaires(), 'Commentaires', ActivityPcruInformations::COMMENTAIRES_MAX_LENGTH, true);
+
+ $erreurs['referenceErreurs'] = [];
+
+ if (!$activityPcruInformations->isUtiliserReferenceParDefaut()) {
+ $this->validateField($activityPcruInformations->getReference(), 'Reference', ActivityPcruInformations::REFERENCE_MAX_LENGTH);
+ }
+
+ return $erreurs;
+ }
+
+ /**
+ * Validation des informations PCRU d'une activité
+ *
+ * @param PcruInformation $info
+ */
+ public function validate(PcruInformation $info): array
+ {
+ $errors = [];
+ $errorsObjet = [];
+ if ($info->objet == NULL || mb_strlen(trim($info->objet)) == 0) {
+ $errorsObjet[] = 'Le champ Objet est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($info->objet)) > 1000) {
+ $errorsObjet[] = 'Le champ Objet doit faire moins de 1000 caractères';
+ }
+ if (count($errorsObjet) > 0) {
+ $errors['objet'] = $errorsObjet;
+ }
+
+ $errorsLabintel = [];
+ if ($info->labintel == NULL || mb_strlen(trim($info->labintel)) == 0) {
+ $errorsLabintel[] = 'Le champ CodeUniteLabintel est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($info->labintel)) > 10) {
+ $errorsLabintel[] = 'Le champ CodeUniteLabintel doit faire moins de 10 caractères';
+ }
+ if (count($errorsLabintel) > 0) {
+ $errors['labintel'] = $errorsLabintel;
+ }
+
+ $errorsSigle = [];
+ if ($info->sigle != NULL && mb_strlen(trim($info->sigle)) > 20) {
+ $errorsSigle[] = 'Le champ SigleUnite doit faire moins de 20 caractères';
+ }
+ if (count($errorsSigle) > 0) {
+ $errors['sigle'] = $errorsSigle;
+ }
+
+ $errorsNumContrat = [];
+ if ($info->numContrat == NULL || mb_strlen(trim($info->numContrat)) == 0) {
+ $errorsNumContrat[] = 'Le champ NumContratTutelleGestionnaire est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($info->numContrat)) > 30) {
+ $errorsNumContrat[] = 'Le champ NumContratTutelleGestionnaire doit faire moins de 30 caractères';
+ }
+ if (count($errorsNumContrat) > 0) {
+ $errors['numContrat'] = $errorsNumContrat;
+ }
+
+ $errorsEquipe = [];
+ if ($info->equipe != NULL && mb_strlen(trim($info->equipe)) > 150) {
+ $errorsEquipe[] = 'Le champ Equipe doit faire moins de 150 caractères';
+ }
+ if (count($errorsEquipe) > 0) {
+ $errors['equipe'] = $errorsEquipe;
+ }
+
+ $errorsTypeContrat = [];
+ if ($info->typeContrat == NULL) {
+ $errorsTypeContrat[] = 'Le champ TypeContrat est obligatoire et doit être défini';
+ }
+ if (count($errorsTypeContrat) > 0) {
+ $errors['typeContrat'] = $errorsTypeContrat;
+ }
+
+ $errorsAcronyme = [];
+ if ($info->acronyme != NULL && mb_strlen(trim($info->acronyme)) > 50) {
+ $errorsAcronyme[] = 'Le champ Acronyme doit faire moins de 50 caractères';
+ }
+ if (count($errorsAcronyme) > 0) {
+ $errors['acronyme'] = $errorsAcronyme;
+ }
+
+ $errorsContratsAssocies = [];
+ if ($info->contratsAssocies != NULL && mb_strlen(trim($info->contratsAssocies)) > 300) {
+ $errorsContratsAssocies[] = 'Le champ ContratsAssocies doit faire moins de 300 caractères';
+ }
+ if (count($errorsContratsAssocies) > 0) {
+ $errors['contratsAssocies'] = $errorsContratsAssocies;
+ }
+
+ $errorsResponsableScientifique = [];
+ if ($info->responsableScientifique == NULL || mb_strlen(trim($info->responsableScientifique)) == 0) {
+ $errorsResponsableScientifique[] = 'Le champ ResponsableScientifique est obligatoire et doit être défini';
+ } else if (mb_strlen(trim($info->responsableScientifique)) > 50) {
+ $errorsResponsableScientifique[] = 'Le champ ResponsableScientifique doit faire moins de 50 caractères';
+ }
+ if (count($errorsResponsableScientifique) > 0) {
+ $errors['responsableScientifique'] = $errorsResponsableScientifique;
+ }
+
+ $errorsEmployeurResponsableScientifique = [];
+ if ($info->employeurResponsableScientifique != NULL && mb_strlen(trim($info->employeurResponsableScientifique)) > 50) {
+ $errorsEmployeurResponsableScientifique[] = 'Le champ EmployeurResponsableScientifique doit faire moins de 50 caractères';
+ }
+ if (count($errorsEmployeurResponsableScientifique) > 0) {
+ $errors['employeurResponsableScientifique'] = $errorsEmployeurResponsableScientifique;
+ }
+
+ $errorsPartenaires = [];
+ if ($info->partenaires != NULL && mb_strlen(trim($info->partenaires)) > 200) {
+ $errorsPartenaires[] = 'Le champ Partenaires doit faire moins de 200 caractères';
+ }
+ if (count($errorsPartenaires) > 0) {
+ $errors['partenaires'] = $errorsPartenaires;
+ }
+
+ $errorsPartenairePrincipal = $this->validateField($info->partenairePrincipal, 'PartenairePrincipal', ActivityPcruInformations::PARTENAIRE_PRINCIPAL_MAX_LENGTH);
+ if (count($errorsPartenairePrincipal) > 0) {
+ $errors['partenairePrincipal'] = $errorsPartenairePrincipal;
+ }
+
+ $errorsIdPartenairePrincipal = $this->validateField($info->idPartenairePrincipal, 'IdPartenairePrincipal', ActivityPcruInformations::ID_PARTENAIRE_PRINCIPAL_MAX_LENGTH, true);
+ if (count($errorsIdPartenairePrincipal) > 0) {
+ $errors['idPartenairePrincipal'] = $errorsIdPartenairePrincipal;
+ }
+
+ $errorsSourceFinancement = $this->validateField($info->sourceFinancement, 'SourceFinancement', null);
+ if (count($errorsSourceFinancement) > 0) {
+ $errors['sourceFinancement'] = $errorsSourceFinancement;
+ }
+
+ // La spec dit que le champ est obligatoire, mais le formulaire de saisie de contrat sur le site web PCRU et les export CSV montrent qu'en fait non.
+ $errorsLieuExecution = $this->validateField($info->lieuExecution, 'LieuExecution', ActivityPcruInformations::LIEU_EXECUTION_MAX_LENGTH, true);
+ if (count($errorsLieuExecution) > 0) {
+ $errors['lieuExecution'] = $errorsLieuExecution;
+ }
+
+ $errorsDateDerniereSignature = $this->validateDateField($info->dateDerniereSignature, 'DateDerniereSignature');
+ if (count($errorsDateDerniereSignature) > 0) {
+ $errors['dateDerniereSignature'] = $errorsDateDerniereSignature;
+ }
+
+ $errorsDuree = [];
+ if ($info->duree !== NULL) {
+ if ($info->duree > 999.5) {
+ $errorsDuree[] = "Le champ Duree contient une valeur trop grande.";
+ } else if ($info->duree < 0.5) {
+ $errorsDuree[] = "Le champ Duree ne peut pas être plus petit que 0,5 mois.";
+ }
+ $decimales = abs($info->duree) - floor(abs($info->duree));
+ if ($decimales != 0 && $decimales != 0.5) {
+ $errorsDuree[] = "Si le champ Duree doit avoir une valeur après la virgule, ça ne peut être que 0,5";
+ }
+ } else if (mb_strlen(trim($info->dateFin)) == 0) {
+ $errorsDuree[] = "Si la date de fin du contrat n'est pas renseignée, alors le champ Duree doit l'être.";
+ }
+ if (count($errorsDuree) > 0) {
+ $errors['duree'] = $errorsDuree;
+ }
+
+ $errorsDateDebut = $this->validateDateField($info->dateDebut, 'DateDebut');
+ if (count($errorsDateDebut) > 0) {
+ $errors['dateDebut'] = $errorsDateDebut;
+ }
+
+ $errorsDateFin = $this->validateDateField($info->dateFin, 'DateFin', true);
+ if (mb_strlen(trim($info->dateFin)) == 0 && $info->duree === NULL) {
+ $errorsDateFin[] = "Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être.";
+ }
+ if (count($errorsDateDebut) == 0 && mb_strlen(trim($info->dateFin)) != 0 && count($errorsDateFin) == 0) {
+ $debut = \DateTime::createFromFormat('d-m-Y', $info->dateDebut);
+ $fin = \DateTime::createFromFormat('d-m-Y', $info->dateFin);
+ if ($fin < $debut) {
+ $errorsDateFin[] = "La date de fin doit être postérieure à la date de début";
+ }
+ }
+ if (count($errorsDateFin) > 0) {
+ $errors['dateFin'] = $errorsDateFin;
+ }
+
+ $errorsMontantPercuUnite = [];
+ if ($info->montantPercuUnite === NULL) {
+ $errorsMontantPercuUnite[] = "Le champ MontantPercuUnite est obligatoire et doit être défini";
+ } else {
+ if ($info->montantPercuUnite > 9999999999.99) {
+ $errorsMontantPercuUnite[] = "Le champ MontantPercuUnite contient une valeur trop grande.";
+ } else if ($info->montantPercuUnite < -9999999999.99) {
+ $errorsMontantPercuUnite[] = "Le champ MontantPercuUnite contient une valeur trop petite.";
+ }
+ }
+ if (count($errorsMontantPercuUnite) > 0) {
+ $errors['montantPercuUnite'] = $errorsMontantPercuUnite;
+ }
+
+ $errorsCoutTotalEtude = [];
+ if ($info->coutTotalEtude !== NULL) {
+ if ($info->coutTotalEtude > 9999999999.99) {
+ $errorsCoutTotalEtude[] = "Le champ CoutTotalEtude contient une valeur trop grande.";
+ } else if ($info->coutTotalEtude < -9999999999.99) {
+ $errorsCoutTotalEtude[] = "Le champ CoutTotalEtude contient une valeur trop petite.";
+ }
+ }
+ if (count($errorsCoutTotalEtude) > 0) {
+ $errors['coutTotalEtude'] = $errorsCoutTotalEtude;
+ }
+
+ $errorsMontantTotal = [];
+ if ($info->montantTotal !== NULL) {
+ if ($info->montantTotal > 9999999999.99) {
+ $errorsMontantTotal[] = "Le champ MontantTotal contient une valeur trop grande.";
+ } else if ($info->montantTotal < -9999999999.99) {
+ $errorsMontantTotal[] = "Le champ MontantTotal contient une valeur trop petite.";
+ }
+ if ($info->montantTotalDevise != "Euro") {
+ $errorsMontantTotal[] = 'Le champ MontantTotal doit être en euros';
+ }
+ if ($this->aPlusDeDeuxDecimales($info->montantTotal)) {
+ $errorsMontantTotal[] = 'Le champ MontantTotal ne doit pas avoir plus de deux chiffres après la virgule';
+ }
+ }
+ if (count($errorsMontantTotal) > 0) {
+ $errors['montantTotal'] = $errorsMontantTotal;
+ }
+
+ $errorsPoleCompetitivite = [];
+ if ($info->validePoleCompetitivite && mb_strlen(trim($info->poleCompetitivite)) == 0) {
+ $errorsPoleCompetitivite[] = 'Si le contrat est validé par un pôle de compétitivité alors le champ PoleCompetitivite est obligatoire';
+ }
+ if (count($errorsPoleCompetitivite) > 0) {
+ $errors['poleCompetitivite'] = $errorsPoleCompetitivite;
+ }
+
+ $errorsCommentaires = $this->validateField($info->commentaires, 'Commentaires', ActivityPcruInformations::COMMENTAIRES_MAX_LENGTH, true);
+ if (count($errorsCommentaires) > 0) {
+ $errors['commentaires'] = $errorsCommentaires;
+ }
+
+ $errorsReference = $this->validateField($info->reference, 'Reference', ActivityPcruInformations::REFERENCE_MAX_LENGTH);
+ if (count($errorsReference) > 0) {
+ $errors['reference'] = $errorsReference;
+ }
+
+ return $errors;
+ }
+
+ private function aPlusDeDeuxDecimales(float $f): bool {
+ return (abs($f) - floor(abs($f) * 100) / 100) !== 0.0;
+ }
+}
diff --git a/module/Oscar/src/Oscar/Service/PcruInformationsServiceFactory.php b/module/Oscar/src/Oscar/Service/PcruInformationsServiceFactory.php
new file mode 100644
index 000000000..9c4b5b85d
--- /dev/null
+++ b/module/Oscar/src/Oscar/Service/PcruInformationsServiceFactory.php
@@ -0,0 +1,18 @@
+setOscarConfigurationService($container->get(OscarConfigurationService::class));
+ $s->setEntityManager($container->get(EntityManager::class));
+ return $s;
+ }
+}
diff --git a/module/Oscar/src/Oscar/Service/ProjectGrantApiService.php b/module/Oscar/src/Oscar/Service/ProjectGrantApiService.php
index e50ae36fe..63afbec4c 100644
--- a/module/Oscar/src/Oscar/Service/ProjectGrantApiService.php
+++ b/module/Oscar/src/Oscar/Service/ProjectGrantApiService.php
@@ -14,6 +14,7 @@ use Oscar\Entity\ActivityNote;
use Oscar\Entity\ActivityNoteRepository;
use Oscar\Entity\ActivityOrganization;
use Oscar\Entity\ActivityPayment;
+use Oscar\Entity\ActivityPcruInformations;
use Oscar\Entity\ActivityPerson;
use Oscar\Entity\ActivityRepository;
use Oscar\Entity\ActivityType;
@@ -85,6 +86,7 @@ class ProjectGrantApiService implements UseEntityManager,
const PERIMETER_SPENTS = 'spents';
const PERIMETER_TIMESHEETS = 'timesheets';
const PERIMETER_WORKPACKAGES = 'workpackages';
+ const PERIMETER_PCRU = 'pcru';
/**
* @return string[]
@@ -106,6 +108,7 @@ class ProjectGrantApiService implements UseEntityManager,
self::PERIMETER_SPENTS,
self::PERIMETER_TIMESHEETS,
self::PERIMETER_WORKPACKAGES,
+ self::PERIMETER_PCRU,
];
}
@@ -399,6 +402,12 @@ class ProjectGrantApiService implements UseEntityManager,
)
];
break;
+ case 'pcru':
+ $credentials['pcru'] = [
+ 'read' => $oscarUserContext->hasPrivileges(Privileges::ACTIVITY_PCRU, $activity),
+ 'edit' => $oscarUserContext->hasPrivileges(Privileges::ACTIVITY_PCRU_ACTIVATE, $activity)
+ ];
+ break;
}
}
@@ -483,6 +492,10 @@ class ProjectGrantApiService implements UseEntityManager,
$urlPlugin
);
break;
+
+ case self::PERIMETER_PCRU:
+ $datas[self::PERIMETER_PCRU] = $this->getPcruActivity($activity, $urlPlugin);
+ break;
}
}
@@ -553,7 +566,7 @@ class ProjectGrantApiService implements UseEntityManager,
'edit' => $urlPlugin->fromRoute('contract/edit', ['id' => $activity->getId()]),
'change_project' => $urlPlugin->fromRoute('contract/moveToProject', ['id' => $activity->getId()]),
'new_project' => $urlPlugin->fromRoute('project/new') . '?ids=' . $activity->getId(),
- 'pcru' => $urlPlugin->fromRoute('contract/pcru-infos', ['id' => $activity->getId()])
+ 'pcru' => $urlPlugin->fromRoute('contract/pcru-informations', ['id' => $activity->getId()])
]
];
}
@@ -976,7 +989,9 @@ class ProjectGrantApiService implements UseEntityManager,
'enrolledLabel' => $activityOrganization->getOrganization()->getFullName(),
'past' => !$activityOrganization->isActive(),
'start' => $this->formatDateTime($activityOrganization->getDateStart()),
- 'end' => $this->formatDateTime($activityOrganization->getDateEnd())
+ 'end' => $this->formatDateTime($activityOrganization->getDateEnd()),
+ 'labintel' => $activityOrganization->getOrganization()->getLabintel(),
+ 'shortname' => $activityOrganization->getOrganization()->getShortName()
];
}
return [
@@ -1094,6 +1109,18 @@ class ProjectGrantApiService implements UseEntityManager,
return $out;
}
+ /**
+ * @param Activity $activity
+ * @param Url|null $urlPlugin
+ * @return \Oscar\Service\PcruInformationComplete
+ */
+ public function getPcruActivity(Activity $activity, ?Url $urlPlugin = null): \Oscar\Service\PcruInformationComplete
+ {
+ /** @var PcruInformationsService $pcruInformationsService */
+ $pcruInformationsService = $this->getServiceContainer()->get(PcruInformationsService::class);
+ return $pcruInformationsService->getPcruInformationsForActivity($activity);
+ }
+
/**
* @param Activity $activity
* @param Url|null $urlPlugin
diff --git a/module/Oscar/src/Oscar/Traits/UsePcruFtpService.php b/module/Oscar/src/Oscar/Traits/UsePcruFtpService.php
new file mode 100644
index 000000000..e72696653
--- /dev/null
+++ b/module/Oscar/src/Oscar/Traits/UsePcruFtpService.php
@@ -0,0 +1,17 @@
+pcruFtpService;
+ }
+
+ /**
+ * @param PcruFtpService $pcruFtpService
+ */
+ public function setPcruFtpService(PcruFtpService $pcruFtpService): void
+ {
+ $this->pcruFtpService = $pcruFtpService;
+ }
+}
diff --git a/module/Oscar/src/Oscar/Traits/UsePcruInformationsService.php b/module/Oscar/src/Oscar/Traits/UsePcruInformationsService.php
new file mode 100644
index 000000000..94b9ab082
--- /dev/null
+++ b/module/Oscar/src/Oscar/Traits/UsePcruInformationsService.php
@@ -0,0 +1,17 @@
+pcruInformationsService;
+ }
+
+ /**
+ * @param PcruInformationsService $pcruInformationsService
+ */
+ public function setPcruInformationsService(PcruInformationsService $pcruInformationsService): void
+ {
+ $this->pcruInformationsService = $pcruInformationsService;
+ }
+}
diff --git a/module/Oscar/view/oscar/pcru/pcru-informations.phtml b/module/Oscar/view/oscar/pcru/pcru-informations.phtml
new file mode 100644
index 000000000..3ebb73f5e
--- /dev/null
+++ b/module/Oscar/view/oscar/pcru/pcru-informations.phtml
@@ -0,0 +1,7 @@
+
+ Les informations de cette activité n'ont encore jamais été envoyées à PCRU.
+
+
+
+ L'envoi de cette activité à PCRU n'est pas activé. Pour activer l'envoi, cochez la case "Activer l'envoi vers PCRU" au bas du formulaire puis cliquez sur "Enregistrer".
+
+
+
+ L'envoi à PCRU est activé pour cette activité. Les données partiront lors du prochain envoi programmé. Cette fiche a été modifiée pour la dernière fois le {{ formatDate(pcru.activityPcruInformations.dateUpdated) }} Si ce message reste affiché plus de 24H, contactez votre administrateur Oscar.
+
+
+
+ L'envoi à PCRU est activé pour cette activité, toutefois le formulaire contient des erreurs. Les informations ne pourront pas être envoyées à PCRU tant que les erreurs n'auront pas été corrigées.
+
+
+
+ Cette activité a été envoyée à PCRU le {{ formatDate(pcru.activityPcruInformations.datePremierDepot) }}. Nous sommes en attente d'un retour de la part de PCRU concernant l'intégration de cette activité.
+
+
+
+ PCRU a confirmé la bonne intégration de cette activité le {{ formatDate(pcru.activityPcruInformations.dateUpdated) }}.
+
+
+
+ PCRU a confirmé la bonne intégration de cette activité le {{ formatDate(pcru.activityPcruInformations.dateUpdated) }} tout en indiquant qu'il manque le fichier PDF du contrat.
+
+
+
+ Le fichier PDF du contrat a bien été déposé à PCRU le {{ formatDate(pcru.activityPcruInformations.dateEnvoiFichierContrat) }}.
+
Envoi activé le {{ formatDate(pcru.activityPcruInformations.dateActivationEnvoi) }}
+
Envoyée à PCRU le {{ formatDate(pcru.activityPcruInformations.datePremierDepot) }}
+
Réponse OK de PCRU le {{ formatDate(pcru.activityPcruInformations.dateRetourOK) }}
+
Réponse OK mais document contrat PDF manquant de PCRU le {{ formatDate(pcru.activityPcruInformations.dateRetourOKMaisContratManquant) }}
+
Document contrat PDF envoyé le {{ formatDate(pcru.activityPcruInformations.dateEnvoiFichierContrat) }}
+
+
+
+
+
+
+
Données envoyées à PCRU
+
+
+
+ N°
+ Intitulé PCRU
+ Description PCRU
+ Origine de la valeur par défaut dans Oscar
+ Valeur envoyée
+
+ 1
+
+ Le titre/l’objet du contrat
+ L'intitulé de l'activité
+ {{ pcru.activityPcruInformations.envoiObjet }}
+
+ 2
+
+ Le code labintel de l’unité du contrat
+ Le code labintel du partenaire ayant le rôle {{ pcru.unitRoles.join(', ') }}
+ {{ pcru.activityPcruInformations.envoiLabintel }}
+
+ 3
+
+ Le sigle de l’unité du contrat
+ Le nom court du partenaire ayant le rôle {{ pcru.unitRoles.join(', ') }}
+ {{ pcru.activityPcruInformations.envoiSigle }}
+
+ 4
+
+ Le numéro de contrat pour la tutelle qui en assure la gestion, ce numéro ne peut être modifié que par les personnes appartenant à l’organisme gestionnaire.
+ N° Oscar
+ {{ pcru.activityPcruInformations.envoiNumContrat }}
+
+ 5
+
+ Le nom de l’équipe concernée par le contrat (ou de la sous-unité)
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiEquipe }}
+
+ 6
+
+ Le type du contrat
+ Configuration des correspondances entre les types d'activités Oscar et les types de contrat PCRU
+ {{ pcru.activityPcruInformations.envoiTypeContrat }}
+
+ 7
+
+ L’acronyme du contrat
+ L'acronyme du projet de l'activité
+ {{ pcru.activityPcruInformations.envoiAcronyme }}
+
+ 8
+
+ Les numéros de tutelle gestionnaire des contrats associés séparés par un pipe «|»
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiContratsAssocies }}
+
+ 9
+
+ Le responsable scientifique
+ Le membre de l'activité ayant le rôle {{ pcru.roleResponsableScientifique }}
+ {{ pcru.activityPcruInformations.envoiResponsableScientifique }}
+
+ 10
+
+ L’employeur du responsable scientifique
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiEmployeurResponsableScientifique }}
+
+ 11
+
+ Indique si le responsable scientifique est aussi coordinateur du consortium
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiCoordinateurConsortium }}
+
+ 12
+
+ Ensemble de partenaires du contrat séparés par un pipe ("|")
+ Les partenaires de l'activité ayant l'un des rôles : {{ pcru.rolesPartenaires.join(', ') }}
+ {{ pcru.activityPcruInformations.envoiPartenaires }}
+
+ 13
+
+ Le libellé du partenaire principal
+ Le nom court du partenaire de l'activité ayant l'un des rôles : {{ pcru.rolesPartenairePrincipal.join(', ') }}
+ {{ pcru.activityPcruInformations.envoiPartenairePrincipal }}
+
+ 14
+
+ L'identifiant du Partenaire Principal (Référence du référentiel partenaire ou SIRET ou SIREN ou TVA intracommunautaire ou DUN)
+ Le SIRET ou le numéro de TVA intracommunautaire ou le N°DUNS du partenaire principal
+ {{ pcru.activityPcruInformations.envoiIdPartenairePrincipal }}
+
+ 15
+
+ Le type de source de financement du projet
+ La source de financement (PCRU) définie sur la page de l'activité
+ {{ pcru.activityPcruInformations.envoiSourceFinancement }}
+
+ 16
+
+ Le lieu d’exécution de l’unité de recherche
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiLieuExecution }}
+
+ 17
+
+ La date de la dernière signature du contrat
+ La date de signature de la fiche activité
+ {{ pcru.activityPcruInformations.envoiDateDerniereSignature }}
+
+ 18
+
+ La durée du contrat en mois (minimum 0,5)
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiDuree }}
+
+ 19
+
+ La date de début du contrat
+ La date de début du contrat de la fiche activité
+ {{ pcru.activityPcruInformations.envoiDateDebut }}
+
+ 20
+
+ La date de fin du contrat
+ La date de fin du contrat de la fiche activité
+ {{ pcru.activityPcruInformations.envoiDateFin }}
+
+ 21
+
+ Le montant reçu par l'Etablissement pour l'unité, y compris les frais de gestion forfaitaires
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiMontantPercuUnite }}
+
+ 22
+
+ Le coût complet supporté par l’unité ou les unités mixtes concernées y compris la masse salariale et y compris les frais de gestion forfaitaires et éligibles auxtermes du règlement financier du financeur
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiCoutTotalEtude }}
+
+ 23
+
+ Le montant total de la contribution du financeur
+ Le montant de l'activité
+ {{ pcru.activityPcruInformations.envoiMontantTotal }}
+
+ 24
+
+ Indique si le contrat a été validé par un pôle de compétitivité
+ La case "validé par le pôle de compétitivité (PCRU)" définie sur la page de l'activité
+ {{ pcru.activityPcruInformations.envoiValidePoleCompetitivite }}
+
+ 25
+
+ Nom du pôle de compétitivité qui a validé le projet
+ Le pôle de compétitivité (PCRU) défini sur la page de l'activité
+ {{ pcru.activityPcruInformations.envoiPoleCompetitivite }}
+
+ 26
+
+ Commentaire du gestionnaire de contrat (information à destination des autres tutelles)
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiCommentaires }}
+
+ 27
+
+ Programme Investissement Avenir
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiPia }}
+
+ 28
+
+ Votre propre référence désignant ce contrat
+ N° Oscar
+ {{ pcru.activityPcruInformations.envoiReference }}
+
+ 29
+
+ Accord cadre
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiAccordCadre }}
+
+ 30
+
+ Contrat d'accompagnement d'une bourse CIFRE
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiCifre }}
+
+ 31
+
+ Chaire industrielle ?
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiChaireIndustrielle }}
+
+ 32
+
+ Présence d’un partenaire industriel ?
+ Pas de valeur par défaut
+ {{ pcru.activityPcruInformations.envoiPresencePartenaireIndustriel }}
+
+
+
+
+
+
+
Données à envoyer à PCRU
+
+
+
Impossible d'envoyer les informations à PCRU, certaines valeurs ne sont pas valides :
+
+
+
{{ e }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ui/src/views/PcruTransmissions.vue b/ui/src/views/PcruTransmissions.vue
new file mode 100644
index 000000000..e349288a7
--- /dev/null
+++ b/ui/src/views/PcruTransmissions.vue
@@ -0,0 +1,209 @@
+
+
+
+
+
{{ error }}
+
+
+
+
+
+
Activités ayant activé la transmission PCRU
+
+
+
Les activités présentes dans cet écran sont soumises à un processus PCRU.
+
Aucun activité n'a activé la transmission PCRU.
+
Pour activer le processus PCRU d'une activité, rendez-vous sur la fiche activité, puis dans l'encart PCRU, cliquez sur informations PCRU, une fois dans le récapitulatif des informations, cliquez sur Activer l'envoi à PCRU pour cette activité
+
+
+
Les activités de plus de 6 mois dont la bonne intégration a été confirmée par PCRU n'apparaissent pas.
+ Encore jamais envoyée
+ Sera transmise lors du prochain envoi
+ Ne sera pas envoyée tant qu'elle contiendra des erreurs
+ Fichier contrat manquant
+ Envoyée le {{ formatDate(t.datepremierdepot) }}, attente retour PCRU
+ Retour PCRU : OK
+ Retour PCRU : OK mais fichier contrat manquant
+ Fichier contrat envoyé
+
+
{{ formatDate(t.dateupdated) }}
+
+
+
+
+
+
+
+
Historique des échanges
+
Seuls les échanges ayant eu lieu au cours des 6 derniers mois sont affichés.
+
+
+
+
+
\ No newline at end of file
diff --git a/ui/vite.config.js b/ui/vite.config.js
index f62a91328..ed1939aff 100644
--- a/ui/vite.config.js
+++ b/ui/vite.config.js
@@ -52,6 +52,7 @@ export default defineConfig({
activitymotscles: resolve(__dirname, 'src/ActivityMotsCles.js'),
activitymotsclesadmin: resolve(__dirname, 'src/ActivityMotsClesAdmin.js'),
activitynotes: resolve(__dirname, 'src/ActivityNotes.js'),
+ activitypcruinformations: resolve(__dirname, 'src/ActivityPcruInformations.js'),
activityspentdetails: resolve(__dirname, 'src/ActivitySpentDetails.js'),
activityspentsynthesis: resolve(__dirname, 'src/ActivitySpentSynthesis.js'),
admintypedocument: resolve(__dirname, 'src/AdminTypeDocument.js'),
@@ -66,6 +67,7 @@ export default defineConfig({
organizationsuborganizations: resolve(__dirname, 'src/OrganizationSubOrganizations.js'),
organizations_roled: resolve(__dirname, 'src/EntityWithRoleOrganizations.js'),
oscarcss: resolve(__dirname, 'src/oscar-css.js'),
+ pcrutransmissions: resolve(__dirname, 'src/PcruTransmissions.js'),
ProjectActivityLogs: resolve(__dirname, 'src/ProjectActivityLogs.js'),
ProjectActivitySpentSynthesis: resolve(__dirname, 'src/ProjectActivitySpentSynthesis.js'),
timesheetpersonresume: resolve(__dirname, 'src/TimesheetPersonResume.js'),
--
GitLab
From 6717c3c6fb8bd2ed34c10a402e2e1d13ce1f6395 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Oellers
Date: Wed, 26 Mar 2025 17:45:51 +0100
Subject: [PATCH 04/32] =?UTF-8?q?Ajout=20fichiers=20front=20compil=C3=A9s?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../vite/dist/assets/Activity-cc6ccf89.css | 1 +
.../vite/dist/assets/Activity-ed5cb27b.css | 1 -
...c000.css => ActivityDocument-2deed9d1.css} | 2 +-
.../dist/assets/ActivityNotes-57bb9039.css | 1 -
.../dist/assets/ActivityNotes-b71891b4.css | 1 +
.../ActivityPcruInformations-cccdc180.css | 1 +
.../dist/assets/DocumentsList-4af197b4.css | 1 -
.../dist/assets/DocumentsList-4e009bf5.css | 1 +
.../vite/dist/assets/Loader-ee83f9da.css | 1 +
.../vite/dist/assets/Loader-f7bf6891.css | 1 -
.../oscar/vite/dist/assets/Modal-2266e1e2.css | 1 +
.../oscar/vite/dist/assets/Modal-700b8a23.css | 1 -
.../assets/PcruTransmissions-d5165e09.css | 1 +
...9c2.js => ProjectActivityLogs-a43a204c.js} | 2 +-
...ProjectActivitySpentSynthesis-72e95239.js} | 2 +-
.../assets/TimesheetDeclaration-d2772701.css | 1 -
.../assets/TimesheetDeclaration-da0c6213.css | 1 +
.../assets/TimesheetPersonResume-9b0a7e87.css | 1 -
.../assets/TimesheetPersonResume-b4a958be.css | 1 +
.../vite/dist/assets/activity-60e009f3.js | 1 -
.../vite/dist/assets/activity-d961ddb0.js | 1 +
...9e448.js => activitydocuments-596bd3c4.js} | 2 +-
.../dist/assets/activitymotscles-2e3e437b.js | 1 -
.../dist/assets/activitymotscles-7b1fc39f.js | 1 +
.../assets/activitymotsclesadmin-696ec89a.js | 1 -
.../assets/activitymotsclesadmin-70f45e39.js | 1 +
...-e551577c.js => activitynotes-fbb89777.js} | 2 +-
.../activitypcruinformations-dff9ae49.js | 1 +
.../assets/activityspentdetails-a5d64488.js | 1 +
....js => activityspentsynthesis-841a21e7.js} | 2 +-
...6ca.js => activityworkpackage-5bc07c5a.js} | 2 +-
.../assets/adminroleorganization-20533524.js | 1 +
.../assets/adminroleorganization-cbf876f6.js | 1 -
.../dist/assets/admintypedocument-1c0873ed.js | 1 -
.../dist/assets/admintypedocument-d2d32e46.js | 1 +
.../assets/admintypeorganization-082a21a6.js | 1 +
.../assets/admintypeorganization-aeb4f3d9.js | 1 -
.../dist/assets/authentification-09edda39.js | 1 -
.../dist/assets/authentification-a6bb467f.js | 1 +
.../dist/assets/declarerslist-a1389633.js | 1 +
.../dist/assets/declarerslist-b893a403.js | 1 -
.../dist/assets/documentsindex-15fb2a66.js | 1 +
.../dist/assets/documentsindex-67bba6f4.js | 1 -
...e03be.js => documentsobserved-817c2fdd.js} | 2 +-
.../dist/assets/organizationfiche-974d2695.js | 2 -
.../dist/assets/organizationfiche-9bee7979.js | 2 +
...8c3.js => organizations_roled-fc3b4fe4.js} | 2 +-
.../organizationsuborganizations-39797503.js | 1 -
.../organizationsuborganizations-ff9fde48.js | 1 +
.../vite/dist/assets/oscar-css-1c3ee0fe.css | 1 +
.../vite/dist/assets/oscar-css-84bc208b.css | 1 -
.../vite/dist/assets/oscarcss-10fdd0ac.js | 1 -
.../vite/dist/assets/oscarcss-71927fdb.js | 1 +
.../dist/assets/pcrutransmissions-c01aec4b.js | 1 +
...-a64a3a69.js => persons_roled-8fe5f491.js} | 2 +-
.../oscar/vite/dist/assets/sticky-43d0d9fa.js | 1 +
.../oscar/vite/dist/assets/sticky-f851c7f2.js | 1 -
.../assets/timesheetdeclarations-7cf9abf1.js | 2 +
.../assets/timesheetdeclarations-8f08433e.js | 2 -
.../assets/timesheetpersonresume-14fb87b2.js | 1 +
.../assets/timesheetpersonresume-70795659.js | 1 -
public/js/oscar/vite/dist/manifest.json | 124 ++++++++++++------
public/js/oscar/vite/dist/vendor.js | 49 +++----
public/js/oscar/vite/dist/vendor10.js | 2 +-
public/js/oscar/vite/dist/vendor11.js | 2 +-
public/js/oscar/vite/dist/vendor12.js | 2 +-
public/js/oscar/vite/dist/vendor13.js | 2 +-
public/js/oscar/vite/dist/vendor15.js | 2 +-
public/js/oscar/vite/dist/vendor16.js | 2 +-
public/js/oscar/vite/dist/vendor17.js | 2 +-
public/js/oscar/vite/dist/vendor18.js | 2 +-
public/js/oscar/vite/dist/vendor2.js | 2 +-
public/js/oscar/vite/dist/vendor20.js | 2 +-
public/js/oscar/vite/dist/vendor21.js | 2 +-
public/js/oscar/vite/dist/vendor5.js | 2 +-
public/js/oscar/vite/dist/vendor6.js | 2 +-
public/js/oscar/vite/dist/vendor8.js | 2 +-
public/js/oscar/vite/dist/vendor9.js | 2 +-
78 files changed, 151 insertions(+), 127 deletions(-)
create mode 100644 public/js/oscar/vite/dist/assets/Activity-cc6ccf89.css
delete mode 100644 public/js/oscar/vite/dist/assets/Activity-ed5cb27b.css
rename public/js/oscar/vite/dist/assets/{ActivityDocument-be06c000.css => ActivityDocument-2deed9d1.css} (86%)
delete mode 100644 public/js/oscar/vite/dist/assets/ActivityNotes-57bb9039.css
create mode 100644 public/js/oscar/vite/dist/assets/ActivityNotes-b71891b4.css
create mode 100644 public/js/oscar/vite/dist/assets/ActivityPcruInformations-cccdc180.css
delete mode 100644 public/js/oscar/vite/dist/assets/DocumentsList-4af197b4.css
create mode 100644 public/js/oscar/vite/dist/assets/DocumentsList-4e009bf5.css
create mode 100644 public/js/oscar/vite/dist/assets/Loader-ee83f9da.css
delete mode 100644 public/js/oscar/vite/dist/assets/Loader-f7bf6891.css
create mode 100644 public/js/oscar/vite/dist/assets/Modal-2266e1e2.css
delete mode 100644 public/js/oscar/vite/dist/assets/Modal-700b8a23.css
create mode 100644 public/js/oscar/vite/dist/assets/PcruTransmissions-d5165e09.css
rename public/js/oscar/vite/dist/assets/{ProjectActivityLogs-934299c2.js => ProjectActivityLogs-a43a204c.js} (88%)
rename public/js/oscar/vite/dist/assets/{ProjectActivitySpentSynthesis-283b86d9.js => ProjectActivitySpentSynthesis-72e95239.js} (83%)
delete mode 100644 public/js/oscar/vite/dist/assets/TimesheetDeclaration-d2772701.css
create mode 100644 public/js/oscar/vite/dist/assets/TimesheetDeclaration-da0c6213.css
delete mode 100644 public/js/oscar/vite/dist/assets/TimesheetPersonResume-9b0a7e87.css
create mode 100644 public/js/oscar/vite/dist/assets/TimesheetPersonResume-b4a958be.css
delete mode 100644 public/js/oscar/vite/dist/assets/activity-60e009f3.js
create mode 100644 public/js/oscar/vite/dist/assets/activity-d961ddb0.js
rename public/js/oscar/vite/dist/assets/{activitydocuments-3139e448.js => activitydocuments-596bd3c4.js} (90%)
delete mode 100644 public/js/oscar/vite/dist/assets/activitymotscles-2e3e437b.js
create mode 100644 public/js/oscar/vite/dist/assets/activitymotscles-7b1fc39f.js
delete mode 100644 public/js/oscar/vite/dist/assets/activitymotsclesadmin-696ec89a.js
create mode 100644 public/js/oscar/vite/dist/assets/activitymotsclesadmin-70f45e39.js
rename public/js/oscar/vite/dist/assets/{activitynotes-e551577c.js => activitynotes-fbb89777.js} (86%)
create mode 100644 public/js/oscar/vite/dist/assets/activitypcruinformations-dff9ae49.js
create mode 100644 public/js/oscar/vite/dist/assets/activityspentdetails-a5d64488.js
rename public/js/oscar/vite/dist/assets/{activityspentsynthesis-ab25eb3e.js => activityspentsynthesis-841a21e7.js} (80%)
rename public/js/oscar/vite/dist/assets/{activityworkpackage-db6bf6ca.js => activityworkpackage-5bc07c5a.js} (81%)
create mode 100644 public/js/oscar/vite/dist/assets/adminroleorganization-20533524.js
delete mode 100644 public/js/oscar/vite/dist/assets/adminroleorganization-cbf876f6.js
delete mode 100644 public/js/oscar/vite/dist/assets/admintypedocument-1c0873ed.js
create mode 100644 public/js/oscar/vite/dist/assets/admintypedocument-d2d32e46.js
create mode 100644 public/js/oscar/vite/dist/assets/admintypeorganization-082a21a6.js
delete mode 100644 public/js/oscar/vite/dist/assets/admintypeorganization-aeb4f3d9.js
delete mode 100644 public/js/oscar/vite/dist/assets/authentification-09edda39.js
create mode 100644 public/js/oscar/vite/dist/assets/authentification-a6bb467f.js
create mode 100644 public/js/oscar/vite/dist/assets/declarerslist-a1389633.js
delete mode 100644 public/js/oscar/vite/dist/assets/declarerslist-b893a403.js
create mode 100644 public/js/oscar/vite/dist/assets/documentsindex-15fb2a66.js
delete mode 100644 public/js/oscar/vite/dist/assets/documentsindex-67bba6f4.js
rename public/js/oscar/vite/dist/assets/{documentsobserved-a8fe03be.js => documentsobserved-817c2fdd.js} (76%)
delete mode 100644 public/js/oscar/vite/dist/assets/organizationfiche-974d2695.js
create mode 100644 public/js/oscar/vite/dist/assets/organizationfiche-9bee7979.js
rename public/js/oscar/vite/dist/assets/{organizations_roled-3f3c28c3.js => organizations_roled-fc3b4fe4.js} (83%)
delete mode 100644 public/js/oscar/vite/dist/assets/organizationsuborganizations-39797503.js
create mode 100644 public/js/oscar/vite/dist/assets/organizationsuborganizations-ff9fde48.js
create mode 100644 public/js/oscar/vite/dist/assets/oscar-css-1c3ee0fe.css
delete mode 100644 public/js/oscar/vite/dist/assets/oscar-css-84bc208b.css
delete mode 100644 public/js/oscar/vite/dist/assets/oscarcss-10fdd0ac.js
create mode 100644 public/js/oscar/vite/dist/assets/oscarcss-71927fdb.js
create mode 100644 public/js/oscar/vite/dist/assets/pcrutransmissions-c01aec4b.js
rename public/js/oscar/vite/dist/assets/{persons_roled-a64a3a69.js => persons_roled-8fe5f491.js} (83%)
create mode 100644 public/js/oscar/vite/dist/assets/sticky-43d0d9fa.js
delete mode 100644 public/js/oscar/vite/dist/assets/sticky-f851c7f2.js
create mode 100644 public/js/oscar/vite/dist/assets/timesheetdeclarations-7cf9abf1.js
delete mode 100644 public/js/oscar/vite/dist/assets/timesheetdeclarations-8f08433e.js
create mode 100644 public/js/oscar/vite/dist/assets/timesheetpersonresume-14fb87b2.js
delete mode 100644 public/js/oscar/vite/dist/assets/timesheetpersonresume-70795659.js
diff --git a/public/js/oscar/vite/dist/assets/Activity-cc6ccf89.css b/public/js/oscar/vite/dist/assets/Activity-cc6ccf89.css
new file mode 100644
index 000000000..85554c544
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/Activity-cc6ccf89.css
@@ -0,0 +1 @@
+.confirm-dialog[data-v-efd4eea6]{z-index:10000;.overlay-content[data-v-efd4eea6] {flex-basis: 30% !important; h3[data-v-efd4eea6] {border-bottom: thin solid #eee; margin: .25em .5em; padding: .25em .5em;} .overlay-message[data-v-efd4eea6] {font-size: 1.4em;} nav[data-v-efd4eea6] {height: 50px; width: 100%; padding: .25em .5em; margin: .25em .5em; border-top: thin solid #eee; display: flex; flex-wrap: wrap; justify-content: space-between; align-content: space-between; a.btn[data-v-efd4eea6] {}}}}.disabled[data-v-833d8759]{cursor:not-allowed;color:#aaa;text-decoration:line-through}.change[data-v-833d8759]{border:1px solid #CCC;padding:.3em;margin:.5em 0;border-left:solid #CCC 4px;display:flex;> div[data-v-833d8759] {flex: 1; display: flex; span.text[data-v-833d8759] {flex: 0; font-weight: bold; white-space: nowrap;} select[data-v-833d8759],div[data-v-833d8759]{flex: 1;}} > i[data-v-833d8759] {flex: 0;} > nav[data-v-833d8759] {flex: 0; border-top: solid #CCC 4px; text-align: center;} > div[data-v-833d8759] {flex: 1; display: flex;}}.avenant[data-v-833d8759]{border-left:#CCC 4px solid;&.status-100[data-v-833d8759]{border-color:#ccc}&.status-200[data-v-833d8759]{border-color:#2d7800}p[data-v-833d8759] {border-top: solid #CCC 1px; padding: .5em 2em;} nav[data-v-833d8759] {padding: .3em 0; border-top: solid #CCC 1px; text-align: center;} .modification[data-v-833d8759] {padding: 0 1em;}}.jalon[data-v-42de1793]{background:white;padding:.25em 1em;margin-bottom:.2em}.jalon .main[data-v-42de1793]{display:inline-block;font-size:1.2em;text-align:left;border-bottom:solid thin #ddd;padding:.1em .5em}.jalon.payment[data-v-42de1793]{background:rgba(255,255,255,.7)}.time-value[data-v-42de1793]{font-weight:600}.time-value .ago[data-v-42de1793]{font-weight:100}.list{margin:1em 0}.person-text[data-v-dfc2c1c6]{display:inline-block;position:relative;.info-bulle[data-v-dfc2c1c6] {display: none;} &[data-v-dfc2c1c6]:hover {.info-bulle[data-v-dfc2c1c6] {display: block;}}}.info-bulle[data-v-dfc2c1c6]{position:absolute;text-shadow:none;background-color:#000000b3;box-shadow:-4px 4px 8px #0000004d;header[data-v-dfc2c1c6] {background: #222; display: flex; .infos[data-v-dfc2c1c6] {font-size: 1.25em; padding: 4px .5em 4px .5em; font-weight: 700; .firstname[data-v-dfc2c1c6] {line-height: 16px; font-size: 16px; color: rgba(255,255,255,.8); font-style: italic;} .lastname[data-v-dfc2c1c6] {color: #fff; line-height: 36px; font-size: 30px;}}} .content[data-v-dfc2c1c6] {i[data-v-dfc2c1c6] {color: #999;} font-size: .9em; background: #fff; color: #111; padding: .3em 1em; > div[data-v-dfc2c1c6] {border-bottom: dotted 1px #777; &[data-v-dfc2c1c6]:last-child {border-bottom: none;}}} footer[data-v-dfc2c1c6] {font-size: .7em; padding: 0 .25em; border-top: 1px solid #DDD; background-color: #EEE; color: #555; text-align: right;}}.workpackage[data-v-7f36a26b]{max-width:31%;margin:1%}.vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit{width:1em}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.activity-fiche[data-v-8de60033]{position:relative;padding-bottom:4em}.section-infos[data-v-8de60033]{margin-top:1em;scroll-margin-top:120px}.section-infos:target h2[data-v-8de60033]{-webkit-animation-name:animation-8de60033;-webkit-animation-duration:2s;-webkit-animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;-webkit-animation-play-state:running;animation-name:animation-8de60033;animation-duration:2s;animation-timing-function:ease-in-out;animation-iteration-count:1;animation-play-state:running}.section-infos>h2[data-v-8de60033]{border-bottom:1px solid #a2a7af;margin:0;padding:.2em 0;display:flex;justify-content:left;justify-content:space-between}@-webkit-keyframes animation-8de60033{0%{color:#333}15.0%{color:#0a53be}30.0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-8de60033{0%{color:#333}15.0%{color:#0a53be}30.0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}.activity-project[data-v-8de60033]{padding:.25em 1em .25em .25em;border-bottom:#eee solid thin}.activity-type[data-v-8de60033]{background:#EEE;padding:.25em 1em .25em .25em}.activity-type .icon-tag[data-v-8de60033]{color:#999}.type-chain span[data-v-8de60033]{font-weight:400}.type-chain span[data-v-8de60033]:last-child{font-weight:700}.type-chain span[data-v-8de60033]:last-child:after{content:""}.type-chain span[data-v-8de60033]{margin:auto}.type-chain span[data-v-8de60033]:after{content:" > ";color:#ccc}.buttons[data-v-8de60033]{padding:1em;text-align:right}header .line-bottom[data-v-8de60033]{border-bottom:#dee2ea thin solid;padding-bottom:1em}header h3[data-v-8de60033]{font-size:1em}header h4[data-v-8de60033]{color:#95afe3}header .texthighlight[data-v-8de60033]{color:#111}header .texthighlight strong[data-v-8de60033],header .texthighlight time[data-v-8de60033]{color:#000}.descriptionPacked[data-v-8de60033]{cursor:pointer;max-height:4em;overflow:hidden}.budget[data-v-8de60033]{border-left:#dee2ea thin solid}.budget .amount[data-v-8de60033]{font-size:1.4em;border-top:solid thin #EEE;border-bottom:solid thin #EEE}.budget .details[data-v-8de60033]{font-size:.8em}.budget .details small[data-v-8de60033]{display:block}
diff --git a/public/js/oscar/vite/dist/assets/Activity-ed5cb27b.css b/public/js/oscar/vite/dist/assets/Activity-ed5cb27b.css
deleted file mode 100644
index aedf910b0..000000000
--- a/public/js/oscar/vite/dist/assets/Activity-ed5cb27b.css
+++ /dev/null
@@ -1 +0,0 @@
-.confirm-dialog[data-v-efd4eea6]{z-index:10000}.confirm-dialog .overlay-content{h3[data-v-efd4eea6] {border-bottom: thin solid #eee; margin: .25em .5em; padding: .25em .5em;} .overlay-message[data-v-efd4eea6] {font-size: 1.4em;} nav {&[data-v-efd4eea6] {height: 50px; width: 100%; padding: .25em .5em; margin: .25em .5em; border-top: thin solid #eee; display: flex; flex-wrap: wrap; justify-content: space-between; align-content: space-between;} a.btn[data-v-efd4eea6] {}}}.confirm-dialog .overlay-content[data-v-efd4eea6]{flex-basis:30%!important}.disabled[data-v-833d8759]{cursor:not-allowed;color:#aaa;text-decoration:line-through}.change[data-v-833d8759]{border:1px solid #CCC;padding:.3em;margin:.5em 0;border-left:solid #CCC 4px;display:flex}.change>div{span.text[data-v-833d8759] {flex: 0; font-weight: bold; white-space: nowrap;} select[data-v-833d8759],div[data-v-833d8759]{flex: 1;}}.change>i[data-v-833d8759]{flex:0}.change>nav[data-v-833d8759]{flex:0;border-top:solid #CCC 4px;text-align:center}.change>div[data-v-833d8759]{flex:1;display:flex}.avenant{p[data-v-833d8759] {border-top: solid #CCC 1px; padding: .5em 2em;} nav[data-v-833d8759] {padding: .3em 0; border-top: solid #CCC 1px; text-align: center;} .modification[data-v-833d8759] {padding: 0 1em;}}.avenant[data-v-833d8759]{border-left:#CCC 4px solid}.avenant.status-100[data-v-833d8759]{border-color:#ccc}.avenant.status-200[data-v-833d8759]{border-color:#2d7800}.jalon[data-v-42de1793]{background:white;padding:.25em 1em;margin-bottom:.2em}.jalon .main[data-v-42de1793]{display:inline-block;font-size:1.2em;text-align:left;border-bottom:solid thin #ddd;padding:.1em .5em}.jalon.payment[data-v-42de1793]{background:rgba(255,255,255,.7)}.time-value[data-v-42de1793]{font-weight:600}.time-value .ago[data-v-42de1793]{font-weight:100}.list{margin:1em 0}.person-text[data-v-dfc2c1c6]{display:inline-block;position:relative}.person-text .info-bulle[data-v-dfc2c1c6]{display:none}.person-text:hover .info-bulle[data-v-dfc2c1c6]{display:block}.info-bulle{header {&[data-v-dfc2c1c6] {background: #222; display: flex;} .infos {&[data-v-dfc2c1c6] {font-size: 1.25em; padding: 4px .5em 4px .5em; font-weight: 700;} .firstname[data-v-dfc2c1c6] {line-height: 16px; font-size: 16px; color: rgba(255,255,255,.8); font-style: italic;} .lastname[data-v-dfc2c1c6] {color: #fff; line-height: 36px; font-size: 30px;}}} .content {&[data-v-dfc2c1c6] {font-size: .9em; background: #fff; color: #111; padding: .3em 1em;} i[data-v-dfc2c1c6] {color: #999;} > div {&[data-v-dfc2c1c6] {border-bottom: dotted 1px #777;} &[data-v-dfc2c1c6]:last-child {border-bottom: none;}}} footer[data-v-dfc2c1c6] {font-size: .7em; padding: 0 .25em; border-top: 1px solid #DDD; background-color: #EEE; color: #555; text-align: right;}}.info-bulle[data-v-dfc2c1c6]{position:absolute;text-shadow:none;background-color:#000000b3;box-shadow:-4px 4px 8px #0000004d}.workpackage[data-v-7f36a26b]{max-width:31%;margin:1%}.vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit{width:1em}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;-webkit-user-select:none;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.activity-fiche[data-v-8de60033]{position:relative;padding-bottom:4em}.section-infos[data-v-8de60033]{margin-top:1em;scroll-margin-top:120px}.section-infos:target h2[data-v-8de60033]{-webkit-animation-name:animation-8de60033;-webkit-animation-duration:2s;-webkit-animation-timing-function:ease-in-out;-webkit-animation-iteration-count:1;-webkit-animation-play-state:running;animation-name:animation-8de60033;animation-duration:2s;animation-timing-function:ease-in-out;animation-iteration-count:1;animation-play-state:running}.section-infos>h2[data-v-8de60033]{border-bottom:1px solid #a2a7af;margin:0;padding:.2em 0;display:flex;justify-content:left;justify-content:space-between}@-webkit-keyframes animation-8de60033{0%{color:#333}15.0%{color:#0a53be}30.0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-8de60033{0%{color:#333}15.0%{color:#0a53be}30.0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}.activity-project[data-v-8de60033]{padding:.25em 1em .25em .25em;border-bottom:#eee solid thin}.activity-type[data-v-8de60033]{background:#EEE;padding:.25em 1em .25em .25em}.activity-type .icon-tag[data-v-8de60033]{color:#999}.type-chain span[data-v-8de60033]{font-weight:400}.type-chain span[data-v-8de60033]:last-child{font-weight:700}.type-chain span[data-v-8de60033]:last-child:after{content:""}.type-chain span[data-v-8de60033]{margin:auto}.type-chain span[data-v-8de60033]:after{content:" > ";color:#ccc}.buttons[data-v-8de60033]{padding:1em;text-align:right}header .line-bottom[data-v-8de60033]{border-bottom:#dee2ea thin solid;padding-bottom:1em}header h3[data-v-8de60033]{font-size:1em}header h4[data-v-8de60033]{color:#95afe3}header .texthighlight[data-v-8de60033]{color:#111}header .texthighlight strong[data-v-8de60033],header .texthighlight time[data-v-8de60033]{color:#000}.descriptionPacked[data-v-8de60033]{cursor:pointer;max-height:4em;overflow:hidden}.budget[data-v-8de60033]{border-left:#dee2ea thin solid}.budget .amount[data-v-8de60033]{font-size:1.4em;border-top:solid thin #EEE;border-bottom:solid thin #EEE}.budget .details[data-v-8de60033]{font-size:.8em}.budget .details small[data-v-8de60033]{display:block}
diff --git a/public/js/oscar/vite/dist/assets/ActivityDocument-be06c000.css b/public/js/oscar/vite/dist/assets/ActivityDocument-2deed9d1.css
similarity index 86%
rename from public/js/oscar/vite/dist/assets/ActivityDocument-be06c000.css
rename to public/js/oscar/vite/dist/assets/ActivityDocument-2deed9d1.css
index 086286040..cd5c87292 100644
--- a/public/js/oscar/vite/dist/assets/ActivityDocument-be06c000.css
+++ b/public/js/oscar/vite/dist/assets/ActivityDocument-2deed9d1.css
@@ -1 +1 @@
-.step-content[data-v-fc17618a]{border:thin solid #aaa;border-top:none;padding:1em}.card .alert[data-v-fc17618a]{padding:0 .5em;margin:.1em}.step[data-v-fc17618a]{flex:1;padding:.25em 1em 1em;text-align:left;border:1px solid #aaa;border-left:4px solid #aaa;margin:.5em}.step.error[data-v-fc17618a]{border-color:#900}.step .alert[data-v-fc17618a]{margin:0;padding:.25em 1em}.current[data-v-fc17618a]{color:#333;background:white;border-bottom-color:#fff}.private[data-v-fc17618a]{color:#777;text-shadow:1px -1px 1px rgba(255,255,255,.3);font-weight:100}.stepHandler[data-v-fc17618a]{border-radius:18px;outline:0;padding:8px 12px;text-align:center;transition:all .3s ease-out;display:inline-block;margin-left:100px}.stepHandler[data-v-fc17618a]:before{font-family:fontello;content:""}.stepHandler[data-v-fc17618a]:hover,.stepHandler[data-v-fc17618a]:focus{color:#333;background:#8E969F}
+.step-content[data-v-fc17618a]{border:thin solid #aaa;border-top:none;padding:1em}.card .alert[data-v-fc17618a]{padding:0 .5em;margin:.1em}.step[data-v-fc17618a]{flex:1;padding:.25em 1em 1em;text-align:left;border:1px solid #aaa;border-left:4px solid #aaa;margin:.5em}.step.error[data-v-fc17618a]{border-color:#900}.step .alert[data-v-fc17618a]{margin:0;padding:.25em 1em}.current[data-v-fc17618a]{color:#333;background:white;border-bottom-color:#fff}.private[data-v-fc17618a]{color:#777;text-shadow:1px -1px 1px rgba(255,255,255,.3);font-weight:100}.stepHandler[data-v-fc17618a]{border-radius:18px;outline:0;padding:8px 12px;text-align:center;transition:all .3s ease-out;display:inline-block;margin-left:100px}.stepHandler[data-v-fc17618a]:before{font-family:fontello;content:"\e8a4"}.stepHandler[data-v-fc17618a]:hover,.stepHandler[data-v-fc17618a]:focus{color:#333;background:#8E969F}
diff --git a/public/js/oscar/vite/dist/assets/ActivityNotes-57bb9039.css b/public/js/oscar/vite/dist/assets/ActivityNotes-57bb9039.css
deleted file mode 100644
index a990cc486..000000000
--- a/public/js/oscar/vite/dist/assets/ActivityNotes-57bb9039.css
+++ /dev/null
@@ -1 +0,0 @@
-.note[data-v-543bfc57]{background-color:#fff;margin:0 0 .5em;padding:0}.note .note-header[data-v-543bfc57]{padding:.2em 1em;border-bottom:solid thin #DDD;display:flex;justify-content:space-between}.note .note-content[data-v-543bfc57]{padding:.2em 1em;white-space:pre-wrap;font-family:monospace}
diff --git a/public/js/oscar/vite/dist/assets/ActivityNotes-b71891b4.css b/public/js/oscar/vite/dist/assets/ActivityNotes-b71891b4.css
new file mode 100644
index 000000000..c77a55c21
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/ActivityNotes-b71891b4.css
@@ -0,0 +1 @@
+.note[data-v-543bfc57]{background-color:#fff;margin:0 0 .5em;padding:0;.note-header[data-v-543bfc57] {padding: .2em 1em; border-bottom: solid thin #DDD; display: flex; justify-content: space-between;} .note-content[data-v-543bfc57] {padding: .2em 1em; white-space: pre-wrap; font-family: monospace;}}
diff --git a/public/js/oscar/vite/dist/assets/ActivityPcruInformations-cccdc180.css b/public/js/oscar/vite/dist/assets/ActivityPcruInformations-cccdc180.css
new file mode 100644
index 000000000..597d30db0
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/ActivityPcruInformations-cccdc180.css
@@ -0,0 +1 @@
+#form-table{background:white;padding:.5em;display:grid;grid-template-columns:.1fr .8fr .9fr 1fr 1fr .3fr 1fr;text-align:center}.header{font-weight:700}#form-table>*{border:1px solid #ddd;align-content:center}#form-table>label{margin-bottom:0}#donnees-envoyees-table{background:white;padding:.5em;display:grid;grid-template-columns:.1fr .9fr 1.4fr 1.4fr 1.3fr;text-align:center}#donnees-envoyees-table>*{border:1px solid #ddd;align-content:center}#donnees-envoyees-table>label{margin-bottom:0}.invalid{background-color:#f2dede;border:2px solid red}.invalidSpan{color:#a94442;font-weight:700}ul{margin-bottom:0}label{font-weight:400}form input[disabled],form select[disabled]{cursor:not-allowed}.info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.error{background-color:#f2dede;border-color:#ebccd1;color:#a94442;padding:15px;border:1px solid transparent}.success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}input.bold:not(.invalid){border:2px solid black}select.bold:not(.invalid){border:2px solid black}
diff --git a/public/js/oscar/vite/dist/assets/DocumentsList-4af197b4.css b/public/js/oscar/vite/dist/assets/DocumentsList-4af197b4.css
deleted file mode 100644
index bf115ea53..000000000
--- a/public/js/oscar/vite/dist/assets/DocumentsList-4af197b4.css
+++ /dev/null
@@ -1 +0,0 @@
-.step-content[data-v-65e61e4a]{border:thin solid #aaa;border-top:none;padding:1em}.document-metas[data-v-65e61e4a]{display:flex;justify-content:space-between}.document-metas>*[data-v-65e61e4a]{flex:auto}.card .alert[data-v-65e61e4a]{padding:0 .5em;margin:.1em}.step[data-v-65e61e4a]{flex:1;padding:.25em 1em 1em;text-align:left;border:1px solid #aaa;border-left:4px solid #aaa;margin:.5em}.step.error[data-v-65e61e4a]{border-color:#900}.step .alert[data-v-65e61e4a]{margin:0;padding:.25em 1em}.current[data-v-65e61e4a]{color:#333;background:white;border-bottom-color:#fff}.private[data-v-65e61e4a]{color:#777;text-shadow:1px -1px 1px rgba(255,255,255,.3);font-weight:100}.stepHandler[data-v-65e61e4a]{border-radius:18px;outline:0;padding:8px 12px;text-align:center;transition:all .3s ease-out;display:inline-block;margin-left:100px}.stepHandler[data-v-65e61e4a]:before{font-family:fontello;content:""}.stepHandler[data-v-65e61e4a]:hover,.stepHandler[data-v-65e61e4a]:focus{color:#333;background:#8E969F}.process[data-v-65e61e4a],.signature[data-v-65e61e4a]{background:white;padding:.5em 1em;margin:1em;border:thin solid #92b2ae;border-left-width:8px}.signature h2[data-v-65e61e4a]{font-size:1.5em;margin:0;border-bottom:solid thin #c5c5c5;padding:.1em 0;display:flex}.signature h2 span[data-v-65e61e4a]{flex:1 1 auto}.signature h2 .status-flag[data-v-65e61e4a]{flex:0 0 6em;text-align:right}.buttons-bar[data-v-65e61e4a]{padding:.5em}.signature .recipient[data-v-65e61e4a]{display:block}.signature .recipient .title[data-v-65e61e4a]{display:flex}.recipient[data-v-65e61e4a]{border:solid thin #92b2ae;border-left-width:8px;text-shadow:4px -1px 0 rgb(255,255,255,.3);padding:.2em 0 .2em .5em;margin-right:.5em}.recipient label[data-v-65e61e4a]{display:flex;justify-content:space-between}.recipient .fullname[data-v-65e61e4a]{flex:1}.recipient .email[data-v-65e61e4a]{flex:0;margin-right:auto;text-align:right}.recipient label[data-v-65e61e4a]{display:flex;padding:0 1em 0 0;width:100%;color:#777}.recipient.selected[data-v-65e61e4a]{border-color:#12b368;background:#adfad8}.recipient.selected label[data-v-65e61e4a]{color:#000}.recipient .email[data-v-65e61e4a],.recipient .fullname[data-v-65e61e4a]{flex:1}.recipient .status-flag[data-v-65e61e4a]{flex:0 0 6em}.metas[data-v-65e61e4a]{display:inline-block;margin:0;padding:.5em 0}.metas .meta[data-v-65e61e4a]{display:inline-block;background:#d4dedd;padding:0 .5em;border-radius:8px}.recipient-signature[data-v-65e61e4a]{background:white;margin:.5em 0;padding:.7em 1em .1em;border-left:solid 4px #666666}.observer-inline[data-v-65e61e4a]{background:#e1ece6;display:inline-block;border-radius:4px;padding:0 .5em;margin:0 .3em}.recipient-signature h3[data-v-65e61e4a]{margin:0}.status:hover .status-text[data-v-65e61e4a]{opacity:1}.status .status-text[data-v-65e61e4a]{transition:opacity .3s;font-weight:700;color:#fff;text-shadow:-1px 1px 0 rgba(0,0,0,.5);margin:0;padding:0 .25em;font-size:.75em}.status-flag[data-v-65e61e4a]{display:none}.signature-status-501[data-v-65e61e4a]{border-color:#83243a}.signature-status-501 .status-text[data-v-65e61e4a],.signature-status-501 .status-flag[data-v-65e61e4a]{background-color:#83243a}.signature-status-501 .status-flag[data-v-65e61e4a]:before{content:""}.signature-status-401[data-v-65e61e4a]{border-left-color:#8d7260}.signature-status-401 .status-text[data-v-65e61e4a],.signature-status-401 .status-flag[data-v-65e61e4a]{background-color:#8d7260}.signature-status-401 .status-flag[data-v-65e61e4a]:before{content:""}.signature-status-105[data-v-65e61e4a]{border-left-color:#8eb4c9}.signature-status-105 .status-text[data-v-65e61e4a],.signature-status-105 .status-flag[data-v-65e61e4a]{background-color:#8eb4c9}.signature-status-105 .status-flag[data-v-65e61e4a]:before{content:""}.signature-status-101[data-v-65e61e4a]{border-left-color:#92b2ae}.signature-status-101 .status-text[data-v-65e61e4a],.signature-status-101 .status-flag[data-v-65e61e4a]{background-color:#92b2ae}.signature-status-101 .status-flag[data-v-65e61e4a]:before{content:""}.signature-status-201[data-v-65e61e4a]{border-left-color:#447c44}.signature-status-201 .status-text[data-v-65e61e4a],.signature-status-201 .status-flag[data-v-65e61e4a]{background-color:#447c44}.signature-status-201 .status-flag[data-v-65e61e4a]:before{content:""}
diff --git a/public/js/oscar/vite/dist/assets/DocumentsList-4e009bf5.css b/public/js/oscar/vite/dist/assets/DocumentsList-4e009bf5.css
new file mode 100644
index 000000000..cdb9b712a
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/DocumentsList-4e009bf5.css
@@ -0,0 +1 @@
+.step-content[data-v-65e61e4a]{border:thin solid #aaa;border-top:none;padding:1em}.document-metas[data-v-65e61e4a]{display:flex;justify-content:space-between;>*[data-v-65e61e4a] {flex: auto;}}.card .alert[data-v-65e61e4a]{padding:0 .5em;margin:.1em}.step[data-v-65e61e4a]{flex:1;padding:.25em 1em 1em;text-align:left;border:1px solid #aaa;border-left:4px solid #aaa;margin:.5em}.step.error[data-v-65e61e4a]{border-color:#900}.step .alert[data-v-65e61e4a]{margin:0;padding:.25em 1em}.current[data-v-65e61e4a]{color:#333;background:white;border-bottom-color:#fff}.private[data-v-65e61e4a]{color:#777;text-shadow:1px -1px 1px rgba(255,255,255,.3);font-weight:100}.stepHandler[data-v-65e61e4a]{border-radius:18px;outline:0;padding:8px 12px;text-align:center;transition:all .3s ease-out;display:inline-block;margin-left:100px}.stepHandler[data-v-65e61e4a]:before{font-family:fontello;content:"\e8a4"}.stepHandler[data-v-65e61e4a]:hover,.stepHandler[data-v-65e61e4a]:focus{color:#333;background:#8E969F}.process[data-v-65e61e4a],.signature[data-v-65e61e4a]{background:white;padding:.5em 1em;margin:1em;border:thin solid #92b2ae;border-left-width:8px}.signature h2[data-v-65e61e4a]{font-size:1.5em;margin:0;border-bottom:solid thin #c5c5c5;padding:.1em 0;display:flex}.signature h2 span[data-v-65e61e4a]{flex:1 1 auto}.signature h2 .status-flag[data-v-65e61e4a]{flex:0 0 6em;text-align:right}.buttons-bar[data-v-65e61e4a]{padding:.5em}.signature .recipient[data-v-65e61e4a]{display:block}.signature .recipient .title[data-v-65e61e4a]{display:flex}.recipient[data-v-65e61e4a]{border:solid thin #92b2ae;border-left-width:8px;text-shadow:4px -1px 0 rgb(255,255,255,.3);padding:.2em 0 .2em .5em;margin-right:.5em}.recipient label[data-v-65e61e4a]{display:flex;justify-content:space-between}.recipient .fullname[data-v-65e61e4a]{flex:1}.recipient .email[data-v-65e61e4a]{flex:0;margin-right:auto;text-align:right}.recipient label[data-v-65e61e4a]{display:flex;padding:0 1em 0 0;width:100%;color:#777}.recipient.selected[data-v-65e61e4a]{border-color:#12b368;background:#adfad8}.recipient.selected label[data-v-65e61e4a]{color:#000}.recipient .email[data-v-65e61e4a],.recipient .fullname[data-v-65e61e4a]{flex:1}.recipient .status-flag[data-v-65e61e4a]{flex:0 0 6em}.metas[data-v-65e61e4a]{display:inline-block;margin:0;padding:.5em 0}.metas .meta[data-v-65e61e4a]{display:inline-block;background:#d4dedd;padding:0 .5em;border-radius:8px}.recipient-signature[data-v-65e61e4a]{background:white;margin:.5em 0;padding:.7em 1em .1em;border-left:solid 4px #666666}.observer-inline[data-v-65e61e4a]{background:#e1ece6;display:inline-block;border-radius:4px;padding:0 .5em;margin:0 .3em}.recipient-signature h3[data-v-65e61e4a]{margin:0}.status:hover .status-text[data-v-65e61e4a]{opacity:1}.status .status-text[data-v-65e61e4a]{transition:opacity .3s;font-weight:700;color:#fff;text-shadow:-1px 1px 0 rgba(0,0,0,.5);margin:0;padding:0 .25em;font-size:.75em}.status-flag[data-v-65e61e4a]{display:none}.signature-status-501[data-v-65e61e4a]{border-color:#83243a}.signature-status-501 .status-text[data-v-65e61e4a],.signature-status-501 .status-flag[data-v-65e61e4a]{background-color:#83243a}.signature-status-501 .status-flag[data-v-65e61e4a]:before{content:"\e85d"}.signature-status-401[data-v-65e61e4a]{border-left-color:#8d7260}.signature-status-401 .status-text[data-v-65e61e4a],.signature-status-401 .status-flag[data-v-65e61e4a]{background-color:#8d7260}.signature-status-401 .status-flag[data-v-65e61e4a]:before{content:"\e803"}.signature-status-105[data-v-65e61e4a]{border-left-color:#8eb4c9}.signature-status-105 .status-text[data-v-65e61e4a],.signature-status-105 .status-flag[data-v-65e61e4a]{background-color:#8eb4c9}.signature-status-105 .status-flag[data-v-65e61e4a]:before{content:"\e88d"}.signature-status-101[data-v-65e61e4a]{border-left-color:#92b2ae}.signature-status-101 .status-text[data-v-65e61e4a],.signature-status-101 .status-flag[data-v-65e61e4a]{background-color:#92b2ae}.signature-status-101 .status-flag[data-v-65e61e4a]:before{content:"\f252"}.signature-status-201[data-v-65e61e4a]{border-left-color:#447c44}.signature-status-201 .status-text[data-v-65e61e4a],.signature-status-201 .status-flag[data-v-65e61e4a]{background-color:#447c44}.signature-status-201 .status-flag[data-v-65e61e4a]:before{content:"\e87f"}
diff --git a/public/js/oscar/vite/dist/assets/Loader-ee83f9da.css b/public/js/oscar/vite/dist/assets/Loader-ee83f9da.css
new file mode 100644
index 000000000..476bc1c2f
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/Loader-ee83f9da.css
@@ -0,0 +1 @@
+.loader[data-v-573ae632]{background-color:#fffc;display:flex;align-items:center;justify-content:center;.message[data-v-573ae632] {text-align: center; font-size: 1em; font-weight: 600; -webkit-animation-name: animation-573ae632; -webkit-animation-duration: .5s; -webkit-animation-timing-function: ease-in-out; -webkit-animation-iteration-count: infinite; -webkit-animation-play-state: running; animation-name: animation-573ae632; animation-duration: .5s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-play-state: running; .from[data-v-573ae632] {font-size: .7em; font-weight: 300;}}}@-webkit-keyframes animation-573ae632{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-573ae632{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}
diff --git a/public/js/oscar/vite/dist/assets/Loader-f7bf6891.css b/public/js/oscar/vite/dist/assets/Loader-f7bf6891.css
deleted file mode 100644
index 3cfa8cc30..000000000
--- a/public/js/oscar/vite/dist/assets/Loader-f7bf6891.css
+++ /dev/null
@@ -1 +0,0 @@
-.loader[data-v-573ae632]{background-color:#fffc;display:flex;align-items:center;justify-content:center}.loader .message[data-v-573ae632]{text-align:center;font-size:1em;font-weight:600;-webkit-animation-name:animation-573ae632;-webkit-animation-duration:.5s;-webkit-animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;-webkit-animation-play-state:running;animation-name:animation-573ae632;animation-duration:.5s;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-play-state:running}.loader .message .from[data-v-573ae632]{font-size:.7em;font-weight:300}@-webkit-keyframes animation-573ae632{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-573ae632{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}
diff --git a/public/js/oscar/vite/dist/assets/Modal-2266e1e2.css b/public/js/oscar/vite/dist/assets/Modal-2266e1e2.css
new file mode 100644
index 000000000..1ae316c5b
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/Modal-2266e1e2.css
@@ -0,0 +1 @@
+.overlay[data-v-8e477e4f]{z-index:5000;.overlay-content[data-v-8e477e4f] {height: 90vh; position: relative; .overlay-pending[data-v-8e477e4f] {font-weight: 600; min-height: 10em; line-height: 10em; text-align: center; -webkit-animation-name: animation-8e477e4f; -webkit-animation-duration: 1s; -webkit-animation-timing-function: ease-in-out; -webkit-animation-iteration-count: infinite; -webkit-animation-play-state: running; animation-name: animation-8e477e4f; animation-duration: 1s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-play-state: running;} .overlay-title[data-v-8e477e4f] {color: #333; padding: .25em; position: relative; height: 2em; .overlay-closer[data-v-8e477e4f] {position: absolute; right: 0em; top: 0;}} .overlay-buttons[data-v-8e477e4f] {text-align: center; padding: .5em 0 .3em 0; position: absolute; bottom: 0; left: 0; right: 0;} .overlay-body[data-v-8e477e4f] {border: thin solid #eee; background: #FEFEFE; margin: 1em; position: absolute; top: 2.5em; left: 0; right: 0; bottom: 2.5em; overflow: scroll;}}}@-webkit-keyframes animation-8e477e4f{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-8e477e4f{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}
diff --git a/public/js/oscar/vite/dist/assets/Modal-700b8a23.css b/public/js/oscar/vite/dist/assets/Modal-700b8a23.css
deleted file mode 100644
index 435b0ec6d..000000000
--- a/public/js/oscar/vite/dist/assets/Modal-700b8a23.css
+++ /dev/null
@@ -1 +0,0 @@
-.overlay[data-v-8e477e4f]{z-index:5000}.overlay .overlay-content[data-v-8e477e4f]{height:90vh;position:relative}.overlay .overlay-content .overlay-pending[data-v-8e477e4f]{font-weight:600;min-height:10em;line-height:10em;text-align:center;-webkit-animation-name:animation-8e477e4f;-webkit-animation-duration:1s;-webkit-animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;-webkit-animation-play-state:running;animation-name:animation-8e477e4f;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-play-state:running}.overlay .overlay-content .overlay-title[data-v-8e477e4f]{color:#333;padding:.25em;position:relative;height:2em}.overlay .overlay-content .overlay-title .overlay-closer[data-v-8e477e4f]{position:absolute;right:0;top:0}.overlay .overlay-content .overlay-buttons[data-v-8e477e4f]{text-align:center;padding:.5em 0 .3em;position:absolute;bottom:0;left:0;right:0}.overlay .overlay-content .overlay-body[data-v-8e477e4f]{border:thin solid #eee;background:#FEFEFE;margin:1em;position:absolute;top:2.5em;left:0;right:0;bottom:2.5em;overflow:scroll}@-webkit-keyframes animation-8e477e4f{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}@keyframes animation-8e477e4f{0%{color:#333}50.0%{color:#0a53be}100.0%{color:#333}}
diff --git a/public/js/oscar/vite/dist/assets/PcruTransmissions-d5165e09.css b/public/js/oscar/vite/dist/assets/PcruTransmissions-d5165e09.css
new file mode 100644
index 000000000..301515bec
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/PcruTransmissions-d5165e09.css
@@ -0,0 +1 @@
+.info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.warning{background-color:#fcf8e3;color:#8a6d3b}.error{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}td,th{padding:.5em}.button{border:1px solid;border-radius:4px;padding-left:.4em;padding-right:.4em}td span:not(:first-child){margin-left:.5em}
diff --git a/public/js/oscar/vite/dist/assets/ProjectActivityLogs-934299c2.js b/public/js/oscar/vite/dist/assets/ProjectActivityLogs-a43a204c.js
similarity index 88%
rename from public/js/oscar/vite/dist/assets/ProjectActivityLogs-934299c2.js
rename to public/js/oscar/vite/dist/assets/ProjectActivityLogs-a43a204c.js
index 7f2e2f272..e9d4b85fd 100644
--- a/public/js/oscar/vite/dist/assets/ProjectActivityLogs-934299c2.js
+++ b/public/js/oscar/vite/dist/assets/ProjectActivityLogs-a43a204c.js
@@ -1 +1 @@
-import{y as o}from"../vendor.js";import{m as e}from"../vendor2.js";import{A as i}from"../vendor11.js";import{t as m}from"../vendor19.js";import"../vendor5.js";import"../vendor7.js";import"../vendor14.js";import"../vendor16.js";let l=document.querySelector("#activity-logs");const r=o(i,{url:l.dataset.url});r.config.globalProperties.$filters={timeAgo(t){return e.timeAgo(t)},date(t){return e.date(t)},dateFull(t){return e.dateFull(t)},filesize(t){return filesize.filesize(t)},money(t){return money.money(t)},log(t){return m.log(t)}};r.mount("#activity-logs");
+import{A as o}from"../vendor.js";import{m as e}from"../vendor2.js";import{A as i}from"../vendor11.js";import{t as m}from"../vendor19.js";import"../vendor5.js";import"../vendor7.js";import"../vendor14.js";import"../vendor16.js";let l=document.querySelector("#activity-logs");const r=o(i,{url:l.dataset.url});r.config.globalProperties.$filters={timeAgo(t){return e.timeAgo(t)},date(t){return e.date(t)},dateFull(t){return e.dateFull(t)},filesize(t){return filesize.filesize(t)},money(t){return money.money(t)},log(t){return m.log(t)}};r.mount("#activity-logs");
diff --git a/public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-283b86d9.js b/public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-72e95239.js
similarity index 83%
rename from public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-283b86d9.js
rename to public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-72e95239.js
index 52742a8e5..87c09797a 100644
--- a/public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-283b86d9.js
+++ b/public/js/oscar/vite/dist/assets/ProjectActivitySpentSynthesis-72e95239.js
@@ -1 +1 @@
-import{y as n}from"../vendor.js";import{A as r}from"../vendor13.js";import{m as s}from"../vendor4.js";import"../vendor7.js";let e=document.querySelector("#depenses2");const o=n(r,{url:e.dataset.url,standalone:!0,datas:{},syncurl:e.dataset.syncurl});o.config.globalProperties.$filters={money:function(t){return s.money(t)}};console.log("DEPENSE2");console.log(e.dataset);o.mount("#depenses2");
+import{A as n}from"../vendor.js";import{A as r}from"../vendor13.js";import{m as s}from"../vendor4.js";import"../vendor7.js";let e=document.querySelector("#depenses2");const o=n(r,{url:e.dataset.url,standalone:!0,datas:{},syncurl:e.dataset.syncurl});o.config.globalProperties.$filters={money:function(t){return s.money(t)}};console.log("DEPENSE2");console.log(e.dataset);o.mount("#depenses2");
diff --git a/public/js/oscar/vite/dist/assets/TimesheetDeclaration-d2772701.css b/public/js/oscar/vite/dist/assets/TimesheetDeclaration-d2772701.css
deleted file mode 100644
index 8d010070b..000000000
--- a/public/js/oscar/vite/dist/assets/TimesheetDeclaration-d2772701.css
+++ /dev/null
@@ -1 +0,0 @@
-@charset "UTF-8";.cartouche[data-v-45fb2e96]{white-space:nowrap;margin:0;border-radius:2px;box-shadow:none;font-size:.75em}.cartouche.training[data-v-45fb2e96]{background-color:#0b58a2}.cartouche.sickleave[data-v-45fb2e96]{background-color:olive}.cartouche.wp[data-v-45fb2e96]{background-color:#6a5999}.cartouche.conflict[data-v-45fb2e96]{background:#AA0000}.timesheet-item[data-v-c5ac47ec]{background:rgb(226.95,230.35,232.05);cursor:pointer;border:thin rgb(91.8,105.4,112.2) solid;margin:.3em 0;font-size:1em;display:flex;position:relative;transition:all .3s}.timesheet-item[data-v-c5ac47ec]>*{padding:.3em .5em}.timesheet-item .project-acronym[data-v-c5ac47ec]{transition:all .3s;position:relative;display:inline-block;padding-right:.8em;padding-left:.8em;color:#abb5ba;background:rgb(91.8,105.4,112.2);text-shadow:-1px 1px 0 rgba(0,0,0,.3);font-weight:700}.timesheet-item .project-acronym[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1em;height:1em;background:rgba(255,255,255,0);transform:rotate(45deg);position:absolute;left:-.6em;top:.6em;z-index:10000}.timesheet-item .activity-label[data-v-c5ac47ec]{transition:all .3s;position:relative;display:inline-block;padding-left:1em;padding-right:1em;background:rgb(170.85,181.05,186.15);color:#171a1c;font-size:.8em;line-height:2em}.timesheet-item .activity-label[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1.2em;height:1.2em;background:rgb(91.8,105.4,112.2);transform:rotate(45deg);position:absolute;left:-.6em;top:.6em;z-index:10000}.timesheet-item .workpackage-infos[data-v-c5ac47ec]{transition:all .3s;position:relative;padding-left:1em}.timesheet-item .workpackage-infos[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1em;height:1em;background:rgb(170.85,181.05,186.15);transform:rotate(45deg);position:absolute;left:-.6em;top:.5em;z-index:10000}.timesheet-item.selected[data-v-c5ac47ec],.timesheet-item[data-v-c5ac47ec]:hover{background:white;border:thin #0088cc solid;color:#08c}.timesheet-item.selected .project-acronym[data-v-c5ac47ec],.timesheet-item:hover .project-acronym[data-v-c5ac47ec]{color:#9df;background:#0088cc}.timesheet-item.selected .activity-label[data-v-c5ac47ec],.timesheet-item:hover .activity-label[data-v-c5ac47ec]{background:#66ccff;color:#023}.timesheet-item.selected .activity-label[data-v-c5ac47ec]:before,.timesheet-item:hover .activity-label[data-v-c5ac47ec]:before{background:#0088cc}.timesheet-item.selected .workpackage-infos[data-v-c5ac47ec]:before,.timesheet-item:hover .workpackage-infos[data-v-c5ac47ec]:before{background:#66ccff}.timesheet-item.horslots-item .workpackage-infos[data-v-c5ac47ec]{flex:1}.timesheet-item.horslots-item .activity-label[data-v-c5ac47ec]:before{content:none}.timesheet-item.horslots-item .workpackage-infos[data-v-c5ac47ec]:before{background:rgb(91.8,105.4,112.2);top:.8em}.timesheet-item.horslots-item.selected .workpackage-infos[data-v-c5ac47ec]:before,.timesheet-item.horslots-item:hover .workpackage-infos[data-v-c5ac47ec]:before{background:#0088cc}.timesheet-item.selected[data-v-c5ac47ec]{box-shadow:.25em 0 .5em #08cc}.timesheet-item.selected .project-acronym[data-v-c5ac47ec]:before{background:white}.wp-duration{display:flex;border-bottom:thin solid white;align-items:center}.wp-duration strong small{font-weight:100}.wp-duration[class*=status-]{border-left:solid 4px #ddd}.wp-duration.status-5{border-left-color:#0b58a2}.wp-duration .icon-comment{color:#ccc}.wp-duration .icon-comment.with-comment{color:#000}.left{flex:0 0 35px;overflow:hidden;display:flex;flex-direction:column;padding-left:8px;border-left:solid #fff thin}.total{margin-left:auto;font-size:1.4em;font-weight:700;padding-right:.5em}.total em{font-size:.5em;font-weight:100;line-height:2em}[class*=icon-]{text-align:center}.icon-trash,.icon-edit{cursor:pointer;text-align:center}.icon-trash:hover,.icon-edit:hover{background:#0b58a2;color:#fff}.ui-timechooser[data-v-755f0c71]{background:white;border:solid 1px #ddd;max-width:450px;margin:0 auto}.ui-timechooser .percents[data-v-755f0c71]{border-bottom:1px solid #ddd;display:flex}.ui-timechooser .percents span[data-v-755f0c71]{flex:1 1 auto;padding:2px 4px;text-align:center;font-size:2em;cursor:pointer}.ui-timechooser .percents span[data-v-755f0c71]:hover,.ui-timechooser .percents span.selected[data-v-755f0c71]{background-color:#0b58a2;color:#fff}.ui-timechooser .hours[data-v-755f0c71]{font-size:48px;text-align:center;font-weight:700;display:flex;justify-items:center;justify-content:center;font-size:2em}.ui-timechooser .hours .sel[data-v-755f0c71]{border:thin solid #ddd;padding:0;display:flex;flex-direction:column}.ui-timechooser .hours .sel i[data-v-755f0c71]{font-size:1em;cursor:pointer;text-shadow:0 0 4px rgba(0,0,0,.1)}.ui-timechooser .hours .sel i[data-v-755f0c71]:hover{background:#5c9ccc;color:#fff}.ui-timechooser .hours .separator[data-v-755f0c71]{color:red}.repport-item .icon-attention-circled{display:none}.repport-item.excess{color:#900;border-left:4px solid red}.repport-item.excess .icon-attention-circled{display:inline-block}.interaction-off{cursor:default;pointer-events:none}.interactive-icon-big{font-size:32px;cursor:pointer}.card.locked,.card.closed{opacity:.7}.card.locked .week-header,.card.closed .week-header{cursor:default}.card.closed{opacity:.4}.card.closed .week-header{cursor:default}article.wp{font-size:1.2em}article.wp h3{font-size:1.2em;margin:0;padding:0}.has-titled-error{color:#8b0000;cursor:help}.menu-wps{box-shadow:0 0 1em #0000004d;font-size:12px;margin:0;padding:0}.menu-wps>li{cursor:pointer;display:flex;transition:background-color .5s ease-out;border-bottom:thin solid rgba(0,0,0,.4);padding:2px 4px;text-shadow:-1px 1px 0 rgba(0,0,0,.1)}.menu-wps>li .icon-angle-right{color:#fff;position:relative;left:-25px;opacity:0;transition:left .3s ease-out,opacity .5s ease-out;margin-left:auto}.menu-wps>li .acronym{font-weight:700}.menu-wps>li .acronym:after{content:":"}.menu-wps>li:hover,.menu-wps>li.selected{background:#0b58a2;color:#fff}.menu-wps>li:hover .icon-angle-right,.menu-wps>li.selected .icon-angle-right{left:0;opacity:1}.daymenu{position:fixed;background:white;z-index:100}.daymenu .selector{display:flex}.month-header{display:flex;line-height:30px;justify-content:center;justify-items:center}.month-header strong{font-weight:100;display:block;text-align:center;flex:0 0 14.285714286%;background:#efefef;color:#5c9ccc;border-left:solid thin #fff}.periode{display:flex;justify-content:flex-start}.periode strong{display:inline-block;width:10em;text-align:center}.week{border:solid 2px #fff;margin:2px 0}.week .days{background-image:url(/images/bg-lock.gif)}.week .days .day{background:#efefef}.week.selected{background:rgba(128,183,236,.25);border-color:#80b7ec;box-shadow:0 -4px 4px #0003}.week.selected .week-header{background-color:#80b7ec;color:#fff}.week.selected .week-header span{text-shadow:-1px 1px 0 rgba(0,0,0,.2)}.week.selected .day{border-color:#80b7ec}.week .day.error{background:#dd1144!important}.heure-total{display:inline-block;width:5em}.week-header,.month-header .week-header{background-color:#ffffff80;align-items:center;cursor:pointer;display:flex;text-align:left;font-size:1em;padding:0 .8em;justify-content:space-between}.week-header span,.month-header .week-header span{font-weight:700;flex:1}.week-header small.subtotal,.month-header .week-header small.subtotal{flex:0}.week-header small,.month-header .week-header small{justify-self:flex-end;flex:1;text-align:right;margin-left:auto}.week-header small em,.month-header .week-header small em{color:#5c646c}.table-recap.table-bordered{font-size:.7em}.table-recap.table-bordered h2,.table-recap.table-bordered h3{font-size:1.25em;margin:0}.table-recap.table-bordered th{font-weight:400}.table-recap.table-bordered th.total{text-align:right;font-weight:700;font-size:1.1em}.table-recap.table-bordered thead th:nth-child(odd){background-color:#efefef}.table-recap.table-bordered td:nth-child(odd){background-color:#efefef}.table-recap.table-bordered thead th{text-align:center}.table-recap.table-bordered tr td{text-align:right}.table-recap.table-bordered tr th,.table-recap.table-bordered tr td{padding:2px}.days{display:flex}.days .day{position:relative;background:rgba(255,255,255,.25);transition:background-color linear .3s;border:thin solid white;flex:0 0 14.285714286%;overflow:hidden;cursor:pointer;min-height:50px}.days .day .label{position:absolute;bottom:0;right:0;display:block;font-size:12px;text-align:right;text-shadow:-1px 1px 1px rgba(255,255,255,.3);color:#787171}.days .day .cartouche em{max-width:3em;overflow:hidden;display:inline-block;white-space:nowrap}.days .day:hover{background:white}.days .day.selected{background:#5c9ccc}.days .day.locked{cursor:not-allowed;background:rgba(204,204,204,.8)}.week:first-child .days{justify-content:flex-end}.week:last-child .days{justify-content:flex-start}
diff --git a/public/js/oscar/vite/dist/assets/TimesheetDeclaration-da0c6213.css b/public/js/oscar/vite/dist/assets/TimesheetDeclaration-da0c6213.css
new file mode 100644
index 000000000..2180ed8bb
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/TimesheetDeclaration-da0c6213.css
@@ -0,0 +1 @@
+@charset "UTF-8";.cartouche[data-v-45fb2e96]{white-space:nowrap;margin:0;border-radius:2px;box-shadow:none;font-size:.75em}.cartouche.training[data-v-45fb2e96]{background-color:#0b58a2}.cartouche.sickleave[data-v-45fb2e96]{background-color:olive}.cartouche.wp[data-v-45fb2e96]{background-color:#6a5999}.cartouche.conflict[data-v-45fb2e96]{background:#AA0000}.timesheet-item[data-v-c5ac47ec]{background:#e3e6e8;cursor:pointer;border:thin #5c6970 solid;margin:.3em 0;font-size:1em;display:flex;position:relative;transition:all .3s}.timesheet-item>*[data-v-c5ac47ec]{padding:.3em .5em}.timesheet-item .project-acronym[data-v-c5ac47ec]{transition:all .3s;position:relative;display:inline-block;padding-right:.8em;padding-left:.8em;color:#abb5ba;background:#5c6970;text-shadow:-1px 1px 0 rgba(0,0,0,.3);font-weight:700}.timesheet-item .project-acronym[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1em;height:1em;background:rgba(255,255,255,0);transform:rotate(45deg);position:absolute;left:-.6em;top:.6em;z-index:10000}.timesheet-item .activity-label[data-v-c5ac47ec]{transition:all .3s;position:relative;display:inline-block;padding-left:1em;padding-right:1em;background:#abb5ba;color:#171a1c;font-size:.8em;line-height:2em}.timesheet-item .activity-label[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1.2em;height:1.2em;background:#5c6970;transform:rotate(45deg);position:absolute;left:-.6em;top:.6em;z-index:10000}.timesheet-item .workpackage-infos[data-v-c5ac47ec]{transition:all .3s;position:relative;padding-left:1em}.timesheet-item .workpackage-infos[data-v-c5ac47ec]:before{transition:all .3s;content:" ";width:1em;height:1em;background:#abb5ba;transform:rotate(45deg);position:absolute;left:-.6em;top:.5em;z-index:10000}.timesheet-item.selected[data-v-c5ac47ec],.timesheet-item[data-v-c5ac47ec]:hover{background:white;border:thin #0088cc solid;color:#08c}.timesheet-item.selected .project-acronym[data-v-c5ac47ec],.timesheet-item:hover .project-acronym[data-v-c5ac47ec]{color:#9df;background:#0088cc}.timesheet-item.selected .activity-label[data-v-c5ac47ec],.timesheet-item:hover .activity-label[data-v-c5ac47ec]{background:#66ccff;color:#023}.timesheet-item.selected .activity-label[data-v-c5ac47ec]:before,.timesheet-item:hover .activity-label[data-v-c5ac47ec]:before{background:#0088cc}.timesheet-item.selected .workpackage-infos[data-v-c5ac47ec]:before,.timesheet-item:hover .workpackage-infos[data-v-c5ac47ec]:before{background:#66ccff}.timesheet-item.horslots-item .workpackage-infos[data-v-c5ac47ec]{flex:1}.timesheet-item.horslots-item .activity-label[data-v-c5ac47ec]:before{content:none}.timesheet-item.horslots-item .workpackage-infos[data-v-c5ac47ec]:before{background:#5c6970;top:.8em}.timesheet-item.horslots-item.selected .workpackage-infos[data-v-c5ac47ec]:before,.timesheet-item.horslots-item:hover .workpackage-infos[data-v-c5ac47ec]:before{background:#0088cc}.timesheet-item.selected[data-v-c5ac47ec]{box-shadow:.25em 0 .5em #08cc}.timesheet-item.selected .project-acronym[data-v-c5ac47ec]:before{background:white}.wp-duration{display:flex;border-bottom:thin solid white;align-items:center}.wp-duration strong small{font-weight:100}.wp-duration[class*=status-]{border-left:solid 4px #ddd}.wp-duration.status-5{border-left-color:#0b58a2}.wp-duration .icon-comment{color:#ccc}.wp-duration .icon-comment.with-comment{color:#000}.left{flex:0 0 35px;overflow:hidden;display:flex;flex-direction:column;padding-left:8px;border-left:solid #fff thin}.total{margin-left:auto;font-size:1.4em;font-weight:700;padding-right:.5em}.total em{font-size:.5em;font-weight:100;line-height:2em}[class*=icon-]{text-align:center}.icon-trash,.icon-edit{cursor:pointer;text-align:center}.icon-trash:hover,.icon-edit:hover{background:#0b58a2;color:#fff}.ui-timechooser[data-v-755f0c71]{background:white;border:solid 1px #ddd;max-width:450px;margin:0 auto}.ui-timechooser .percents[data-v-755f0c71]{border-bottom:1px solid #ddd;display:flex}.ui-timechooser .percents span[data-v-755f0c71]{flex:1 1 auto;padding:2px 4px;text-align:center;font-size:2em;cursor:pointer}.ui-timechooser .percents span[data-v-755f0c71]:hover,.ui-timechooser .percents span.selected[data-v-755f0c71]{background-color:#0b58a2;color:#fff}.ui-timechooser .hours[data-v-755f0c71]{font-size:48px;text-align:center;font-weight:700;display:flex;justify-items:center;justify-content:center;font-size:2em}.ui-timechooser .hours .sel[data-v-755f0c71]{border:thin solid #ddd;padding:0;display:flex;flex-direction:column}.ui-timechooser .hours .sel i[data-v-755f0c71]{font-size:1em;cursor:pointer;text-shadow:0 0 4px rgba(0,0,0,.1)}.ui-timechooser .hours .sel i[data-v-755f0c71]:hover{background:#5c9ccc;color:#fff}.ui-timechooser .hours .separator[data-v-755f0c71]{color:red}.repport-item .icon-attention-circled{display:none}.repport-item.excess{color:#900;border-left:4px solid red}.repport-item.excess .icon-attention-circled{display:inline-block}.interaction-off{cursor:default;pointer-events:none}.interactive-icon-big{font-size:32px;cursor:pointer}.card.locked,.card.closed{opacity:.7}.card.locked .week-header,.card.closed .week-header{cursor:default}.card.closed{opacity:.4}.card.closed .week-header{cursor:default}article.wp{font-size:1.2em}article.wp h3{font-size:1.2em;margin:0;padding:0}.has-titled-error{color:#8b0000;cursor:help}.menu-wps{box-shadow:0 0 1em #0000004d;font-size:12px;margin:0;padding:0}.menu-wps>li{cursor:pointer;display:flex;transition:background-color .5s ease-out;border-bottom:thin solid rgba(0,0,0,.4);padding:2px 4px;text-shadow:-1px 1px 0 rgba(0,0,0,.1)}.menu-wps>li .icon-angle-right{color:#fff;position:relative;left:-25px;opacity:0;transition:left .3s ease-out,opacity .5s ease-out;margin-left:auto}.menu-wps>li .acronym{font-weight:700}.menu-wps>li .acronym:after{content:":"}.menu-wps>li:hover,.menu-wps>li.selected{background:#0b58a2;color:#fff}.menu-wps>li:hover .icon-angle-right,.menu-wps>li.selected .icon-angle-right{left:0px;opacity:1}.daymenu{position:fixed;background:white;z-index:100}.daymenu .selector{display:flex}.month-header{display:flex;line-height:30px;justify-content:center;justify-items:center}.month-header strong{font-weight:100;display:block;text-align:center;flex:0 0 14.285714286%;background:#efefef;color:#5c9ccc;border-left:solid thin #fff}.periode{display:flex;justify-content:flex-start}.periode strong{display:inline-block;width:10em;text-align:center}.week{border:solid 2px #fff;margin:2px 0}.week .days{background-image:url(/images/bg-lock.gif)}.week .days .day{background:#efefef}.week.selected{background:rgba(128,183,236,.25);border-color:#80b7ec;box-shadow:0 -4px 4px #0003}.week.selected .week-header{background-color:#80b7ec;color:#fff}.week.selected .week-header span{text-shadow:-1px 1px 0 rgba(0,0,0,.2)}.week.selected .day{border-color:#80b7ec}.week .day.error{background:#dd1144!important}.heure-total{display:inline-block;width:5em}.week-header,.month-header .week-header{background-color:#ffffff80;align-items:center;cursor:pointer;display:flex;text-align:left;font-size:1em;padding:0 .8em;justify-content:space-between}.week-header span,.month-header .week-header span{font-weight:700;flex:1}.week-header small.subtotal,.month-header .week-header small.subtotal{flex:0}.week-header small,.month-header .week-header small{justify-self:flex-end;flex:1;text-align:right;margin-left:auto}.week-header small em,.month-header .week-header small em{color:#5c646c}.table-recap.table-bordered{font-size:.7em}.table-recap.table-bordered h2,.table-recap.table-bordered h3{font-size:1.25em;margin:0}.table-recap.table-bordered th{font-weight:400}.table-recap.table-bordered th.total{text-align:right;font-weight:700;font-size:1.1em}.table-recap.table-bordered thead th:nth-child(odd){background-color:#efefef}.table-recap.table-bordered td:nth-child(odd){background-color:#efefef}.table-recap.table-bordered thead th{text-align:center}.table-recap.table-bordered tr td{text-align:right}.table-recap.table-bordered tr th,.table-recap.table-bordered tr td{padding:2px}.days{display:flex}.days .day{position:relative;background:rgba(255,255,255,.25);transition:background-color linear .3s;border:thin solid white;flex:0 0 14.285714286%;overflow:hidden;cursor:pointer;min-height:50px}.days .day .label{position:absolute;bottom:0;right:0;display:block;font-size:12px;text-align:right;text-shadow:-1px 1px 1px rgba(255,255,255,.3);color:#787171}.days .day .cartouche em{max-width:3em;overflow:hidden;display:inline-block;white-space:nowrap}.days .day:hover{background:white}.days .day.selected{background:#5c9ccc}.days .day.locked{cursor:not-allowed;background:rgba(204,204,204,.8)}.week:first-child .days{justify-content:flex-end}.week:last-child .days{justify-content:flex-start}
diff --git a/public/js/oscar/vite/dist/assets/TimesheetPersonResume-9b0a7e87.css b/public/js/oscar/vite/dist/assets/TimesheetPersonResume-9b0a7e87.css
deleted file mode 100644
index 09d8d801c..000000000
--- a/public/js/oscar/vite/dist/assets/TimesheetPersonResume-9b0a7e87.css
+++ /dev/null
@@ -1 +0,0 @@
-.table{font-size:.9em;td {border: 0;}}.table td .table,.table th .table{background:rgba(255,255,255,.5)!important;border-left:none}.table .table tr:nth-child(2n){background-color:#ffffff80!important}.table tfoot{background-color:#738ccc33!important}.table tr .soustotal{display:table-cell;vertical-align:bottom!important}.table tbody th{white-space:nowrap;font-weight:400}tr.line-total{background:rgba(31,68,192,.1);border-top:1px solid #333333;border-left:none;font-size:1.1em}.table .table{border-width:thin;tr {border-left-width: thin;} th,td {border-left: none; border-right: solid thin #eee; padding: 2px;}}tr.line-total th{font-weight:400}.commentaires .commentaire{display:block;font-size:.9em}.declarations-resume{thead th {text-align: center; background: #0b93d5;} .yearrow {background: rgba(255,255,255,.8);} .icon-time {display: none;} .valid-95 {.icon-time {display: inline-block; color: #00cc66; &:before {content: "";}}} tbody tr {border-left: solid 4px #eee;} .valid-105 {.icon-time {display: inline-block; color: #3fd53f; &:before {content: "";}}} .error-95 {.icon-time {display: inline-block; color: #970000; &:before {content: "";}}} .error-105 {.icon-time {display: inline-block; color: #9e0505; &:before {content: "";}}} .valid-100 {.icon-time {display: inline-block; color: #00AA00;}} tr.optionnal {border-left-color: #5a5a5a;} tr.conflict {border-left-color: #CC0000; background: rgba(#990000,.1);} tr.validated {border-left-color: #00AA00; background: rgba(#00AA00,.1);} tr.validating {border-left-color: #0b93d5; background: rgba(#0b93d5,.1);}}.declarations-resume .heading-year th{font-size:2em;text-align:right}
diff --git a/public/js/oscar/vite/dist/assets/TimesheetPersonResume-b4a958be.css b/public/js/oscar/vite/dist/assets/TimesheetPersonResume-b4a958be.css
new file mode 100644
index 000000000..41af3d5a6
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/TimesheetPersonResume-b4a958be.css
@@ -0,0 +1 @@
+.table{font-size:.9em;td {border: 0;}}.table td .table,.table th .table{background:rgba(255,255,255,.5)!important;border-left:none}.table .table tr:nth-child(even){background-color:#ffffff80!important}.table tfoot{background-color:#738ccc33!important}.table tr .soustotal{display:table-cell;vertical-align:bottom!important}.table tbody th{white-space:nowrap;font-weight:400}tr.line-total{background:rgba(31,68,192,.1);border-top:1px solid #333333;border-left:none;font-size:1.1em}.table .table{border-width:thin;tr {border-left-width: thin;} th,td {border-left: none; border-right: solid thin #eee; padding: 2px;}}tr.line-total th{font-weight:400}.commentaires .commentaire{display:block;font-size:.9em}.declarations-resume{.heading-year th {font-size: 2em; text-align: right;} thead th {text-align: center; background: #0b93d5;} .yearrow {background: rgba(255,255,255,.8);} .icon-time {display: none;} .valid-95 {.icon-time {display: inline-block; color: #00cc66; &:before {content: "\e840";}}} tbody tr {border-left: solid 4px #eee;} .valid-105 {.icon-time {display: inline-block; color: #3fd53f; &:before {content: "\e843";}}} .error-95 {.icon-time {display: inline-block; color: #970000; &:before {content: "\e840";}}} .error-105 {.icon-time {display: inline-block; color: #9e0505; &:before {content: "\e843";}}} .valid-100 {.icon-time {display: inline-block; color: #00AA00;}} tr.optionnal {border-left-color: #5a5a5a;} tr.conflict {border-left-color: #CC0000; background: rgba(#990000,.1);} tr.validated {border-left-color: #00AA00; background: rgba(#00AA00,.1);} tr.validating {border-left-color: #0b93d5; background: rgba(#0b93d5,.1);}}
diff --git a/public/js/oscar/vite/dist/assets/activity-60e009f3.js b/public/js/oscar/vite/dist/assets/activity-60e009f3.js
deleted file mode 100644
index d7cc8ef73..000000000
--- a/public/js/oscar/vite/dist/assets/activity-60e009f3.js
+++ /dev/null
@@ -1 +0,0 @@
-import{r as D,o as l,c as i,a as r,t as u,b as g,w,v as E,d as t,e as J,f as R,g as d,h,n as C,F as b,i as P,j as _,k as x,l as z,m as V,p as A,T as U,q as ee,s as te,S as se,u as ne,x as le,y as ie}from"../vendor.js";import{m as H}from"../vendor2.js";import{f as oe}from"../vendor3.js";import{m as re}from"../vendor4.js";import{M as G}from"../vendor5.js";import{D as T,P as ae}from"../vendor6.js";import{_ as S}from"../vendor7.js";import{A as W}from"../vendor8.js";import{O as de}from"../vendor9.js";import{A as ue}from"../vendor10.js";import{A as me}from"../vendor11.js";import{A as ce}from"../vendor12.js";import{A as pe}from"../vendor13.js";import{A as j}from"../vendor14.js";import{E as fe}from"../vendor15.js";import{g as O}from"../vendor16.js";import{L as ve}from"../vendor17.js";import{P as K}from"../vendor18.js";import{t as he}from"../vendor19.js";import"../vendor20.js";const ge={name:"AvenantDate",emits:["update:change"],props:["change"],computed:{date:{get(){return this.change.value},set(s){this.change.value=s,this.$emit("update:change",change)}}},components:{Datepicker:T}};function ye(s,e,a,k,n,o){const y=D("Datepicker");return l(),i("div",null,[r(u(a.change.label)+" : ",1),g(y,{modelValue:o.date,"onUpdate:modelValue":e[0]||(e[0]=v=>o.date=v)},null,8,["modelValue"])])}const ke=S(ge,[["render",ye]]),be={props:{modelValue:Number},data(){return{isEditing:!1,rawValue:"",formattedValue:""}},computed:{displayValue:{get(){return this.isEditing?this.rawValue:this.formattedValue},set(s){this.rawValue=s}}},watch:{modelValue:{immediate:!0,handler(s){this.isEditing||(this.formattedValue=this.formatCurrency(s),this.rawValue=(s??"").toString().replace(".",","))}}},methods:{formatCurrency(s){return new Intl.NumberFormat("fr-FR",{style:"currency",currency:"EUR",minimumFractionDigits:2}).format(s)},startEditing(){this.isEditing=!0,this.rawValue=(this.modelValue??"").toString().replace(".",",")},finishEditing(){this.isEditing=!1;let s=parseFloat(this.rawValue.replace(",","."))||0;this.$emit("update:modelValue",s)},updateRawValue(s){this.rawValue=s.target.value}}};function De(s,e,a,k,n,o){return w((l(),i("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=y=>o.displayValue=y),onFocus:e[1]||(e[1]=(...y)=>o.startEditing&&o.startEditing(...y)),onBlur:e[2]||(e[2]=(...y)=>o.finishEditing&&o.finishEditing(...y)),onInput:e[3]||(e[3]=(...y)=>o.updateRawValue&&o.updateRawValue(...y)),class:"form-control text-right"},null,544)),[[E,o.displayValue]])}const _e=S(be,[["render",De]]);const we={name:"ButtonConfirm",props:{class:{type:String,default:"btn btn-default"},checkbox:{type:Boolean,default:!1}},data(){return{modal:!1,checked:!1}},computed:{confirmEnabled(){return this.checkbox&&this.checked||this.checkbox===!1}},watch:{modal(s){this.checked=!1}},methods:{handlerClick(){this.$emit("click")},handlerCancel(){this.modal=!1,this.$emit("cancel")},handlerConfirm(){this.confirmEnabled&&(this.modal=!1,this.$emit("confirm"))}},activated(){console.log("ButtonConfirm activated")}},Ce={key:0,class:"overlay confirm-dialog"},Pe={class:"overlay-content"},Ae={class:"overlay-message"},Ue={key:0},Se={for:"confirm_ok",class:"checkbox"};function Me(s,e,a,k,n,o){return l(),i(b,null,[n.modal?(l(),i("div",Ce,[t("div",Pe,[t("h3",null,[e[5]||(e[5]=t("i",{class:"icon-attention-1"},null,-1)),J(s.$slots,"title",{},()=>[e[4]||(e[4]=r(" Confirmer ? "))],!0)]),t("div",Ae,[J(s.$slots,"message",{},()=>[e[6]||(e[6]=r(" Voulez-vous continuer ? "))],!0)]),a.checkbox?(l(),i("div",Ue,[t("label",Se,[w(t("input",{type:"checkbox",id:"confirm_ok","onUpdate:modelValue":e[0]||(e[0]=y=>n.checked=y)},null,512),[[R,n.checked]]),e[7]||(e[7]=r(" J'ai bien compris "))])])):d("",!0),t("nav",null,[t("a",{href:"#",onClick:e[1]||(e[1]=h((...y)=>o.handlerCancel&&o.handlerCancel(...y),["prevent"])),class:"btn btn-danger"},e[8]||(e[8]=[t("i",{class:"icon-block"},null,-1),r(" Annuler ")])),t("a",{href:"#",onClick:e[2]||(e[2]=h((...y)=>o.handlerConfirm&&o.handlerConfirm(...y),["prevent"])),class:C(["btn btn-success",{disabled:!o.confirmEnabled}])},e[9]||(e[9]=[t("i",{class:"icon-ok-circled"},null,-1),r(" Confirmer")]),2)])])])):d("",!0),t("a",{href:"#",class:C(a.class),onClick:e[3]||(e[3]=h(y=>n.modal=!0,["prevent"]))},[J(s.$slots,"default",{},()=>[e[10]||(e[10]=r("Texte par défaut"))],!0)],2)],64)}const Ee=S(we,[["render",Me],["__scopeId","data-v-efd4eea6"]]);const Ve={name:"ActivityAvenants",components:{ButtonConfirm:Ee,Amount:_e,AvenantDate:ke,Datepicker:T,Modal:G,OrganizationAutoComplete:de,PersonAutoCompleter:ae},props:["roles-person","roles-organization","currentPersons","currentOrganizations","avenants","manage"],data(){return{edit:null,selectedPerson:null}},computed:{modificationsEnabled(){return{personAdd:!0,personDel:!0,organizationAdd:!0,organizationDel:!0,changeAmount:!this.edit.modifications.find(s=>s.type=="changeAmount"),dateEnd:!this.edit.modifications.find(s=>s.type=="dateEnd")}},persons(){let s={};return this.currentPersons&&this.currentPersons.forEach(e=>{s.hasOwnProperty(e.enrolled)||(s[e.enrolled]={id:e.enrolled,firstName:e.firstName,lastName:e.lastName,roles:{}}),s[e.enrolled].hasOwnProperty(e.roleId)||(s[e.enrolled].roles[e.roleId]=e.roleLabel)}),s},organizations(){let s={};return this.currentOrganizations&&this.currentOrganizations.forEach(e=>{s.hasOwnProperty(e.enrolled)||(console.log(e),s[e.enrolled]={id:e.enrolled,label:e.enrolledLabel,roles:{}}),s[e.enrolled].hasOwnProperty(e.roleId)||(s[e.enrolled].roles[e.roleId]=e.roleLabel)}),s}},methods:{handlerConfirm(s,e,a){console.log("confirm",s),e.call(this,a)},handlerOk(s){console.log(JSON.stringify(s)),console.log(this.avenants.url_api)},handlerNew(){this.edit={id:null,dateAvenant:null,comment:"",previousFile:null,file:null,modifications:[]}},handlerEdit(s){this.edit={id:s.id,dateAvenant:s.date,comment:s.comment,previousFile:s.filename,file:null,modifications:JSON.parse(JSON.stringify(s.modifications))}},handlerCancel(){console.log("CANCEL"),this.edit=null},handlerSave(){let s=new FormData;s.append("id",this.edit.id??""),s.append("dateAvenant",this.edit.dateAvenant??""),s.append("comment",this.edit.comment??""),s.append("file",this.edit.file??""),s.append("modifications",this.edit.modifications?JSON.stringify(this.edit.modifications):"");let e="Mise à jour de l'avenant";this.edit.id?s.append("action","update"):(s.append("action","create"),e="Création de l'avenant"),W.post(this.avenants.url_api,s,{pendingMsg:e}).then(a=>{this.edit=null,this.fetch()})},handlerDelete(s){W.delete(s.url_api,{pendingMsg:"Suppression de l'avenant"}).then(e=>{this.fetch()})},handlerApplyAvenant(s){console.log("Application de l'avenant");let e=new FormData;e.append("id",s.id),e.append("action","apply");let a="Application de l'avenant";W.post(this.avenants.url_api,e,{pendingMsg:a,pendingBack:!1}).then(k=>{document.location.reload()})},handlerAddChange(s){if(this.edit)switch(s){case"dateEnd":this.edit.modifications.push({type:s,mode:"new",label:"Date de fin",value1:new Date().toISOString()});break;default:this.edit.modifications.push({type:s,mode:"new",label:"A définir",value1:null,valueObj:null,value2:null})}},handlerRemoveChange(s){let e=this.edit.modifications.indexOf(s);e>=0&&this.edit.modifications.splice(e,1)},handlerUpdatePersonChange(s,e){s.valueObj={id:e.id,firstName:e.firstName,lastName:e.lastName},s.value1=e.id},handlerUpdateOrganizationChange(s,e){console.log(JSON.stringify(s)),s.valueObj={id:e.id,label:e.label},s.value1=e.id},handlerSelectToDel(s,e){console.log("Changement de la personne à supprimer",s,e),s.value1=s.valueObj.id,s.value2=null},async handlerSelectFile(s){if(s.target.files.length===0){this.edit.file=null;return}this.edit.file=s.target.files[0]},fetch(){W.get(this.avenants.url_api,{pendingMsg:"Chargement des avenants"}).then(s=>{this.$emit("update",s.data.datas.avenants)})}},mounted(){console.log("mounted")}},xe={action:""},Ne={class:"form-group"},je={class:"form-group"},Oe={class:"btn-group"},ze={class:"dropdown-menu"},Re={class:"modifications unsaved"},Fe={class:"change"},Ie={key:0},We={key:1},Te={key:2},qe=["onUpdate:modelValue","onChange"],Le=["value"],Je=["onUpdate:modelValue"],He=["value"],Be={key:3},Ye={key:0,class:"cartouche"},Ge=["onClick"],Ke=["onUpdate:modelValue"],Xe=["value"],Qe={key:4},Ze=["onUpdate:modelValue","onChange"],$e=["value"],et=["onUpdate:modelValue"],tt=["value"],st={key:5},nt=["onUpdate:modelValue"],lt=["value"],it={key:6},ot=["onClick"],rt={class:"modifications saved"},at={class:"change"},dt={key:0,class:"icon-calendar"},ut={key:1,class:"icon-user"},mt={key:2,class:"icon-bank"},ct={key:3,class:"icon-user text-danger"},pt={key:4,class:"icon-building-filled"},ft={key:5,class:"icon-building-filled text-danger"},vt=["onClick"],ht={class:"form-group"},gt={key:0},yt={class:"form-group"},kt={class:"avenants"},bt={class:"admin-bar text-right"},Dt={key:0,class:"icon-ok-circled text-success"},_t={key:1,class:"icon-pencil"},wt={class:"modification small"},Ct={class:"change"},Pt={key:0,class:"icon-calendar"},At={key:1,class:"icon-user"},Ut={key:2,class:"icon-user text-danger"},St={key:3,class:"icon-bank"},Mt={key:4,class:"icon-building-filled"},Et={key:5,class:"icon-building-filled text-danger"},Vt={key:0},xt=["href"],Nt=["onClick"];function jt(s,e,a,k,n,o){const y=D("datepicker"),v=D("Datepicker"),c=D("Amount"),M=D("person-auto-completer"),q=D("organization-auto-complete"),L=D("modal"),I=D("ButtonConfirm");return l(),i(b,null,[g(L,{title:"Détails de l'avenant",visible:n.edit,onModalValid:o.handlerSave,onModalCancel:o.handlerCancel},{default:P(()=>[t("form",xe,[e[32]||(e[32]=t("div",{class:"alert alert-info"},[r(" Vous pourrez revenir modifier cet avenant plus tard tant qu'il est en mode "),t("strong",null,"brouillon"),r(". ")],-1)),t("div",Ne,[e[16]||(e[16]=t("label",{for:"dateAvenant"},"Date : ",-1)),e[17]||(e[17]=t("div",{class:"help"},[r(" Date de "),t("strong",null,"signature"),r(" de l'avenant ")],-1)),g(y,{modelValue:n.edit.dateAvenant,"onUpdate:modelValue":e[0]||(e[0]=m=>n.edit.dateAvenant=m),id:"dateAvenant"},null,8,["modelValue"])]),t("div",je,[e[27]||(e[27]=t("label",{for:"name",class:""},"Modifications : ",-1)),e[28]||(e[28]=t("br",null,null,-1)),t("div",Oe,[e[18]||(e[18]=t("button",{type:"button",class:"btn btn-default dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[r(" Ajouter une modification "),t("span",{class:"caret"})],-1)),t("ul",ze,[t("li",null,[t("a",{href:"#",onClick:e[1]||(e[1]=h(m=>o.handlerAddChange("personAdd"),["prevent"])),class:C(o.modificationsEnabled.personAdd?"":"disabled")},"Ajout d'une personne",2)]),t("li",null,[t("a",{href:"#",onClick:e[2]||(e[2]=h(m=>o.handlerAddChange("personDel"),["prevent"])),class:C(o.modificationsEnabled.personDel?"":"disabled")},"Suppression d'une personne",2)]),t("li",null,[t("a",{href:"#",onClick:e[3]||(e[3]=h(m=>o.handlerAddChange("organizationAdd"),["prevent"])),class:C(o.modificationsEnabled.organizationAdd?"":"disabled")},"Ajout d'une organisation",2)]),t("li",null,[t("a",{href:"#",onClick:e[4]||(e[4]=h(m=>o.handlerAddChange("organizationDel"),["prevent"])),class:C(o.modificationsEnabled.organizationDel?"":"disabled")},"Suppression d'une organisation",2)]),t("li",null,[t("a",{href:"#",onClick:e[5]||(e[5]=h(m=>o.handlerAddChange("changeAmount"),["prevent"])),class:C(o.modificationsEnabled.changeAmount?"":"disabled")},"Modification du montant",2)]),t("li",null,[t("a",{href:"#",onClick:e[6]||(e[6]=h(m=>o.handlerAddChange("dateEnd"),["prevent"])),class:C(o.modificationsEnabled.dateEnd?"":"disabled")},"Modification de la date de fin",2)])])]),t("section",Re,[(l(!0),i(b,null,_(n.edit.modifications.filter(m=>m.mode==="new"),m=>(l(),i("article",Fe,[m.type==="dateEnd"?(l(),i("div",Ie,[e[19]||(e[19]=t("span",{class:"text"}," Date de fin : ",-1)),t("span",null,[g(v,{modelValue:m.value1,"onUpdate:modelValue":f=>m.value1=f},null,8,["modelValue","onUpdate:modelValue"])])])):m.type==="changeAmount"?(l(),i("div",We,[e[20]||(e[20]=t("span",{class:"text"},"Nouveau montant : ",-1)),g(c,{modelValue:m.value1,"onUpdate:modelValue":f=>m.value1=f},null,8,["modelValue","onUpdate:modelValue"])])):m.type==="personDel"?(l(),i("div",Te,[e[21]||(e[21]=t("span",{class:"text"},"Suppression d'un membre",-1)),w(t("select",{name:"",id:"",onClick:e[7]||(e[7]=h(()=>{},["stop"])),"onUpdate:modelValue":f=>m.valueObj=f,onChange:f=>o.handlerSelectToDel(m,f)},[(l(!0),i(b,null,_(o.persons,(f,N)=>(l(),i("option",{value:f},u(f.firstName)+" "+u(f.lastName),9,Le))),256))],40,qe),[[x,m.valueObj]]),m.valueObj?w((l(),i("select",{key:0,name:"",id:"",onClick:e[8]||(e[8]=h(()=>{},["stop"])),"onUpdate:modelValue":f=>m.value2=f},[(l(!0),i(b,null,_(m.valueObj.roles,(f,N)=>(l(),i("option",{value:N},u(f),9,He))),256))],8,Je)),[[x,m.value2]]):d("",!0)])):m.type==="personAdd"?(l(),i("div",Be,[e[22]||(e[22]=t("span",{class:"text"}," Ajout d'une personne : ",-1)),m.valueObj?(l(),i("span",Ye,[r(u(m.valueObj.firstName)+" "+u(m.valueObj.lastName)+" ",1),t("i",{class:"icon-cancel-alt",onClick:f=>m.valueObj=null},null,8,Ge)])):(l(),z(M,{key:1,onPersonSelected:f=>o.handlerUpdatePersonChange(m,f)},null,8,["onPersonSelected"])),w(t("select",{name:"rolesPerson","onUpdate:modelValue":f=>m.value2=f,class:"form-control",onClick:e[9]||(e[9]=h(()=>{},["stop"]))},[(l(!0),i(b,null,_(s.rolesPerson,f=>(l(),i("option",{value:f.id},u(f.label),9,Xe))),256))],8,Ke),[[x,m.value2]])])):m.type==="organizationDel"?(l(),i("div",Qe,[e[23]||(e[23]=t("span",{class:"text"}," Suppression d'une organisation : ",-1)),w(t("select",{name:"",id:"",onClick:e[10]||(e[10]=h(()=>{},["stop"])),"onUpdate:modelValue":f=>m.valueObj=f,class:"form-control",onChange:f=>o.handlerSelectToDel(m,f)},[(l(!0),i(b,null,_(o.organizations,(f,N)=>(l(),i("option",{value:f},u(f.label),9,$e))),256))],40,Ze),[[x,m.valueObj]]),m.valueObj?w((l(),i("select",{key:0,name:"",id:"",onClick:e[11]||(e[11]=h(()=>{},["stop"])),"onUpdate:modelValue":f=>m.value2=f,class:"form-control"},[(l(!0),i(b,null,_(m.valueObj.roles,(f,N)=>(l(),i("option",{value:N},u(f),9,tt))),256))],8,et)),[[x,m.value2]]):d("",!0)])):m.type==="organizationAdd"?(l(),i("div",st,[e[24]||(e[24]=t("span",{class:"text"}," Ajout d'une organization : ",-1)),g(q,{onChange:f=>o.handlerUpdateOrganizationChange(m,f)},null,8,["onChange"]),w(t("select",{name:"rolesOrganization","onUpdate:modelValue":f=>m.value2=f,class:"form-control",onClick:e[12]||(e[12]=h(()=>{},["stop"]))},[(l(!0),i(b,null,_(s.rolesOrganization,f=>(l(),i("option",{value:f.id},u(f.label),9,lt))),256))],8,nt),[[x,m.value2]])])):(l(),i("div",it,u(m),1)),t("nav",null,[t("button",{class:"btn btn-xs btn-danger",onClick:h(f=>o.handlerRemoveChange(m),["prevent"])},e[25]||(e[25]=[t("i",{class:"icon-trash"},null,-1)]),8,ot)])]))),256))]),e[29]||(e[29]=t("hr",null,null,-1)),t("section",rt,[(l(!0),i(b,null,_(n.edit.modifications.filter(m=>m.mode!=="new"),m=>(l(),i("article",at,[t("div",null,[m.type==="dateEnd"?(l(),i("i",dt)):d("",!0),m.type==="personAdd"?(l(),i("i",ut)):d("",!0),m.type==="changeAmount"?(l(),i("i",mt)):d("",!0),m.type==="personDel"?(l(),i("i",ct)):d("",!0),m.type==="organizationAdd"?(l(),i("i",pt)):d("",!0),m.type==="organizationDel"?(l(),i("i",ft)):d("",!0),t("strong",null,u(m.info),1),t("small",null,[t("code",null," ("+u(m.type)+")",1)])]),t("nav",null,[t("button",{class:"btn btn-xs btn-danger",onClick:h(f=>o.handlerRemoveChange(m),["prevent"])},e[26]||(e[26]=[t("i",{class:"icon-trash"},null,-1)]),8,vt)])]))),256))])]),t("div",ht,[e[30]||(e[30]=t("label",{for:"name"},"Fichier",-1)),n.edit.previousFile?(l(),i("section",gt," Fichier précédent ")):d("",!0),t("input",{class:"form-control",type:"file",onChange:e[13]||(e[13]=(...m)=>o.handlerSelectFile&&o.handlerSelectFile(...m))},null,32)]),t("div",yt,[e[31]||(e[31]=t("label",{for:"name"},"Commentaire",-1)),w(t("textarea",{"onUpdate:modelValue":e[14]||(e[14]=m=>n.edit.comment=m),class:"form-control"},null,512),[[E,n.edit.comment]])])])]),_:1},8,["visible","onModalValid","onModalCancel"]),t("section",kt,[t("nav",bt,[a.manage?(l(),i("button",{key:0,class:"btn btn-xs btn-default",onClick:e[15]||(e[15]=(...m)=>o.handlerNew&&o.handlerNew(...m))}," Nouvel avenant ")):d("",!0)]),(l(!0),i(b,null,_(a.avenants.avenants,m=>(l(),i("article",{class:C(["avenant card","status-"+m.status])},[t("h4",null,[m.status==200?(l(),i("i",Dt)):d("",!0),m.status==100?(l(),i("i",_t)):d("",!0),t("strong",null,u(s.$filters.dateFull(m.date)),1),t("small",null," - "+u(m.status_text),1)]),t("section",wt,[(l(!0),i(b,null,_(m.modifications,f=>(l(),i("article",Ct,[f.type==="dateEnd"?(l(),i("i",Pt)):d("",!0),f.type==="personAdd"?(l(),i("i",At)):d("",!0),f.type==="personDel"?(l(),i("i",Ut)):d("",!0),f.type==="changeAmount"?(l(),i("i",St)):d("",!0),f.type==="organizationAdd"?(l(),i("i",Mt)):d("",!0),f.type==="organizationDel"?(l(),i("i",Et)):d("",!0),t("span",null,u(f.info),1)]))),256))]),m.comment?(l(),i("p",Vt,u(m.comment),1)):d("",!0),t("nav",null,[t("a",{href:m.url_download,class:"btn btn-xs btn-primary"},e[33]||(e[33]=[t("i",{class:"icon-file-pdf"},null,-1),r(" Télécharger")]),8,xt),a.manage?(l(),z(I,{key:0,onConfirm:f=>o.handlerDelete(m),class:C("btn btn-xs btn-danger"),checkbox:!0},{message:P(()=>e[34]||(e[34]=[r(" Supprimer "),t("strong",null,"définitivement",-1),r(" cet avenant ? ")])),default:P(()=>[e[35]||(e[35]=t("i",{class:"icon-trash"},null,-1)),e[36]||(e[36]=r(" Supprimer "))]),_:2},1032,["onConfirm"])):d("",!0),a.manage&&m.editable?(l(),i("a",{key:1,href:"#",class:"btn btn-xs btn-default",onClick:h(f=>o.handlerEdit(m),["prevent"])},e[37]||(e[37]=[t("i",{class:"icon-pencil"},null,-1),r(" Editer ")]),8,Nt)):d("",!0),m.status===100&&a.manage?(l(),z(I,{key:2,onConfirm:f=>o.handlerApplyAvenant(m),class:C("btn btn-xs btn-success")},{message:P(()=>e[38]||(e[38]=[r(" Confirmer l'application de l'avenant pour cette activité ? "),t("strong",null,"L'activité sera verrouillée",-1)])),default:P(()=>[e[39]||(e[39]=t("i",{class:"icon-trash"},null,-1)),e[40]||(e[40]=r(" Appliquer "))]),_:2},1032,["onConfirm"])):d("",!0)])],2))),256))])],64)}const Ot=S(Ve,[["render",jt],["__scopeId","data-v-833d8759"]]);const zt={props:{milestone:{required:!0},manage:{default:!1},progression:{default:!1}},computed:{finishedPerson(){let e=/\[Person:([0-9]*):(.*)\]/gm.exec(this.milestone.finishedBy);return e!==null?e[2]:""},statutText(){if(!this.milestone.type.finishable)return"";switch(this.milestone.finished){case 0:case null:return this.milestone.past?"EN RETARD":"A FAIRE";case 50:return"EN COURS";case 100:return"Validé";case 200:return"Sans suite";case 400:return"Refusé";default:return""}},owner(){return this.finishedPerson?finishedPerson[2]:"Unreadable data"},ownerId(){return this.finishedPerson?finishedPerson[1]:"Unreadble data"},finishable(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished<100},cancelFinish(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished>0},progressable(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&(this.milestone.finished==null||this.milestone.finished==0||this.milestone.finished==100)},inProgress(){return this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished>0&&this.milestone.finished<100},finished(){return this.milestone.type.finishable==!0&&this.milestone.finished>=100},late(){return this.finishable==!0&&this.milestone.past&&!this.finished},past(){return this.milestone.past},cssClass(){let s={finishable:this.finishable,finished:this.finished||this.milestone.done,late:this.late||this.milestone.late,payment:this.milestone.isPayment,inprogress:this.inProgress,canceled:this.milestone.finished==200,refused:this.milestone.finished==400,valided:this.milestone.finished==100,past:this.past};return s[this.milestone.type.facet]=!0,s}}},Rt={class:"main"},Ft={key:0},It=["datetime"],Wt={class:"ago"},Tt={key:0},qt={key:0},Lt={key:1,class:"details"},Jt={key:2};function Ht(s,e,a,k,n,o){return l(),i("article",{class:C(["jalon",o.cssClass])},[t("span",Rt,[o.statutText?(l(),i("strong",Ft," "+u(o.statutText),1)):d("",!0),t("time",{datetime:a.milestone.dateStart,class:"time-value"},[r(u(s.$filters.date(a.milestone.dateStart))+" ",1),t("span",Wt," ("+u(s.$filters.timeAgo(a.milestone.dateStart))+") ",1)],8,It)]),t("strong",{class:C(["card-title",{"text-private":a.milestone.isPayment}])},[r(u(a.milestone.type.label)+" ",1),o.inProgress?(l(),i("small",Tt,[e[7]||(e[7]=r(" (En cours par ")),t("strong",null,u(o.finishedPerson),1),e[8]||(e[8]=r(")"))])):d("",!0)],2),o.finished?(l(),i("p",qt,[t("strong",null,u(o.finishedPerson),1),e[9]||(e[9]=r(" a complété ce jalon"))])):d("",!0),a.milestone.comment?(l(),i("p",Lt,u(a.milestone.comment),1)):d("",!0),a.milestone.isPayment?d("",!0):(l(),i("nav",Jt,[o.cancelFinish?(l(),i("a",{key:0,href:"#",title:"Réinitialiser la progression",onClick:e[0]||(e[0]=h(y=>s.$emit("unvalid",a.milestone),["prevent"]))},e[10]||(e[10]=[t("i",{class:"icon-rewind-outline"},null,-1)]))):d("",!0),o.progressable?(l(),i("a",{key:1,href:"#",title:"Marquer comme en cours",onClick:e[1]||(e[1]=h(y=>s.$emit("inprogress",a.milestone),["prevent"]))},e[11]||(e[11]=[t("i",{class:"icon-cw-outline"},null,-1)]))):d("",!0),o.finishable?(l(),i("a",{key:2,href:"#",title:"Marquer comme terminé",onClick:e[2]||(e[2]=h(y=>s.$emit("valid",a.milestone),["prevent"]))},e[12]||(e[12]=[t("i",{class:"icon-ok-circled"},null,-1)]))):d("",!0),o.finishable?(l(),i("a",{key:3,href:"#",title:"Marquer comme sans suite",onClick:e[3]||(e[3]=h(y=>s.$emit("cancel",a.milestone),["prevent"]))},e[13]||(e[13]=[t("i",{class:"icon-archive"},null,-1)]))):d("",!0),o.finishable?(l(),i("a",{key:4,href:"#",title:"Marquer comme refusé",onClick:e[4]||(e[4]=h(y=>s.$emit("refused",a.milestone),["prevent"]))},e[14]||(e[14]=[t("i",{class:"icon-block"},null,-1)]))):d("",!0),a.manage?(l(),i("a",{key:5,href:"#",title:"Supprimer ce jalon",onClick:e[5]||(e[5]=h(y=>s.$emit("remove",a.milestone),["prevent"]))},e[15]||(e[15]=[t("i",{class:"icon-trash"},null,-1)]))):d("",!0),a.manage?(l(),i("a",{key:6,href:"#",title:"Modifier ce jalon",onClick:e[6]||(e[6]=h(y=>s.$emit("edit",a.milestone),["prevent"]))},e[16]||(e[16]=[t("i",{class:"icon-edit"},null,-1)]))):d("",!0)]))],2)}const Bt=S(zt,[["render",Ht],["__scopeId","data-v-42de1793"]]);const Yt={props:{url:{required:!0},manage:{required:!0},progression:{default:!1},items:{default:[],type:Array},types:{default:[],type:Array},payments:{required:!1,default:[],type:Array}},components:{milestone:Bt,datepicker:T},data(){return{error:null,formData:null,pendingMsg:"",creatable:!1,deleteMilestone:null,editMilestone:null,validMilestone:null,cancelMilestone:null,refusedMilestone:null,unvalidMilestone:null,inProgressMilestone:null,action:null,actionMessage:"",actionMilestone:null,model:{}}},computed:{types(){return this.types},milestones(){let s=[];return this.payments.forEach(e=>{let a=new Date,k=!1,n=!1,o;switch(e.status){case 1:a=e.datePredicted,a?(o="PRÉVU",k=V(e.datePredicted.date).unix(){s.push(e)}),s.sort((e,a)=>{let k=V(e.dateStart).unix(),n=V(a.dateStart).unix();return k-n}),s},payments(){return this.payments},formTypeFinishable(){return this.formData?this.types.find(s=>s.id==this.formData.type.id&&s.finishable):!1},groupedTypes(){let s={};return this.types.forEach(e=>{let a=e.facet;s.hasOwnProperty(a)||(s[a]={label:a,types:[]}),s[e.facet].types.push(e)}),s}},methods:{handlerValid(s){this.validMilestone=s},handlerInProgress(s){this.inProgressMilestone=s},handlerUnvalid(s){this.unvalidMilestone=s},handlerActionConfirm(s,e,a){this.actionMilestone=s,this.action=e,this.actionMessage=a},handlerActionCancel(){this.actionMilestone=null,this.action=null,this.actionMessage=""},handlerCancel(s){this.unvalidMilestone=s},handlerRemove(s){this.deleteMilestone=s},handlerEdit(s){this.editMilestone=s,this.formData={type:s.type,id:s.id,comment:s.comment,dateStart:V(s.dateStart).format("YYYY-MM-DD")}},handlerNew(){this.formData={id:0,type:JSON.parse(JSON.stringify(this.types[0])),dateStart:V().format("Y-M-D HH:mm:ss"),comment:""}},preformDelete(){this.pendingMsg="Suppression du jalon",A.delete(this.url+"?id="+this.deleteMilestone.id).then(s=>{this.fetch()},s=>{O.commit("addErrorAxios",s)}).then(s=>{this.pendingMsg=null,this.deleteMilestone=null})},performValid(s){var e={},a;switch(s){case"valid":this.pendingMsg="Validation du jalon",a=this.validMilestone;break;case"unvalid":this.pendingMsg="Réinitialisation du jalon",a=this.unvalidMilestone;break;case"inprogress":this.pendingMsg="Marquage du jalon comme en cours",a=this.inProgressMilestone;break;case"cancel":case"refused":a=this.actionMilestone;break;default:this.error="Action incorrecte";return}e.id=a.id,e.action=s,this.action=null,this.actionMessage="",this.actionMilestone=null,A.put(this.url,e).then(k=>{this.fetch()},k=>{O.commit("addErrorAxios",k)}).then(k=>{this.pendingMsg=null,this.validMilestone=null,this.unvalidMilestone=null,this.inProgressMilestone=null})},performSave(){this.pendingMsg=this.formData.id?"Enregistrement des modifications":"Création du nouveau jalon",this.formData.id?A.put(this.url,this.formData).then(s=>{this.fetch()},s=>{O.commit("addErrorAxios",s)}).then(s=>{this.pendingMsg=null,this.formData=null}):A.post(this.url,this.formData).then(s=>{this.fetch()},s=>{O.commit("addErrorAxios",s)}).then(s=>{this.pendingMsg=null,this.formData=null})},fetch(){this.pendingMsg="Chargement des jalons : "+this.url,A.get(this.url).then(s=>{this.$emit("update",s.data.datas.milestones.entities)},s=>{console.log(s),this.error="Impossible de charger les jalons de cette activités : "+s}).then(s=>{this.pendingMsg=""})}},mounted(){}},Gt={class:"milestones"},Kt={key:0,class:"error overlay"},Xt={class:"overlay-content"},Qt={key:0,class:"overlay"},Zt={class:"overlay-content"},$t={key:0},es={key:1},ts={class:"form-group"},ss=["label"],ns=["value"],ls={class:"help"},is={class:"form-group"},os={class:"form-group"},rs={key:0,class:"deleteconfirm overlay"},as={class:"overlay-content"},ds={key:0,class:"validconfirm overlay"},us={class:"overlay-content"},ms={key:0,class:"inprogressconfirm overlay"},cs={class:"overlay-content"},ps={key:0,class:"inprogressconfirm overlay"},fs={class:"overlay-content"},vs={key:0,class:"validconfirm overlay"},hs={class:"overlay-content"},gs={key:0,class:"alert alert-info"},ys={key:0,class:"admin-bar"},ks={key:1,class:"list"},bs={key:2,class:"alert"};function Ds(s,e,a,k,n,o){const y=D("datepicker"),v=D("milestone");return l(),i("section",Gt,[g(U,{name:"fade"},{default:P(()=>[n.error?(l(),i("div",Kt,[t("div",Xt,[e[22]||(e[22]=t("i",{class:"icon-warning-empty"},null,-1)),r(" "+u(n.error)+" ",1),e[23]||(e[23]=t("br",null,null,-1)),t("a",{href:"#",onClick:e[0]||(e[0]=c=>n.error=null),class:"btn btn-sm btn-default btn-xs"},e[21]||(e[21]=[t("i",{class:"icon-cancel-circled"},null,-1),r(" Fermer")]))])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.formData?(l(),i("div",Qt,[t("div",Zt,[t("h2",null,[e[25]||(e[25]=t("i",{class:"icon-calendar"},null,-1)),n.formData.id?(l(),i("span",$t,[e[24]||(e[24]=r("Modification du jalon ")),t("strong",null,u(n.formData.type.label),1)])):(l(),i("span",es,"Nouveau jalon"))]),t("div",ts,[e[27]||(e[27]=t("label",{for:""},"Type de jalon",-1)),w(t("select",{name:"",id:"","onUpdate:modelValue":e[1]||(e[1]=c=>n.formData.type.id=c),class:"form-control"},[(l(!0),i(b,null,_(o.groupedTypes,c=>(l(),i("optgroup",{label:c.label},[(l(!0),i(b,null,_(c.types,M=>(l(),i("option",{value:M.id},u(M.label),9,ns))),256))],8,ss))),256))],512),[[x,n.formData.type.id]]),w(t("p",ls,e[26]||(e[26]=[t("i",{class:"icon-info-circled"},null,-1),r(" Ce type de jalon inclut des méchanismes de validation pour marquer le jalon comme terminé ")]),512),[[ee,o.formTypeFinishable]])]),t("div",is,[e[28]||(e[28]=t("label",{for:""},"Date prévue pour le jalon",-1)),g(y,{modelValue:n.formData.dateStart,"onUpdate:modelValue":e[2]||(e[2]=c=>n.formData.dateStart=c),onInput:e[3]||(e[3]=c=>{n.formData.dateStart=c})},null,8,["modelValue"])]),t("div",os,[e[29]||(e[29]=t("label",{for:""},"Description",-1)),w(t("textarea",{"onUpdate:modelValue":e[4]||(e[4]=c=>n.formData.comment=c),class:"form-control"},null,512),[[E,n.formData.comment]])]),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[5]||(e[5]=(...c)=>o.performSave&&o.performSave(...c))},e[30]||(e[30]=[t("i",{class:"icon-floppy"},null,-1),r(" Enregistrer ")])),t("button",{class:"btn btn-default",onClick:e[6]||(e[6]=c=>n.formData=null)},e[31]||(e[31]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.deleteMilestone?(l(),i("div",rs,[t("div",as,[e[40]||(e[40]=t("h2",null,[t("i",{class:"icon-help-circled"}),r(" Supprimer ce jalon ?")],-1)),t("p",null,[e[32]||(e[32]=r("Cette suppression sera ")),e[33]||(e[33]=t("strong",null,"définitive",-1)),e[34]||(e[34]=r(", si vous souhaitez signifier que ce jalon est réalisé, utilisez plutôt l'option ")),e[35]||(e[35]=t("em",null,"Marquer comme terminé",-1)),e[36]||(e[36]=r(". Si cette option n'est pas disponible, demandez à l'administrateur Oscar si vous avez les privilèges pour réaliser cette action ou si le type de jalon ")),t("strong",null,u(n.deleteMilestone.type.label),1),e[37]||(e[37]=r(" est correctement configuré."))]),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[7]||(e[7]=(...c)=>o.preformDelete&&o.preformDelete(...c))},e[38]||(e[38]=[t("i",{class:"icon-trash"},null,-1),r(" Supprimer ")])),t("button",{class:"btn btn-default",onClick:e[8]||(e[8]=c=>n.deleteMilestone=null)},e[39]||(e[39]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.validMilestone?(l(),i("div",ds,[t("div",us,[e[43]||(e[43]=t("h2",null,[t("i",{class:"icon-help-circled"}),r(" Valider ce jalon ? ")],-1)),e[44]||(e[44]=t("p",null,"Les jalons marqués comme terminés ne feront pas l'objet de notifications ou d'alertes.",-1)),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[9]||(e[9]=c=>o.performValid("valid"))},e[41]||(e[41]=[t("i",{class:"icon-ok-circled"},null,-1),r(" Marquer ce jalon comme terminé ")])),t("button",{class:"btn btn-default",onClick:e[10]||(e[10]=c=>n.validMilestone=null)},e[42]||(e[42]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.inProgressMilestone?(l(),i("div",ms,[t("div",cs,[e[47]||(e[47]=t("h2",null,[t("i",{class:"icon-help-circled"}),r(' Marquer ce jalon "en cours" ? ')],-1)),e[48]||(e[48]=t("p",null,null,-1)),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[11]||(e[11]=c=>o.performValid("inprogress"))},e[45]||(e[45]=[t("i",{class:"icon-cw-outline"},null,-1),r(" Marquer ce jalon comme en cours ")])),t("button",{class:"btn btn-default",onClick:e[12]||(e[12]=c=>n.inProgressMilestone=null)},e[46]||(e[46]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.actionMessage?(l(),i("div",ps,[t("div",fs,[t("h2",null,[e[49]||(e[49]=t("i",{class:"icon-help-circled"},null,-1)),r(" "+u(n.actionMessage)+" ? ",1)]),e[52]||(e[52]=t("p",null,"Les jalons marqués comme terminés (Validé, refusé ou sans suite) ne feront pas l'objet de notifications ou d'alertes",-1)),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[13]||(e[13]=c=>o.performValid(n.action))},[e[50]||(e[50]=t("i",{class:"icon-cw-outline"},null,-1)),r(" "+u(n.actionMessage),1)]),t("button",{class:"btn btn-default",onClick:e[14]||(e[14]=(...c)=>o.handlerActionCancel&&o.handlerActionCancel(...c))},e[51]||(e[51]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.unvalidMilestone?(l(),i("div",vs,[t("div",hs,[e[55]||(e[55]=t("h2",null,[t("i",{class:"icon-help-circled"}),r(" Invalider ce jalon ? ")],-1)),e[56]||(e[56]=t("p",null,"L'état d'avancement du jalon sera réinitialisé.",-1)),t("nav",null,[t("button",{class:"btn btn-success",onClick:e[15]||(e[15]=c=>o.performValid("unvalid"))},e[53]||(e[53]=[t("i",{class:"icon-ok-circled"},null,-1),r(" Réinitialiser la progression de ce jalon ")])),t("button",{class:"btn btn-danger",onClick:e[16]||(e[16]=c=>n.unvalidMilestone=null)},e[54]||(e[54]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.pendingMsg?(l(),i("div",gs,[e[57]||(e[57]=t("i",{class:"icon-spinner animate-spin"},null,-1)),r(" "+u(n.pendingMsg),1)])):d("",!0)]),_:1}),a.manage?(l(),i("nav",ys,[t("a",{href:"#",onClick:e[17]||(e[17]=h((...c)=>o.handlerNew&&o.handlerNew(...c),["prevent"])),class:"btn btn-xs btn-default"},e[58]||(e[58]=[t("i",{class:"icon-calendar-plus-o"},null,-1),r(" Nouveau Jalon ")])),t("a",{href:"#",onClick:e[18]||(e[18]=h((...c)=>o.fetch&&o.fetch(...c),["prevent"])),class:"btn btn-xs btn-warning"},e[59]||(e[59]=[t("i",{class:"icon-bug"},null,-1),r(" fetch ")]))])):d("",!0),o.milestones!=null?(l(),i("section",ks,[(l(!0),i(b,null,_(o.milestones,c=>(l(),z(v,{milestone:c,key:c.id,manage:a.manage,progression:a.progression,onValid:o.handlerValid,onUnvalid:o.handlerUnvalid,onInprogress:o.handlerInProgress,onCancel:e[19]||(e[19]=M=>o.handlerActionConfirm(M,"cancel","Marquer ce jalon comme sans suite")),onRefused:e[20]||(e[20]=M=>o.handlerActionConfirm(M,"refused","Marquer ce jalon comme refusé")),onRemove:o.handlerRemove,onEdit:o.handlerEdit},null,8,["milestone","manage","progression","onValid","onUnvalid","onInprogress","onRemove","onEdit"]))),128))])):(l(),i("div",bs," Aucun jalon "))])}const _s=S(Yt,[["render",Ds]]),ws={props:["payment","manage"],data(){return{}},computed:{late(){if(this.payment.status===1){if(!this.payment.datePredicted)return!0;let s=V().unix();return V(this.payment.datePredicted).unix()s.$emit("delete",a.payment),["prevent"])),title:"Supprimer ce versement"},e[7]||(e[7]=[t("i",{class:"icon-trash"},null,-1)])),t("a",{href:"#",class:"btn-edit",onClick:e[1]||(e[1]=h(y=>s.$emit("edit",a.payment),["prevent"])),title:"Modifier ce versement"},e[8]||(e[8]=[t("i",{class:"icon-pencil"},null,-1)]))])):d("",!0)]),t("p",js,u(a.payment.comment),1)],2)}const zs=S(ws,[["render",Os]]),Rs={props:["url","amount","currency","currencies","manage","payments"],data(){return{formData:null,deletePayment:null,error:"",pendingMsg:""}},components:{payment:zs,datepicker:T},computed:{total(){let s=0;return this.payments&&this.payments.forEach(e=>{let a=1;e.currency&&(a=e.rate),s+=e.amount/a}),Math.round(s*100)/100},currencySymbol(){return this.currency?this.currency.symbol:"€"},formHasError(){return!this.formData.amount||this.formData.status==2&&!this.formData.datePayment||this.formData.status==1&&!this.formData.datePredicted}},methods:{getPaymentDateValue(s){return s.status==2?s.datePayment?s.datePayment.date:null:s.status==1&&s.datePredicted?s.datePredicted.date:null},handlerNewPayment(){this.formData={id:null,amount:0,currencyId:1,rate:1,datePredicted:"",status:1,datePayment:"",codeTransaction:"",comment:""}},handlerDelete(s){this.deletePayment=s},handlerEdit(s){this.formData=JSON.parse(JSON.stringify(s)),this.formData.currencyId=s.currency.id,this.formData.datePayment=s.datePayment?V(s.datePayment.date).format("YYYY-MM-DD"):"",this.formData.datePredicted=s.datePredicted?V(s.datePredicted.date).format("YYYY-MM-DD"):"",this.formData.currencyId=s.currency.id},handlerFormUpdateRate(){let s=this.currencies.find(e=>e.id==this.formData.currencyId);s&&(this.formData.rate=s.rate)},performSave(){this.loading="Enregistrement du paiement",!this.formHasError&&(this.formData.id?A.post(this.url,this.formData).then(s=>{this.formData=null,this.fetch()},s=>{this.error=j.manageErrorResponse(s)}):A.put(this.url,this.formData).then(s=>{this.formData=null,this.fetch()},s=>{this.error=j.manageErrorResponse(s)}))},performDelete(){A.delete(this.url+"?id="+this.deletePayment.id).then(s=>{this.fetch()},s=>{this.error="Impossible de supprimer le versement : "+j.manageErrorResponse(s).message}).then(()=>{this.deletePayment=null})},fetch(){this.loading="Chargement des versements",A.get(this.url).then(s=>{this.$emit("update",s.data.datas.payments)},s=>{this.error=j.manageErrorResponse(s)}).finally(s=>this.loading=null)}},mounted(){}},Fs={class:"payments"},Is={key:0,class:"error overlay"},Ws={class:"overlay-content"},Ts={key:0,class:"pending overlay"},qs={class:"overlay-content"},Ls={key:0,class:"deleteconfirm overlay"},Js={class:"overlay-content"},Hs={key:0,class:"overlay"},Bs={class:"overlay-content"},Ys={key:0},Gs={key:1},Ks={class:"container"},Xs={class:"row"},Qs={class:"col-xs-6"},Zs={class:"form-group"},$s={key:0,class:"oscar-form-message error"},en={class:"col-xs-3"},tn={class:"form-group"},sn=["value"],nn={class:"col-xs-3"},ln={class:"form-group"},on={class:"row"},rn={class:"col-xs-6"},an={class:"form-group"},dn={key:0,class:"oscar-form-message error"},un={class:"col-xs-6"},mn={class:"form-group"},cn={class:"done"},pn={class:"row"},fn={class:"col-xs-6"},vn={class:"form-group"},hn={key:0,class:"oscar-form-message error"},gn={class:"col-xs-6"},yn={class:"form-group"},kn={class:"form-group"},bn={class:"text-center"},Dn={class:"btn-group"},_n={key:0,class:"admin-bar"},wn={class:"payment total"},Cn={class:"heading"},Pn={class:"amount text-private"},An={class:"date"},Un={class:"text-private"},Sn={key:1,class:"alert alert-danger alertAmount"},Mn={class:"amountPrevu text-private"},En={title:"Valeur exacte : = $entity->getAmount() ?>",class:"text-private"};function Vn(s,e,a,k,n,o){const y=D("datepicker"),v=D("payment");return l(),i("section",Fs,[g(U,{name:"fade"},{default:P(()=>[n.error?(l(),i("div",Is,[t("div",Ws,[e[19]||(e[19]=t("i",{class:"icon-warning-empty"},null,-1)),r(" "+u(n.error)+" ",1),e[20]||(e[20]=t("br",null,null,-1)),t("a",{href:"#",onClick:e[0]||(e[0]=c=>n.error=null),class:"btn btn-default"},e[18]||(e[18]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Fermer")]))])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.pendingMsg?(l(),i("div",Ts,[t("div",qs,[e[21]||(e[21]=t("i",{class:"icon-spinner animate-spin"},null,-1)),r(" "+u(n.pendingMsg),1)])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.deletePayment?(l(),i("div",Ls,[t("div",Js,[e[24]||(e[24]=t("h3",null,[t("i",{class:"icon-help-circled"}),r(" Supprimer ce versement ?")],-1)),t("nav",null,[t("button",{class:"btn btn-default",onClick:e[1]||(e[1]=(...c)=>o.performDelete&&o.performDelete(...c))},e[22]||(e[22]=[t("i",{class:"icon-trash"},null,-1),r(" Supprimer ")])),t("button",{class:"btn btn-default",onClick:e[2]||(e[2]=c=>n.deletePayment=null)},e[23]||(e[23]=[t("i",{class:"icon-cancel-outline"},null,-1),r(" Annuler ")]))])])])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.formData?(l(),i("div",Hs,[t("div",Bs,[n.formData.id?(l(),i("h3",Ys,"Modification du versement")):(l(),i("h3",Gs,"Nouveau versement")),t("div",Ks,[t("div",Xs,[t("div",Qs,[t("div",Zs,[e[25]||(e[25]=t("label",{class:"control-label",for:"amount"},"Montant",-1)),w(t("input",{name:"amount",class:"form-control input-lg form-control","onUpdate:modelValue":e[3]||(e[3]=c=>n.formData.amount=c),type:"text"},null,512),[[E,n.formData.amount]]),n.formData.amount?d("",!0):(l(),i("div",$s," Vous devez indiquer un montant. "))])]),t("div",en,[t("div",tn,[e[26]||(e[26]=t("label",{class:"control-label"},"Devise pour le versement",-1)),w(t("select",{name:"currency",class:"form-control form-control","onUpdate:modelValue":e[4]||(e[4]=c=>n.formData.currencyId=c),onChange:e[5]||(e[5]=(...c)=>o.handlerFormUpdateRate&&o.handlerFormUpdateRate(...c))},[(l(!0),i(b,null,_(a.currencies,c=>(l(),i("option",{value:c.id},u(c.label),9,sn))),256))],544),[[x,n.formData.currencyId]])])]),t("div",nn,[t("div",ln,[e[27]||(e[27]=t("label",{class:"control-label"},"Taux",-1)),w(t("input",{name:"rate",class:"form-control form-control","onUpdate:modelValue":e[6]||(e[6]=c=>n.formData.rate=c),type:"text"},null,512),[[E,n.formData.rate]])])])]),t("div",on,[t("div",rn,[t("div",an,[e[28]||(e[28]=t("label",{class:"control-label"},"Date prévue",-1)),g(y,{modelValue:n.formData.datePredicted,"onUpdate:modelValue":e[7]||(e[7]=c=>n.formData.datePredicted=c),onInput:e[8]||(e[8]=c=>{n.formData.datePredicted=c})},null,8,["modelValue"]),n.formData.status==1&&!n.formData.datePredicted?(l(),i("div",dn," Les versements prévisionnels necessitent une date. ")):d("",!0)])]),t("div",un,[t("div",mn,[e[30]||(e[30]=t("label",{class:"control-label"},"Statut",-1)),w(t("select",{name:"status",class:"form-control form-control","onUpdate:modelValue":e[9]||(e[9]=c=>n.formData.status=c)},e[29]||(e[29]=[t("option",{value:"1",selected:"selected"},"Prévisionnel",-1),t("option",{value:"2"},"Réalisé",-1),t("option",{value:"3"},"Écart",-1)]),512),[[x,n.formData.status]])])])]),t("div",cn,[e[34]||(e[34]=t("h2",null,"Informations sur le versement effectif",-1)),t("div",pn,[t("div",fn,[t("div",vn,[e[31]||(e[31]=t("label",{class:"control-label"},"Date effective",-1)),g(y,{moment:s.moment,modelValue:n.formData.datePayment,"onUpdate:modelValue":e[10]||(e[10]=c=>n.formData.datePayment=c),onInput:e[11]||(e[11]=c=>{n.formData.datePayment=c})},null,8,["moment","modelValue"]),n.formData.status==2&&!n.formData.datePayment?(l(),i("div",hn," Les versements réalisés necessitent une date effective ")):d("",!0)])]),t("div",gn,[t("div",yn,[e[32]||(e[32]=t("label",{class:"control-label"},"N° de pièce",-1)),w(t("input",{name:"codeTransaction",class:"form-control form-control","onUpdate:modelValue":e[12]||(e[12]=c=>n.formData.codeTransaction=c),type:"text"},null,512),[[E,n.formData.codeTransaction]])]),e[33]||(e[33]=t("p",{class:"help"},"Numéro permettant d'identifier l'opération auprès des services comptables.",-1))])])]),t("div",kn,[e[35]||(e[35]=t("label",{class:"control-label"},"Commentaire",-1)),w(t("textarea",{name:"comment",class:"form-control form-control",placeholder:"Commentaire","onUpdate:modelValue":e[13]||(e[13]=c=>n.formData.comment=c)},null,512),[[E,n.formData.comment]])]),t("nav",bn,[t("nav",Dn,[t("a",{class:"btn btn-default button-back",href:"#",onClick:e[14]||(e[14]=h(c=>n.formData=null,["prevent"]))},"Annuler"),t("button",{class:C(["btn btn-primary",{disabled:o.formHasError}]),onClick:e[15]||(e[15]=h((...c)=>o.performSave&&o.performSave(...c),["prevent"]))}," Enregistrer ",2)])])])])])):d("",!0)]),_:1}),a.manage?(l(),i("nav",_n,[t("a",{href:"#",onClick:e[16]||(e[16]=h((...c)=>o.handlerNewPayment&&o.handlerNewPayment(...c),["prevent"])),class:"btn btn-default btn-xs"},e[36]||(e[36]=[t("i",{class:"icon-bank"},null,-1),r(" Nouveau versement")])),t("button",{class:"btn btn-warning btn-xs",onClick:e[17]||(e[17]=h((...c)=>o.fetch&&o.fetch(...c),["prevent"]))},e[37]||(e[37]=[t("i",{class:"icon-bug"},null,-1),r(" fetch ")]))])):d("",!0),(l(!0),i(b,null,_(a.payments,c=>(l(),z(v,{payment:c,key:c.id,manage:a.manage,onDelete:o.handlerDelete,onEdit:o.handlerEdit},null,8,["payment","manage","onDelete","onEdit"]))),128)),t("article",wn,[t("div",Cn,[t("strong",Pn,u(s.$filters.money(o.total))+" € ",1),t("span",An,[e[38]||(e[38]=r("/ ")),t("strong",Un,u(s.$filters.money(a.amount))+" €",1)])])]),o.total!=a.amount?(l(),i("div",Sn,[e[41]||(e[41]=t("p",null,[t("i",{class:"icon-attention-1"}),r(" Le total des versements prévus et réalisés ne semble pas correspondre avec le montant prévu initialement, Somme des versements :")],-1)),t("ul",null,[t("li",null,[t("strong",Mn,u(s.$filters.money(o.total))+" "+u(o.currencySymbol),1),e[39]||(e[39]=r(" en versement,"))]),t("li",null,[t("strong",En,u(s.$filters.money(a.amount))+" "+u(o.currencySymbol),1),e[40]||(e[40]=r(" prévu "))])])])):d("",!0)])}const xn=S(Rs,[["render",Vn]]);const Nn={name:"PersonCartouche",props:{person:{required:!0,type:Object}}},jn={class:"person-text"},On={class:"info-bulle"},zn=["src"],Rn={class:"infos"},Fn={class:"firstname"},In={class:"lastname"},Wn={class:"content"},Tn={style:{"white-space":"nowrap"}},qn={key:0},Ln={key:1},Jn={key:0},Hn={key:1},Bn={key:0},Yn={key:1},Gn={key:0},Kn=["href"],Xn={key:1};function Qn(s,e,a,k,n,o){return l(),i("span",jn,[r(u(a.person.label)+" ",1),t("div",On,[t("header",null,[t("figure",null,[t("img",{src:"https://www.gravatar.com/avatar/"+a.person.mailMd5+"?s=60",alt:""},null,8,zn)]),t("div",Rn,[t("div",Fn,u(a.person.firstName),1),t("div",In,u(a.person.lastName),1)])]),t("div",Wn,[t("div",Tn,[e[0]||(e[0]=t("i",{class:"icon-mail"},null,-1)),a.person.email?(l(),i("span",qn,u(a.person.email),1)):(l(),i("em",Ln,"Inconnu"))]),t("div",null,[e[1]||(e[1]=t("i",{class:"icon-phone-outline"},null,-1)),a.person.phone?(l(),i("span",Jn,u(a.person.phone),1)):(l(),i("em",Hn,"Inconnu"))]),t("div",null,[e[2]||(e[2]=t("i",{class:"icon-building-filled"},null,-1)),a.person.affectation?(l(),i("span",Bn,u(a.person.affectation),1)):(l(),i("em",Yn,"Inconnu"))]),a.person.ucbnSiteLocalisation?(l(),i("div",Gn,[e[3]||(e[3]=t("i",{class:"icon-direction"},null,-1)),t("span",null,u(a.person.ucbnSiteLocalisation),1)])):d("",!0)]),t("footer",null,[a.person.url?(l(),i("a",{key:0,href:a.person.url,class:"btn btn-primary btn-xs"},e[4]||(e[4]=[t("i",{class:"icon-zoom-in-outline"},null,-1),r(" Fiche")]),8,Kn)):(l(),i("code",Xn,u(a.person.id),1))])])])}const Zn=S(Nn,[["render",Qn],["__scopeId","data-v-dfc2c1c6"]]),$n={components:{PersonDisplay:K},props:{person:{default:function(){return{}}},editable:!1,allowTooltip:{default:!1}},computed:{duration(){return this.person.duration}},data(){return{canSave:!1,mode:"read",durationForm:666}},methods:{handlerKeyUp(){console.log(arguments)},handlerUpdate(){this.$emit("workpackagepersonupdate",this.person,this.durationForm),this.mode="read"},handlerEdit(){this.mode="edit",this.durationForm=this.person.duration},handlerCancel(){this.mode="read",this.durationForm=this.person.duration},handlerRemove(){this.$emit("workpackagepersondelete",this.person)}}},el={class:"workpackage-person"},tl={class:"displayname"},sl={class:"tempsdeclare temps"},nl={key:0},ll={key:1},il={class:"wp-hours"},ol={title:"Heure(s) saisie(s)",class:"wp-hour unsend"},rl={title:"Heure(s) validée(s)",class:"wp-hour validate"},al={key:0,title:"Heure(s) en cours de validation",class:"wp-hour validating"},dl={key:1,title:"Heure(s) en conflit",class:"wp-hour conflicts"},ul={title:"Heure(s) à valider",class:"wp-hour duration"};function ml(s,e,a,k,n,o){const y=D("PersonDisplay");return l(),i("article",el,[t("div",tl,[g(y,{person:a.person.person,"allow-tooltip":a.allowTooltip},null,8,["person","allow-tooltip"]),a.editable&&n.mode=="read"?(l(),i("a",{key:0,href:"#",onClick:e[0]||(e[0]=h(v=>o.handlerRemove(a.person),["prevent"])),class:"link",title:"Supprimer ce déclarant"},e[6]||(e[6]=[t("i",{class:"icon-trash"},null,-1)]))):d("",!0)]),t("div",sl,[a.editable&&n.mode=="edit"?(l(),i("div",nl,[e[9]||(e[9]=r(" Heures prévues : ")),w(t("input",{type:"integer","onUpdate:modelValue":e[1]||(e[1]=v=>n.durationForm=v),style:{width:"5em"},onKeyup:e[2]||(e[2]=te((...v)=>o.handlerUpdate&&o.handlerUpdate(...v),["13"]))},null,544),[[E,n.durationForm]]),t("a",{href:"#",onClick:e[3]||(e[3]=h((...v)=>o.handlerUpdate&&o.handlerUpdate(...v),["prevent"])),title:"Appliquer la modification des heures prévues"},e[7]||(e[7]=[t("i",{class:"icon-floppy"},null,-1)])),t("a",{href:"#",onClick:e[4]||(e[4]=h((...v)=>o.handlerCancel&&o.handlerCancel(...v),["prevent"])),title:"Annuler la modification des heures prévues"},e[8]||(e[8]=[t("i",{class:"icon-cancel-outline"},null,-1)]))])):(l(),i("span",ll,[t("strong",il,[t("span",ol,u(a.person.unsend|s.heures),1),t("span",rl,u(a.person.validate|s.heures),1),a.person.validating>0?(l(),i("span",al,u(a.person.validating|s.heures),1)):d("",!0),a.person.conflicts>0?(l(),i("span",dl,u(a.person.conflicts|s.heures),1)):d("",!0),t("span",ul,[r(" / "+u(a.person.duration|s.heures)+" ",1),a.editable&&n.mode=="read"?(l(),i("a",{key:0,href:"#",onClick:e[5]||(e[5]=h((...v)=>o.handlerEdit&&o.handlerEdit(...v),["prevent"])),title:"Modifier les heures prévues"},e[10]||(e[10]=[t("i",{class:"icon-pencil"},null,-1)]))):d("",!0)])])]))])])}const cl=S($n,[["render",ml]]),pl={components:{workpackageperson:cl},data(){return{mode:"read",canSave:!1,formData:{id:-1,code:"",label:"",description:""}}},created(){this.workpackage.id<0&&(this.mode="edit")},props:{workpackage:null,persons:{default:function(){return[]}},editable:!1,isValidateur:!1,allowTooltip:{default:!1}},watch:{},methods:{isDeclarant(s,e){return e.persons.find(a=>a.person.id===s.id)},handlerEditWorkPackage(){this.formData=JSON.parse(JSON.stringify(this.workpackage)),this.mode="edit"},handlerCancelEdit(){this.workpackage.id<0?this.$emit("workpackagecancelnew",this.workpackage):this.mode="read"},handlerDeleteWorkPackage(){this.$emit("workpackagedelete",this.workpackage)},handlerUpdateWorkPackage(s){if(this.formData.code)this.$emit("workpackageupdate",this.formData),this.mode="read";else return s.stopPropagation(),s.stopImmediatePropagation(),!1},handlerUpdate(s,e){this.$emit("workpackagepersonupdate",s,e)},handlerDelete(s){this.$emit("workpackagepersondelete",s)},roles(s){return s.roles.join(",")},tempsPrevu(s){return 0},tempsDeclare(s){return 0}}},fl={class:"workpackage"},vl={key:0},hl={key:1},gl={class:"form-group"},yl={class:"form-group"},kl={class:"form-group"},bl={class:"buttons"},Dl={key:1},_l={class:"workpackage-persons"},wl={key:0,class:"buttons"},Cl={class:"btn-group"},Pl={class:"dropdown-menu"},Al=["onClick"],Ul={key:1,class:"text-danger"};function Sl(s,e,a,k,n,o){const y=D("workpackageperson");return l(),i("article",fl,[n.mode=="edit"?(l(),i("form",{key:0,action:"",onSubmit:e[4]||(e[4]=h((...v)=>o.handlerUpdateWorkPackage&&o.handlerUpdateWorkPackage(...v),["prevent"]))},[t("h4",null,[a.workpackage.id>0?(l(),i("span",vl,"Modification du lot")):(l(),i("span",hl,"Nouveau lot")),r(" "+u(n.formData.label),1)]),t("div",gl,[e[7]||(e[7]=t("label",{for:""},"Code",-1)),e[8]||(e[8]=t("p",{class:"text-danger"},[r("Le code est "),t("strong",null,"utilisé pour l'affichage des créneaux"),r(" simplifiés, utilisez un code de préférence entre 3 et 5 caractères.")],-1)),w(t("input",{type:"text",placeholder:"CODE","onUpdate:modelValue":e[0]||(e[0]=v=>n.formData.code=v),class:"form-control"},null,512),[[E,n.formData.code]])]),t("div",yl,[e[9]||(e[9]=t("label",{for:""},"Intitulé",-1)),w(t("input",{type:"text",placeholder:"Intitulé","onUpdate:modelValue":e[1]||(e[1]=v=>n.formData.label=v),class:"form-control"},null,512),[[E,n.formData.label]])]),t("div",kl,[e[10]||(e[10]=t("label",{for:""},"Description",-1)),w(t("textarea",{type:"text",placeholder:"Description","onUpdate:modelValue":e[2]||(e[2]=v=>n.formData.description=v),class:"form-control"},null,512),[[E,n.formData.description]])]),t("div",bl,[t("button",{type:"submit",class:C(["btn btn-default btn-save",{disabled:!n.formData.code}])},"Enregistrer ",2),t("button",{type:"button",class:"btn btn-default",onClick:e[3]||(e[3]=(...v)=>o.handlerCancelEdit&&o.handlerCancelEdit(...v))},"Annuler")])],32)):d("",!0),n.mode=="read"?(l(),i("div",Dl,[t("h3",null,"["+u(a.workpackage.code)+"] "+u(a.workpackage.label),1),t("p",null,u(a.workpackage.description),1),t("section",_l,[e[11]||(e[11]=t("h4",null,[t("i",{class:"icon-calendar"}),r("Déclarants ")],-1)),(l(!0),i(b,null,_(a.workpackage.persons,v=>(l(),z(y,{key:v.id,"allow-tooltip":a.allowTooltip,person:v,editable:a.editable,onWorkpackagepersondelete:o.handlerDelete,onWorkpackagepersonupdate:o.handlerUpdate},null,8,["allow-tooltip","person","editable","onWorkpackagepersondelete","onWorkpackagepersonupdate"]))),128))]),a.editable&&a.persons.length?(l(),i("div",wl,[t("div",Cl,[e[12]||(e[12]=t("button",{type:"button",class:"btn btn-default btn-xs dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[r(" Ajouter un déclarant "),t("span",{class:"caret"})],-1)),t("ul",Pl,[(l(!0),i(b,null,_(a.persons,v=>(l(),i("li",{class:C({disabled:o.isDeclarant(v,a.workpackage)})},[t("a",{href:"#",onClick:h(c=>s.$emit("addperson",v.id,a.workpackage.id),["prevent"])},u(v.displayname),9,Al)],2))),256))])]),t("a",{href:"#",class:"btn btn-default btn-xs",onClick:e[5]||(e[5]=h((...v)=>o.handlerEditWorkPackage&&o.handlerEditWorkPackage(...v),["prevent"]))},e[13]||(e[13]=[t("i",{class:"icon-pencil"},null,-1),r("Modifier")])),t("a",{href:"#",class:"btn btn-default btn-xs",onClick:e[6]||(e[6]=h((...v)=>o.handlerDeleteWorkPackage&&o.handlerDeleteWorkPackage(...v),["prevent"]))},e[14]||(e[14]=[t("i",{class:"icon-trash"},null,-1),r("Supprimer")]))])):d("",!0),a.persons.length<=0?(l(),i("div",Ul,e[15]||(e[15]=[r(" Vous n'avez pas encore ajouté de membre à cette activité. "),t("strong",null,"Seul les membres d'une activité peuvent être identifiés comme déclarant",-1),r(". ")]))):d("",!0)])):d("",!0)])}const Ml=S(pl,[["render",Sl]]);const El={components:{Workpackage:Ml},data(){return{loading:!1,errors:[],isDeclarant:!1,isValidateur:!1,confirm:null,confirmData:null,confirmHandler:null,editedWorlpackage:null}},props:{url:{required:!0},editable:{required:!1,default:!1},allowTooltip:{default:!1},isValidateur:{required:!0},outsidePerson:{required:!0},persons:{required:!0},workpackages:{required:!0},debugEnabled:{default:!1}},methods:{handlerWorkPackageCancelNew(s){this.workpackages.splice(this.workpackages.indexOf(s),1)},handlerWorkPackageNew(){this.workpackages.push({id:-1,code:"Nouveau Lot",label:"",persons:[],description:""})},handlerConfirm(){console.log("handlerConfirm"),this.confirmHandler(this.confirmData),this.confirm=null},handlerWorkPackagePersonDelete(s){this.confirm="Supprimer le déclarant ?",this.confirmData=s,this.confirmHandler=this.handlerWorkPackagePersonDeleteDo},handlerWorkPackagePersonDeleteDo(s){A.delete(this.url+"?workpackagepersonid="+s.id).then(e=>{this.fetch()},e=>{this.errors.push("Impossible de supprimer le déclarant : "+e.body)})},handlerWorkPackageDelete(s){this.confirm="Supprimer le lot de travail ?",this.confirmData=s,this.confirmHandler=this.handlerWorkPackageDeleteDo},handlerWorkPackageDeleteDo(s){A.delete(this.url+"?workpackageid="+s.id).then(e=>{this.fetch()},e=>{this.errors.push("Impossible de supprimer le lot : "+e.body)})},handlerWorkPackageUpdate(s){var e=new FormData;for(var a in s)e.append(a,s[a]);if(s.id>0)console.log("MAJ du LOT"),e.append("workpackageid",s.id),A.post(this.url,e).then(k=>{this.fetch()},k=>{this.errors.push("Impossible de mettre à jour le lot de travail : "+k.body)});else{console.log("NOUVEAU du LOT ",this.url);let k=JSON.parse(JSON.stringify(s));k.workpackageid=-1,A.put(this.url,k).then(n=>{this.fetch()},n=>{this.errors.push("Impossible de créer le lot de travail : "+n.body)}).then(n=>this.fetch())}},handlerUpdateWorkPackagePerson(s,e){var a=new FormData;a.append("workpackagepersonid",s.id),a.append("duration",e),A.post(this.url,a).then(k=>{s.duration=e},k=>{this.errors.push("Impossible de mettre à jour les heures prévues : "+k.body)})},addperson(s,e){console.log(arguments);var a={idworkpackage:e,idperson:s};A.put(this.url,a).then(k=>{this.fetch()},k=>{this.errors.push("Impossible d'ajouter le déclarant : "+k.body)}).then(()=>this.loading=!1)},fetch(){this.loading="Chargement des lots de travails",console.log(this.url),A.get(this.url+"?v=2").then(s=>{console.log("Chargement des lots de travail : ",s);try{let e=s.data.datas.workpackages;this.$emit("update",e)}catch(e){this.errors.push("UI ERROR "+e)}},s=>{this.errors.push(j.manageErrorResponse(s).message)}).then(()=>this.loading=!1)},fetchPersons(){this.fetch()}}},Vl={key:0,class:"vue-loader"},xl={class:"alert alert-danger"},Nl=["onClick"],jl={key:0,class:"overlay"},Ol={class:"overlay-content"},zl={class:"overlay-title"},Rl={class:"buttons"},Fl={class:"admin-bar"},Il={class:"workpackages"};function Wl(s,e,a,k,n,o){const y=D("workpackage");return l(),i("section",null,[g(U,{name:"fade"},{default:P(()=>[n.errors.length?(l(),i("div",Vl,[(l(!0),i(b,null,_(n.errors,(v,c)=>(l(),i("div",xl,[r(u(v)+" ",1),t("a",{href:"",onClick:h(M=>n.errors.splice(c,1),["prevent"])},e[5]||(e[5]=[t("i",{class:"icon-cancel-outline"},null,-1)]),8,Nl)]))),256))])):d("",!0)]),_:1}),g(U,{name:"fade"},{default:P(()=>[n.confirm?(l(),i("div",jl,[t("div",Ol,[t("div",zl,[r(u(n.confirm)+" ",1),t("a",{href:"#",class:"overlay-closer",onClick:e[0]||(e[0]=h(v=>n.confirm=null,["prevent"]))},"x")]),t("nav",Rl,[t("a",{href:"#",class:"btn btn-danger",onClick:e[1]||(e[1]=h(v=>n.confirm=null,["prevent"]))},"Annuler"),t("a",{href:"#",class:"btn btn-danger",onClick:e[2]||(e[2]=h(v=>o.handlerConfirm(),["prevent"]))},"Confirmer")])])])):d("",!0)]),_:1}),t("nav",Fl,[t("a",{href:"",class:"btn btn-primary btn-xs",onClick:e[3]||(e[3]=h((...v)=>o.handlerWorkPackageNew&&o.handlerWorkPackageNew(...v),["prevent"]))},e[6]||(e[6]=[t("i",{class:"icon-book"},null,-1),r(" Nouveau lot")])),a.debugEnabled?(l(),i("a",{key:0,href:"",class:"btn btn-warning btn-xs",onClick:e[4]||(e[4]=h((...v)=>o.fetch&&o.fetch(...v),["prevent"]))},e[7]||(e[7]=[t("i",{class:"icon-bug"},null,-1),r(" fetch")]))):d("",!0)]),t("section",Il,[(l(!0),i(b,null,_(a.workpackages,v=>(l(),z(y,{key:v.id,"allow-tooltip":a.allowTooltip,workpackage:v,persons:a.persons,editable:a.editable,"is-validateur":a.isValidateur,onAddperson:o.addperson,onWorkpackageupdate:o.handlerWorkPackageUpdate,onWorkpackagepersonupdate:o.handlerUpdateWorkPackagePerson,onWorkpackagepersondelete:o.handlerWorkPackagePersonDelete,onWorkpackagedelete:o.handlerWorkPackageDelete,onWorkpackagecancelnew:o.handlerWorkPackageCancelNew},null,8,["allow-tooltip","workpackage","persons","editable","is-validateur","onAddperson","onWorkpackageupdate","onWorkpackagepersonupdate","onWorkpackagepersondelete","onWorkpackagedelete","onWorkpackagecancelnew"]))),128))])])}const Tl=S(El,[["render",Wl],["__scopeId","data-v-7f36a26b"]]);A.defaults.headers.common.Accept="application/json";A.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const F="activities_sticky",ql={name:"Activity",components:{ActivityAvenants:Ot,ActivityNotes:ce,ActivityLogs:me,ActivityDocument:ue,ActivitySpentSynthesis:pe,EntityWithRole:fe,Loader:ve,Payments:xn,PersonCartouche:Zn,PersonDisplay:K,Milestones:_s,Modal:G,VueJsonPretty:se,WorkpackagesActivity:Tl},props:{url:{required:!0},debugEnabled:{required:!1,type:Boolean,default:!1}},data(){return{administration:null,avenants:null,budget:null,core:null,credentials:null,currencies:[],documents:[],milestones:[],milestonesTypes:[],milestonesUrl:null,milestonesUrlNotifications:null,notes:null,notes_url:null,payments:[],paymentsUrl:null,persons:null,personsUrl:null,personsUrlNew:null,rolesOrganizations:null,rolesPersons:null,timesheets:null,timesheetsDeclarers:null,timesheetsValidators:null,timesheetsUrl:null,timesheetsUrlSynthesis:null,organizations:null,organizationsUrl:null,organizationsUrlNew:null,workpackages:null,workpackagesUrl:null,spents:null,activity:{},duplicateDatas:null,sticky:[],descriptionFull:!1,debug_content:null,debug_displayed:!1,error:null,loading:!0}},computed:{personsWP(){if(this.persons){let s={};return this.persons.forEach(e=>{s.hasOwnProperty(e.enrolled)||(s[e.enrolled]={id:e.enrolled,displayname:e.enrolledLabel,firstname:e.firstname,lastname:e.lastname})}),Object.values(s)}else return[]},storage(){return localStorage.getItem(F)},isSticky(){return this.sticky.find(s=>s.id==this.core.id)},labelReduced(){let s=this.core.label;return s.length>50?s.substr(0,50)+"...":s}},methods:{performLock(s){A.post(this.url,{action:s}).then(e=>{this.fetch()},e=>{let a=j.manageErrorResponse(e).message;O.commit("addError",a)})},handlerUnlock(){this.performLock("lock")},handlerLock(){this.performLock("unlock")},testError(s,e="Une erreur affichée"){O.commit("addError",e)},handlerHelp(s){O.dispatch("displayHelp",s)},handlerDebug(s){this.debug_content=s,this.debug_displayed=!0},handlerDebugHide(){this.debug_displayed=!1},handlerDebugShow(s){this.debug_content=JSON.parse(JSON.stringify(s)),this.debug_displayed=!0},handlerError(s){this.error=s.message},handlerUpdateWorkpackages(s){this.workpackages=s.entities},handlerUpdateNotes(s){this.notes=s.entities},handlerUpdatePayments(s){this.payments=s.entities,this.currencies=s.currencies,this.paymentsUrl=s.url},handlerUpdateMilestones(s){this.milestones=s},handlerUpdatePersons(s){this.persons=s.datas.items},handlerUpdateOrganizations(s){this.organizations=s.datas.items},handlerUpdateDocuments(s){console.log(s),this.documents=s},handlerUpdateAvenants(s){console.log("AVENANTS",s),this.avenants=s},handlerPurgeSticky(){this.sticky=[],localStorage.removeItem(F)},toogleSticky(){this.isSticky?this.handlerUnSticky():this.handlerSticky()},handlerUnSticky(){this.sticky.forEach((s,e)=>{s.id==this.core.id&&this.sticky.splice(e,1)}),localStorage.setItem(F,JSON.stringify(this.sticky))},handlerSticky(){this.sticky.push({id:this.core.id,label:this.core.label,num:this.core.numOscar,location:document.location.href}),localStorage.setItem(F,JSON.stringify(this.sticky))},handlerNavigateSticky(s){s.location&&(document.location=s.location)},test(){console.log(localStorage.getItem())},fetch(){this.loading=!0,A.get(this.url).then(s=>{this.budget=s.data.activity.datas.budget,this.core=s.data.activity.datas.core,s.data.activity.datas.spents&&(this.spents=s.data.activity.datas.spents),s.data.activity.datas.avenants&&this.handlerUpdateAvenants(s.data.activity.datas.avenants),s.data.activity.datas.administration&&(this.administration=s.data.activity.datas.administration),s.data.activity.datas.documents&&this.handlerUpdateDocuments(s.data.activity.datas.documents),s.data.activity.datas.notes&&(this.notes=s.data.activity.datas.notes.entities,this.notes_url=s.data.activity.datas.notes.url),s.data.activity.datas.milestones&&(this.milestones=s.data.activity.datas.milestones.entities,this.milestonesTypes=s.data.activity.datas.milestones.types,this.milestonesUrl=s.data.activity.datas.milestones.url,this.milestonesUrlNotifications=s.data.activity.datas.milestones.urlNotifications),s.data.activity.datas.organizations&&(this.organizations=s.data.activity.datas.organizations.entities,this.organizationsUrl=s.data.activity.datas.organizations.url,this.organizationsUrlNew=s.data.activity.datas.organizations.urlNew,this.rolesOrganizations=s.data.activity.datas.organizations.roles),s.data.activity.datas.payments&&this.handlerUpdatePayments(s.data.activity.datas.payments),s.data.activity.datas.persons&&(this.persons=s.data.activity.datas.persons.entities,this.personsUrlNew=s.data.activity.datas.persons.urlNew,this.personsUrl=s.data.activity.datas.persons.url,this.rolesPersons=s.data.activity.datas.persons.roles),s.data.activity.datas.timesheets?(this.timesheets=s.data.activity.datas.timesheets,this.timesheetsValidators=s.data.activity.datas.timesheets.validators,this.timesheetsDeclarers=s.data.activity.datas.timesheets.declarers,this.timesheetsUrl=s.data.activity.datas.timesheets.url,this.timesheetsUrlSynthesis=s.data.activity.datas.timesheets.urlSynthesis):console.log("pas de donnée FEUILLE DE TEMPS"),s.data.activity.datas.workpackages?(this.workpackages=s.data.activity.datas.workpackages.entities,this.workpackagesUrl=s.data.activity.datas.workpackages.url):console.log("pas de donnée LOTS DE TRAVAIL"),this.credentials=s.data.activity.credentials},s=>{this.handlerError(j.manageErrorResponse(s))}).finally(s=>{this.loading=!1})},handlerDuplicate(){this.duplicateDatas={displayed:!1,keepPersons:!0,keepOrganizations:!0,keepMilestones:!0,keepWorkpackages:!1,keepAdmData:!1}},handlerDuplicateDo(){document.location=this.core.urls.duplicate+"?"+(this.duplicateDatas.keepPersons?"&keeppersons=on":"")+(this.duplicateDatas.keepOrganizations?"&keeporganizations=on":"")+(this.duplicateDatas.keepMilestones?"&keepmilestones=on":"")+(this.duplicateDatas.keepWorkpackages?"&keepworkpackage=on":"")+(this.duplicateDatas.keepAdmData?"&keepadmdata=on":"")},handlerShowProject(){this.activity.project.url_show&&(document.location=this.activity.project.url_show)}},mounted(){this.fetch();let s=localStorage.getItem(F);s?s=JSON.parse(s):s=[],this.sticky=s}},Ll={class:"alert alert-danger"},Jl={key:0,class:"overlay"},Hl={class:"overlay-content"},Bl={class:"row",style:{width:"80%"}},Yl={class:"col-md-6 col-md-offset-3"},Gl={class:"col-md-6 col-md-offset-3"},Kl={class:"list-group-item separator-bottom"},Xl={class:"material-switch pull-right"},Ql={class:"list-group-item separator-bottom"},Zl={class:"material-switch pull-right"},$l={class:"list-group-item separator-bottom"},ei={class:"material-switch pull-right"},ti={class:"list-group-item separator-bottom"},si={class:"material-switch pull-right"},ni={class:"list-group-item separator-bottom"},li={class:"material-switch pull-right"},ii={class:"text-center"},oi={key:1},ri={class:"navbar navbar-default navbar-fixed-top",style:{top:"50px","z-index":"500"}},ai={class:"container"},di={class:"navbar-header"},ui={class:"navbar-brand",href:"#"},mi={class:"collapse navbar-collapse",id:"bs-example-navbar-collapse-1"},ci={class:"nav navbar-nav"},pi={key:0,href:"#members"},fi={key:0,href:"#partners"},vi={key:0,href:"#documents"},hi={key:0,href:"#milestones"},gi={key:0,href:"#notes"},yi={key:0,href:"#payments"},ki={key:0,href:"#spents"},bi={key:0,href:"#timesheets"},Di={class:"nav navbar-nav navbar-right"},_i={class:"dropdown"},wi={class:"dropdown-menu"},Ci={key:0},Pi={key:1},Ai=["onClick"],Ui={key:0,class:"icon-link-ext"},Si={class:"jumbotron activity-header oscar-header",style:{"margin-top":"60px"}},Mi={class:"row line-bottom"},Ei={class:"col-md-9"},Vi={class:"activity-project"},xi={key:0},Ni={key:1},ji=["href"],Oi={key:0},zi={key:1},Ri={class:"activity-type"},Fi={class:"type-chain"},Ii={class:"col-md-3"},Wi={key:0,class:"budget"},Ti={class:"text-private amount"},qi={class:"details"},Li={class:"text-private"},Ji={key:0,class:"text-private"},Hi={class:"text-private"},Bi={class:"text-private"},Yi={class:"text-private"},Gi={class:"row"},Ki={class:"col-md-4"},Xi={class:"texthighlight baseline"},Qi={class:"aggo"},Zi={class:"aggo"},$i={class:"aggo"},eo={class:"aggo"},to={class:"col-md-4"},so={class:"texthighlight baseline"},no={key:0,class:"text-private"},lo={key:1,class:"text-private"},io={class:"texthighlight baseline"},oo={class:"col-md-4"},ro={class:"texthighlight baseline"},ao={class:"row line-bottom"},uo={class:"col-md-4"},mo={class:"texthighlight baseline"},co={class:"cartouche xs"},po={class:"texthighlight baseline"},fo={class:"cartouche complementary",style:{"line-break":"anywhere"}},vo={class:"row"},ho={class:"col-md-12"},go={class:"admin-bar"},yo={key:1},ko={key:0,class:"btn btn-default disabled"},bo=["href"],Do=["href"],_o=["href"],wo={class:"container-fluid"},Co={class:"col-md-8"},Po={key:0,class:"section-infos",id:"members"},Ao={key:1,class:"section-infos",id:"partners"},Uo={key:2,class:"section-infos",id:"avenants"},So={key:3,class:"section-infos",id:"documents"},Mo={key:4,class:"section-infos",id:"notes"},Eo={key:5,id:"timesheets",class:"section-infos"},Vo={key:0,class:"alert alert-info"},xo={key:1},No={class:"oscar-section"},jo={class:"oscar-section-content"},Oo=["href"],zo=["href"],Ro={key:0},Fo={class:"oscar-section"},Io={class:"oscar-section-content"},Wo={key:0},To=["href"],qo={key:0},Lo={key:1,class:"alert-warning alert"},Jo={class:"oscar-section"},Ho={class:"oscar-section-title"},Bo=["href"],Yo={class:"row oscar-section-content"},Go={class:"col-md-4"},Ko={key:0,class:"alert alert-warning"},Xo={class:"cartouche primary person"},Qo={class:"col-md-4"},Zo={key:0,class:"alert alert-warning"},$o={class:"cartouche person primary"},er={class:"col-md-4"},tr={key:0,class:"alert alert-warning"},sr={class:"cartouche person primary"},nr={class:"oscar-section"},lr={class:"oscar-section-content"},ir={class:"col-md-4"},or={key:0,id:"milestones",class:"section-infos"},rr=["href"],ar={key:1,id:"payments",class:"section-infos"},dr={key:2,id:"spents",class:"section-infos"},ur={key:0,class:"alert alert-warning"},mr={key:1},cr={class:"buttons xs"},pr=["href"],fr=["href"],vr={class:"section-infos"},hr=["href"],gr={key:0,class:"container-fluid activity-fiche"},yr={class:"row"},kr={class:"col-md-12"},br={key:2};function Dr(s,e,a,k,n,o){const y=D("loader"),v=D("VueJsonPretty"),c=D("modal"),M=D("EntityWithRole"),q=D("activity-avenants"),L=D("activity-document"),I=D("activity-notes"),m=D("PersonDisplay"),f=D("workpackages-activity"),N=D("Milestones"),Q=D("Payments"),Z=D("ActivitySpentSynthesis"),$=D("ActivityLogs");return l(),i(b,null,[g(y,{text:"Chargement de l'activité",visible:n.loading},null,8,["visible"]),g(c,{title:"Debugger","title-icon":"icon-bug",visible:n.debug_displayed,onModalCancel:e[1]||(e[1]=p=>n.debug_displayed=!1)},{buttons:P(()=>[t("button",{class:"btn btn-default",onClick:e[0]||(e[0]=(...p)=>o.handlerDebugHide&&o.handlerDebugHide(...p))},"FERMER")]),default:P(()=>[g(v,{data:n.debug_content},null,8,["data"])]),_:1},8,["visible"]),g(c,{title:"Une erreur est survenue","title-icon":"icon-bug",visible:n.error!=null},{buttons:P(()=>[t("button",{class:"btn btn-default",onClick:e[2]||(e[2]=p=>n.error=null)},"FERMER")]),default:P(()=>[t("div",Ll,u(n.error),1)]),_:1},8,["visible"]),n.duplicateDatas!=null?(l(),i("div",Jl,[t("div",Hl,[e[36]||(e[36]=t("h1",{class:"overlay-title"},"Dupliquer cette activité",-1)),t("a",{class:"overlay-closer",onClick:e[3]||(e[3]=p=>n.duplicateDatas=null)},"x"),t("div",Bl,[t("h1",Yl,[e[21]||(e[21]=t("small",null,"Options de copie pour",-1)),e[22]||(e[22]=r()),e[23]||(e[23]=t("br",null,null,-1)),t("strong",null,u(n.core.label),1)]),t("div",Gl,[t("div",Kl,[e[25]||(e[25]=t("strong",null,[t("i",{class:"icon-group"}),r(" Reprendre les personnes ")],-1)),t("div",Xl,[w(t("input",{id:"keeppersons",name:"keeppersons",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=p=>n.duplicateDatas.keepPersons=p)},null,512),[[R,n.duplicateDatas.keepPersons]]),e[24]||(e[24]=t("label",{for:"keeppersons",class:"label-primary"},null,-1))])]),t("div",Ql,[e[27]||(e[27]=t("strong",null,[t("i",{class:"icon-calendar"}),r(" Reprendre les jalons ")],-1)),t("div",Zl,[w(t("input",{id:"keepmilestones",name:"keepmilestones",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=p=>n.duplicateDatas.keepMilestones=p)},null,512),[[R,n.duplicateDatas.keepMilestones]]),e[26]||(e[26]=t("label",{for:"keepmilestones",class:"label-primary"},null,-1))])]),t("div",$l,[e[29]||(e[29]=t("strong",null,[t("i",{class:"icon-building-filled"}),r(" Reprendre les organisations ")],-1)),t("div",ei,[w(t("input",{id:"keeporganizations",name:"keeporganizations",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=p=>n.duplicateDatas.keepOrganizations=p)},null,512),[[R,n.duplicateDatas.keepOrganizations]]),e[28]||(e[28]=t("label",{for:"keeporganizations",class:"label-primary"},null,-1))])]),t("div",ti,[e[31]||(e[31]=t("strong",null,[t("i",{class:"icon-archive"}),r(" Reprendre les lots de travail ")],-1)),t("div",si,[w(t("input",{id:"keepworkpackages",name:"keepworkpackages",type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=p=>n.duplicateDatas.keepWorkpackages=p)},null,512),[[R,n.duplicateDatas.keepWorkpackages]]),e[30]||(e[30]=t("label",{for:"keepworkpackages",class:"label-primary"},null,-1))])]),t("div",ni,[e[33]||(e[33]=t("strong",null,[t("i",{class:"icon-archive"}),r(" Reprendre les données de base ")],-1)),e[34]||(e[34]=t("br",null,null,-1)),e[35]||(e[35]=t("small",null,"Données du formulaire de créaton : Dates de début / fin, intitulé, description, type, etc...",-1)),t("div",li,[w(t("input",{id:"keepadmdata",name:"keepadmdata",type:"checkbox","onUpdate:modelValue":e[8]||(e[8]=p=>n.duplicateDatas.keepAdmData=p)},null,512),[[R,n.duplicateDatas.keepAdmData]]),e[32]||(e[32]=t("label",{for:"keepadmdata",class:"label-primary"},null,-1))])]),t("nav",ii,[t("a",{href:"#",class:"btn btn-primary",onClick:e[9]||(e[9]=p=>n.duplicateDatas=null)},"Annuler"),t("a",{href:"#",class:"btn btn-default",onClick:e[10]||(e[10]=(...p)=>o.handlerDuplicateDo&&o.handlerDuplicateDo(...p))},"Dupliquer l'activité")])])])])])):d("",!0),n.core&&n.credentials&&n.credentials.read?(l(),i("div",oi,[t("nav",ri,[t("div",ai,[t("div",di,[e[38]||(e[38]=ne('',1)),t("a",ui,[e[37]||(e[37]=t("i",{class:"icon-cube"},null,-1)),t("strong",null,u(n.core.numOscar),1),t("span",null," / "+u(o.labelReduced),1),t("i",{class:"icon-pin",style:le({opacity:o.isSticky?1:.3}),onClick:e[11]||(e[11]=(...p)=>o.toogleSticky&&o.toogleSticky(...p))},null,4)])]),t("div",mi,[t("ul",ci,[t("li",null,[n.credentials.persons.read?(l(),i("a",pi,"Membres")):d("",!0)]),t("li",null,[n.credentials.organizations.read?(l(),i("a",fi,"Partenaires")):d("",!0)]),t("li",null,[n.credentials.documents.read?(l(),i("a",vi,"Documents")):d("",!0)]),t("li",null,[n.credentials.milestones.read?(l(),i("a",hi,"Jalons")):d("",!0)]),t("li",null,[n.credentials.notes.read?(l(),i("a",gi,"Notes")):d("",!0)]),t("li",null,[n.credentials.budget.read?(l(),i("a",yi,"Versements")):d("",!0)]),t("li",null,[n.credentials.spents.read?(l(),i("a",ki,"Dépenses")):d("",!0)]),t("li",null,[n.credentials.timesheets.read?(l(),i("a",bi,"Feuilles de temps")):d("",!0)])]),t("ul",Di,[t("li",_i,[e[44]||(e[44]=t("a",{href:"#",class:"dropdown-toggle","data-toggle":"dropdown",role:"button","aria-haspopup":"true","aria-expanded":"false"},[t("i",{class:"icon-pin text-primary"}),t("span",{class:"caret"})],-1)),t("ul",wi,[o.isSticky?(l(),i("li",Ci,[t("a",{href:"#",onClick:e[12]||(e[12]=(...p)=>o.handlerUnSticky&&o.handlerUnSticky(...p))},"Désépingler")])):(l(),i("li",Pi,[t("a",{href:"#",onClick:e[13]||(e[13]=h((...p)=>o.handlerSticky&&o.handlerSticky(...p),["prevent"]))},e[39]||(e[39]=[t("i",{class:"icon-pin-outline"},null,-1),r(" Epingler")]))])),e[42]||(e[42]=t("li",{role:"separator",class:"divider"},null,-1)),(l(!0),i(b,null,_(n.sticky,p=>(l(),i("li",{class:C(p.id==n.core.id?"disabled":"")},[t("a",{href:"#",onClick:Y=>o.handlerNavigateSticky(p)},[e[40]||(e[40]=t("i",{class:"icon-cube"},null,-1)),t("strong",null,u(p.num),1),t("em",null,u(p.label),1),p.id!=n.core.id?(l(),i("i",Ui)):d("",!0)],8,Ai)],2))),256)),e[43]||(e[43]=t("li",{role:"separator",class:"divider"},null,-1)),t("li",null,[t("a",{href:"#",onClick:e[14]||(e[14]=h((...p)=>o.handlerPurgeSticky&&o.handlerPurgeSticky(...p),["prevent"]))},e[41]||(e[41]=[t("i",{class:"icon-trash"},null,-1),r(" Supprimer les épingles ")]))])])])])])])]),t("header",Si,[t("div",Mi,[t("div",Ei,[t("h4",Vi,[e[45]||(e[45]=t("i",{class:"icon-cubes"},null,-1)),e[46]||(e[46]=r(" ")),n.core.project===null?(l(),i("em",xi,"Aucun Projet")):(l(),i("span",Ni,[n.credentials.project.read?(l(),i("a",{key:0,href:n.core.project.url_show},[n.core.project.acronym?(l(),i("strong",Oi,u(n.core.project.acronym)+" ",1)):d("",!0),t("em",null,u(n.core.project.label),1)],8,ji)):(l(),i("span",zi,[t("strong",null,u(n.core.project.acronym),1),t("em",null,u(n.core.project.label),1)]))]))]),t("h3",null,[t("span",{class:C(["picto status-","status-"+n.core.status])},[t("i",{class:C(["icon","icon-"+n.core.status])},null,2),r(" "+u(n.core.status_label),1)],2),t("span",Ri,[e[47]||(e[47]=t("i",{class:"icon-tag"},null,-1)),t("span",Fi,[t("i",{class:C(n.core.type_slug)},null,2),(l(!0),i(b,null,_(n.core.type_chain,p=>(l(),i("span",null,u(p.label),1))),256))])])]),t("h1",null,[t("span",null,[e[48]||(e[48]=t("i",{class:"icon-cube"},null,-1)),r(" "+u(n.core.label),1)])])]),t("div",Ii,[n.budget&&n.credentials.budget.read?(l(),i("div",Wi,[e[54]||(e[54]=t("em",null,"Montant",-1)),t("strong",Ti,u(s.$filters.money(n.budget.montant))+" "+u(n.budget.currency.symbol),1),t("div",qi,[t("small",null,[e[49]||(e[49]=r(" Frais de gestion : ")),t("b",Li,u(n.budget.fraisDeGestion),1)]),t("small",null,[e[50]||(e[50]=r(" Part unité : ")),n.budget.fraisDeGestionPartUnite?(l(),i("b",Ji,u(n.budget.fraisDeGestionPartUnite),1)):d("",!0)]),t("small",null,[e[51]||(e[51]=r(" Part hébergeur : ")),t("b",Hi,u(n.budget.fraisDeGestionPartHebergeur),1)]),t("small",null,[e[52]||(e[52]=r(" Part Gestionnaire : ")),t("b",Bi,u(n.budget.fraisDeGestionPartGestionnaire),1)]),t("small",null,[e[53]||(e[53]=r(" TVA : ")),t("b",Yi,u(n.budget.tva),1)])])])):d("",!0)])]),n.core.description?(l(),i("p",{key:0,class:C(["baseline",{descriptionPacked:!n.descriptionFull}]),onClick:e[15]||(e[15]=p=>n.descriptionFull=!n.descriptionFull)},[t("small",null,u(n.core.description),1)],2)):d("",!0),t("div",Gi,[t("div",Ki,[e[62]||(e[62]=t("h4",null,[t("i",{class:"icon-calendar"}),r("Dates")],-1)),t("p",Xi,[e[55]||(e[55]=r(" Début : ")),t("time",null,u(s.$filters.date(n.core.dateStart)),1),t("small",Qi," ("+u(s.$filters.timeAgo(n.core.dateStart))+")",1),e[56]||(e[56]=t("br",null,null,-1)),e[57]||(e[57]=r(" Fin : ")),t("time",null,u(s.$filters.dateFull(n.core.dateEnd)),1),t("small",Zi," ("+u(s.$filters.timeAgo(n.core.dateEnd))+")",1),e[58]||(e[58]=t("br",null,null,-1)),e[59]||(e[59]=r(" Signé le : ")),t("time",null,u(s.$filters.dateFull(n.core.dateSigned)),1),t("small",$i," ("+u(s.$filters.timeAgo(n.core.dateSigned))+")",1),e[60]||(e[60]=t("br",null,null,-1)),e[61]||(e[61]=r(" Date de début des négociations : ")),t("time",null,u(s.$filters.dateFull(n.core.dateNegociation)),1),t("small",eo," ("+u(s.$filters.timeAgo(n.core.dateNegociation))+")",1)])]),t("div",to,[e[68]||(e[68]=t("h4",null,[t("i",{class:"icon-briefcase"}),r("Numérotations")],-1)),t("p",so,[e[63]||(e[63]=r(' N° Oscar" : ')),t("strong",null,u(n.core.numOscar),1),e[64]||(e[64]=t("br",null,null,-1)),e[65]||(e[65]=r(" Numéro financier : ")),n.core.pfi?(l(),i("strong",no,u(n.core.pfi),1)):(l(),i("strong",lo,"AUCUN")),e[66]||(e[66]=r(" - Ouverture du PFI le ")),t("time",null,u(s.$filters.dateFull(n.core.dateOpened)),1),e[67]||(e[67]=t("br",null,null,-1))]),(l(!0),i(b,null,_(n.core.numeros,(p,Y)=>(l(),i("p",io,[r(u(Y)+" : ",1),t("strong",null,u(p),1)]))),256))]),t("div",oo,[e[72]||(e[72]=t("h4",null,[t("i",{class:"icon-database-1"}),r("Divers")],-1)),t("p",ro,[e[69]||(e[69]=r(" Création ")),t("time",null,u(s.$filters.dateFull(n.core.dateCreated)),1),e[70]||(e[70]=t("br",null,null,-1)),e[71]||(e[71]=r(" Dernière MAJ ")),t("time",null,u(s.$filters.dateFull(n.core.dateUpdated)),1)])])]),t("div",ao,[t("div",uo,[e[76]||(e[76]=t("h4",null,[t("i",{class:"icon-tags"}),r("Métas-données")],-1)),t("p",mo,[e[73]||(e[73]=r(" Disciplines : ")),(l(!0),i(b,null,_(n.core.disciplines,p=>(l(),i("span",co,u(p),1))),256))]),t("p",po,[e[75]||(e[75]=r(" Mots clés : ")),(l(!0),i(b,null,_(n.core.motscles,p=>(l(),i("span",fo,[e[74]||(e[74]=t("i",{class:"icon-tag"},null,-1)),r(" "+u(p),1)]))),256))])])]),t("div",vo,[t("div",ho,[t("nav",go,[n.credentials.lock_edit?(l(),i(b,{key:0},[n.credentials.lock?(l(),i("a",{key:0,class:"btn btn-info",onClick:e[16]||(e[16]=p=>o.handlerLock())},e[77]||(e[77]=[t("i",{class:"icon-lock-open"},null,-1),r(" Déverrouiller")]))):(l(),i("a",{key:1,class:"btn btn-info",onClick:e[17]||(e[17]=p=>o.handlerUnlock())},e[78]||(e[78]=[t("i",{class:"icon-lock"},null,-1),r(" Vérrouiller")])))],64)):n.credentials.lock?(l(),i("span",yo,[n.credentials.lock?(l(),i("strong",ko,e[79]||(e[79]=[t("i",{class:"icon-lock"},null,-1),r(" VERROUILLEE ")]))):d("",!0)])):d("",!0),n.credentials.core.edit?(l(),i("a",{key:2,class:"btn btn-primary",href:n.core.urls.edit},e[80]||(e[80]=[t("i",{class:"icon-pencil"},null,-1),r(" Modifier les informations")]),8,bo)):d("",!0),n.credentials.core.change_project?(l(),i("a",{key:3,class:"btn btn-default",href:n.core.urls.change_project},e[81]||(e[81]=[t("i",{class:"icon-cubes"},null,-1),r(" Modifier le projet")]),8,Do)):d("",!0),n.credentials.core.new_project?(l(),i("a",{key:4,class:"btn btn-default",href:n.core.urls.new_project},e[82]||(e[82]=[t("i",{class:"icon-cubes"},null,-1),r(" Créer un nouveau projet")]),8,_o)):d("",!0),n.core.urls.duplicate?(l(),i("a",{key:5,class:"btn btn-default",onClick:e[18]||(e[18]=(...p)=>o.handlerDuplicate&&o.handlerDuplicate(...p))},e[83]||(e[83]=[t("i",{class:"icon-paste"},null,-1),r(" Dupliquer")]))):d("",!0),a.debugEnabled?(l(),i("a",{key:6,class:"btn btn-warning",onClick:e[19]||(e[19]=p=>o.handlerDebugShow(s.$data))},e[84]||(e[84]=[t("i",{class:"icon-bug"},null,-1),r(" Afficher le modèle")]))):d("",!0),a.debugEnabled?(l(),i("a",{key:7,class:"btn btn-warning",onClick:e[20]||(e[20]=(...p)=>o.fetch&&o.fetch(...p))},e[85]||(e[85]=[t("i",{class:"icon-bug"},null,-1),r(" Recharger le modèle")]))):d("",!0)])])])]),t("div",wo,[t("div",Co,[n.credentials.persons.read?(l(),i("section",Po,[e[86]||(e[86]=t("h2",null,[t("span",null,[t("i",{class:"icon-group"}),r("Membres")])],-1)),g(M,{title:"Personne",standalone:!1,"entity-link-show":n.credentials.persons.show,manage:n.credentials.persons.edit,roles:n.rolesPersons,items:n.persons,"url-new":n.personsUrlNew,url:n.personsUrl,"debug-enabled":a.debugEnabled,onUpdate:o.handlerUpdatePersons},null,8,["entity-link-show","manage","roles","items","url-new","url","debug-enabled","onUpdate"])])):d("",!0),n.credentials.organizations.read?(l(),i("section",Ao,[e[87]||(e[87]=t("h2",null,[t("span",null,[t("i",{class:"icon-building-filled"}),r("Partenaires")])],-1)),g(M,{title:"Organisation",standalone:!1,"debug-enabled":a.debugEnabled,"entity-link-show":n.credentials.organizations.show,manage:n.credentials.organizations.edit,roles:n.rolesOrganizations,items:n.organizations,url:n.organizationsUrl,"url-new":n.organizationsUrlNew,onUpdate:o.handlerUpdateOrganizations},null,8,["debug-enabled","entity-link-show","manage","roles","items","url","url-new","onUpdate"])])):d("",!0),n.credentials.avenants.read?(l(),i("section",Uo,[e[88]||(e[88]=t("h2",null,[t("span",null,[t("i",{class:"icon-hammer"}),r(" Avenants ")])],-1)),g(q,{avenants:n.avenants,"roles-person":n.rolesPersons,"roles-organization":n.rolesOrganizations,"current-persons":n.persons,"current-organizations":n.organizations,manage:n.credentials.avenants.edit,onUpdate:o.handlerUpdateAvenants},null,8,["avenants","roles-person","roles-organization","current-persons","current-organizations","manage","onUpdate"])])):d("",!0),n.credentials.documents.read?(l(),i("section",So,[e[89]||(e[89]=t("h2",null,[t("span",null,[t("i",{class:"icon-book"}),r("Documents")])],-1)),g(L,{onDebug:o.handlerDebug,onUpdated:o.handlerUpdateDocuments,"debug-enabled":a.debugEnabled,standalone:!0,"sa-tabs":n.documents.tabs,"sa-types":n.documents.typesDocuments,"sa-generated-documents":n.documents.generatedDocuments,"sa-computed-documents":n.documents.computedDocuments,"sa-process-datas":n.documents.processDatas,"sa-credentials":n.credentials.documents,url:n.documents.url,"url-upload-new-doc":n.documents.url_upload_new_doc,"url-sign-document":n.documents.url_sign_document},null,8,["onDebug","onUpdated","debug-enabled","sa-tabs","sa-types","sa-generated-documents","sa-computed-documents","sa-process-datas","sa-credentials","url","url-upload-new-doc","url-sign-document"])])):d("",!0),n.credentials.notes.read?(l(),i("section",Mo,[e[90]||(e[90]=t("h2",null,[t("span",null,[t("i",{class:"icon-comment"}),r("Notes")])],-1)),g(I,{url:n.notes_url,showallowed:n.credentials.notes.read,manageuserallowed:n.credentials.notes.edit,manageadminallowed:n.credentials.notes.manage,items:n.notes,onUpdate:o.handlerUpdateNotes},null,8,["url","showallowed","manageuserallowed","manageadminallowed","items","onUpdate"])])):d("",!0),n.credentials.timesheets.read?(l(),i("section",Eo,[e[103]||(e[103]=t("h2",{class:"section-title"},[t("span",null,[t("i",{class:"icon-book"}),r("Feuille de temps")])],-1)),n.timesheets.enabled?(l(),i("div",xo,[t("section",No,[e[94]||(e[94]=t("h3",{class:"oscar-section-title"},[t("span",null,[t("i",{class:"icon-calendar"}),r("Général")])],-1)),t("div",jo,[t("a",{href:n.timesheets.url,class:"btn btn-primary"},e[92]||(e[92]=[t("i",{class:"icon-calendar"},null,-1),r(" Informations générales et lots de travails ")]),8,Oo),t("a",{href:n.timesheets.urlSynthesis,class:"btn btn-default"},e[93]||(e[93]=[t("i",{class:"icon-book"},null,-1),r(" Résumé et documents ")]),8,zo)])]),n.workpackages?(l(),i("section",Ro,[t("div",Fo,[e[96]||(e[96]=t("h3",{class:"oscar-section-title"},[t("span",null,[t("i",{class:"icon-group"}),r("Déclarants")])],-1)),t("div",Io,[n.timesheets.declarers.length?(l(),i("div",Wo,[(l(!0),i(b,null,_(n.timesheetsDeclarers,p=>(l(),i("a",{href:p.url_details,class:C(["btn",p.hasDeclaration?"btn-primary":"btn-default"])},[g(m,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"]),p.hasDeclaration==!1?(l(),i("small",qo," (Aucune déclaration) ")):d("",!0)],10,To))),256))])):(l(),i("div",Lo,e[95]||(e[95]=[r(" Pour ajouter des déclarants, créez des "),t("strong",null,"Lots de travail",-1),r(" puis identifier les déclarants parmis les membres ")])))])]),t("div",Jo,[t("h3",Ho,[e[98]||(e[98]=t("span",{class:"text"},[t("i",{class:"icon-user-md"}),r(" Valideurs ")],-1)),t("nav",null,[t("a",{href:n.timesheets.url+"#validators",class:"btn btn-primary btn-xs"},e[97]||(e[97]=[t("i",{class:"icon-user-md"},null,-1),r(" Désigner des validateurs ")]),8,Bo)])]),t("div",Yo,[t("div",Go,[e[99]||(e[99]=t("h4",null,[t("i",{class:"icon-cube"}),r("Validation projet")],-1)),n.timesheets.validators.prj.length===0?(l(),i("div",Ko," Aucun validateur pour cette étape ")):d("",!0),t("div",null,[(l(!0),i(b,null,_(n.timesheetsValidators.prj,p=>(l(),i("span",Xo,[g(m,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))])]),t("div",Qo,[e[100]||(e[100]=t("h4",null,[t("i",{class:"icon-beaker"}),r("Validation scientifique")],-1)),n.timesheets.validators.sci.length===0?(l(),i("div",Zo," Aucun validateur pour cette étape ")):d("",!0),(l(!0),i(b,null,_(n.timesheetsValidators.sci,p=>(l(),i("span",$o,[g(m,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))]),t("div",er,[e[101]||(e[101]=t("h4",null,[t("i",{class:"icon-book"}),r("Validation administrative")],-1)),n.timesheets.validators.adm.length===0?(l(),i("div",tr," Aucun validateur pour cette étape ")):d("",!0),(l(!0),i(b,null,_(n.timesheetsValidators.adm,p=>(l(),i("span",sr,[g(m,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))])])]),t("div",nr,[e[102]||(e[102]=t("h3",{class:"oscar-section-title"},[t("span",null,[t("i",{class:"icon-archive"}),r("Lots de travail")])],-1)),r(" "+u(s.personWP)+" ",1),t("div",lr,[g(f,{"debug-enabled":a.debugEnabled,"allow-tooltip":n.credentials.persons.show,editable:n.credentials.workpackages.edit,workpackages:n.workpackages,url:n.workpackagesUrl,persons:o.personsWP,onUpdate:o.handlerUpdateWorkpackages},null,8,["debug-enabled","allow-tooltip","editable","workpackages","url","persons","onUpdate"])])])])):d("",!0)])):(l(),i("div",Vo,[e[91]||(e[91]=r(" Feuilles de temps non-disponible pour cette activité : ")),t("strong",null,u(n.timesheets.informations),1)]))])):d("",!0)]),t("aside",ir,[n.credentials.milestones.read?(l(),i("section",or,[e[105]||(e[105]=t("span",null,[t("h2",null,[t("i",{class:"icon-calendar"}),r("Jalons")])],-1)),g(N,{url:n.milestonesUrl,manage:n.credentials.milestones.edit,progression:n.credentials.milestones.progression,payments:n.payments,items:n.milestones,types:n.milestonesTypes,onUpdate:o.handlerUpdateMilestones},null,8,["url","manage","progression","payments","items","types","onUpdate"]),n.milestonesUrlNotifications?(l(),i("a",{key:0,href:n.milestonesUrlNotifications,class:"btn btn-primary"},e[104]||(e[104]=[t("i",{class:"icon-bell"},null,-1),r(" Voir les notifications planifiées ")]),8,rr)):d("",!0)])):d("",!0),n.credentials.payments.read?(l(),i("section",ar,[e[106]||(e[106]=t("h2",null,[t("span",null,[t("i",{class:"icon-bank"}),r("Versements")])],-1)),g(Q,{url:n.paymentsUrl,manage:n.credentials.payments.edit,amount:n.budget.amount,payments:n.payments,currencies:n.currencies,onDebug:o.handlerDebugShow,onUpdate:o.handlerUpdatePayments},null,8,["url","manage","amount","payments","currencies","onDebug","onUpdate"])])):d("",!0),n.credentials.spents.read?(l(),i("section",dr,[e[109]||(e[109]=t("h2",null,[t("span",null,[t("i",{class:"icon-bank"}),r("Dépenses")])],-1)),n.spents.enabled?(l(),i("div",mr,[g(Z,{standalone:!1,datas:n.spents},null,8,["datas"]),t("nav",cr,[n.credentials.spents.details?(l(),i("a",{key:0,href:n.spents.url_details,class:"btn btn-primary btn"},e[107]||(e[107]=[t("i",{class:"icon-file-excel"},null,-1),r(" Détails des dépenses")]),8,pr)):d("",!0),n.credentials.spents.previsionnel?(l(),i("a",{key:1,href:s.spentsUrlPrevisionnel,class:"btn btn-primary btn"},e[108]||(e[108]=[t("i",{class:"icon-file-excel"},null,-1),r(" Dépenses prévisionnelles (beta)")]),8,fr)):d("",!0)])])):(l(),i("div",ur," Dépenses indisponibles : "+u(n.spents.enabled_reason),1))])):d("",!0),t("section",vr,[e[110]||(e[110]=t("h2",null,"PCRU",-1)),t("a",{href:n.core.urls.pcru,class:"btn btn-primary btn-xs"}," Accès aux informations PCRU ",8,hr)])])]),n.credentials.administration.read?(l(),i("div",gr,[t("div",yr,[t("div",kr,[e[111]||(e[111]=t("h2",null,[t("span",null,[t("i",{class:"icon-cog"}),r("Technique")])],-1)),g($,{url:n.administration.url_logs},null,8,["url"])])])])):d("",!0)])):(l(),i("div",br," Données inaccessibles "))],64)}const _r=S(ql,[["render",Dr],["__scopeId","data-v-8de60033"]]);let B=document.querySelector("#activity");const X=ie(_r,{url:B.dataset.url,"debug-enabled":B.dataset.debugEnabled,manage:B.dataset.manage});X.config.globalProperties.$filters={timeAgo(s){return H.timeAgo(s)},date(s){return H.date(s)},dateFull(s){return H.dateFull(s)},filesize(s){return oe.filesize(s)},money(s){return re.money(s)},log(s){return he.log(s)}};X.mount("#activity");
diff --git a/public/js/oscar/vite/dist/assets/activity-d961ddb0.js b/public/js/oscar/vite/dist/assets/activity-d961ddb0.js
new file mode 100644
index 000000000..8516a72de
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/activity-d961ddb0.js
@@ -0,0 +1 @@
+import{r as D,o as l,c as o,a,t as c,b as g,w as C,v as x,d as e,e as X,f as W,g as d,h as v,n as P,F as b,p as T,i as q,j as A,k as w,l as j,m as I,q as N,s as S,T as M,u as re,x as de,S as ce,y as ue,z as he,A as me}from"../vendor.js";import{m as Q}from"../vendor2.js";import{f as pe}from"../vendor3.js";import{m as _e}from"../vendor4.js";import{M as se}from"../vendor5.js";import{D as Y,P as fe}from"../vendor6.js";import{_ as E}from"../vendor7.js";import{A as B}from"../vendor8.js";import{O as ve}from"../vendor9.js";import{A as ge}from"../vendor10.js";import{A as ye}from"../vendor11.js";import{A as ke}from"../vendor12.js";import{A as be}from"../vendor13.js";import{A as z}from"../vendor14.js";import{E as De}from"../vendor15.js";import{g as R}from"../vendor16.js";import{L as we}from"../vendor17.js";import{P as ne}from"../vendor18.js";import{t as Ce}from"../vendor19.js";import"../vendor20.js";const Pe={name:"AvenantDate",emits:["update:change"],props:["change"],computed:{date:{get(){return this.change.value},set(t){this.change.value=t,this.$emit("update:change",change)}}},components:{Datepicker:Y}};function Ae(t,s,r,k,n,i){const y=D("Datepicker");return l(),o("div",null,[a(c(r.change.label)+" : ",1),g(y,{modelValue:i.date,"onUpdate:modelValue":s[0]||(s[0]=f=>i.date=f)},null,8,["modelValue"])])}const Ue=E(Pe,[["render",Ae]]),Se={props:{modelValue:Number},data(){return{isEditing:!1,rawValue:"",formattedValue:""}},computed:{displayValue:{get(){return this.isEditing?this.rawValue:this.formattedValue},set(t){this.rawValue=t}}},watch:{modelValue:{immediate:!0,handler(t){this.isEditing||(this.formattedValue=this.formatCurrency(t),this.rawValue=(t??"").toString().replace(".",","))}}},methods:{formatCurrency(t){return new Intl.NumberFormat("fr-FR",{style:"currency",currency:"EUR",minimumFractionDigits:2}).format(t)},startEditing(){this.isEditing=!0,this.rawValue=(this.modelValue??"").toString().replace(".",",")},finishEditing(){this.isEditing=!1;let t=parseFloat(this.rawValue.replace(",","."))||0;this.$emit("update:modelValue",t)},updateRawValue(t){this.rawValue=t.target.value}}};function Me(t,s,r,k,n,i){return C((l(),o("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=y=>i.displayValue=y),onFocus:s[1]||(s[1]=(...y)=>i.startEditing&&i.startEditing(...y)),onBlur:s[2]||(s[2]=(...y)=>i.finishEditing&&i.finishEditing(...y)),onInput:s[3]||(s[3]=(...y)=>i.updateRawValue&&i.updateRawValue(...y)),class:"form-control text-right"},null,544)),[[x,i.displayValue]])}const Ee=E(Se,[["render",Me]]);const Ve={name:"ButtonConfirm",props:{class:{type:String,default:"btn btn-default"},checkbox:{type:Boolean,default:!1}},data(){return{modal:!1,checked:!1}},computed:{confirmEnabled(){return this.checkbox&&this.checked||this.checkbox===!1}},watch:{modal(t){this.checked=!1}},methods:{handlerClick(){this.$emit("click")},handlerCancel(){this.modal=!1,this.$emit("cancel")},handlerConfirm(){this.confirmEnabled&&(this.modal=!1,this.$emit("confirm"))}},activated(){console.log("ButtonConfirm activated")}},$=t=>(T("data-v-efd4eea6"),t=t(),q(),t),xe={key:0,class:"overlay confirm-dialog"},Ne={class:"overlay-content"},je=$(()=>e("i",{class:"icon-attention-1"},null,-1)),Oe={class:"overlay-message"},ze={key:0},Re={for:"confirm_ok",class:"checkbox"},Ie=$(()=>e("i",{class:"icon-block"},null,-1)),Fe=$(()=>e("i",{class:"icon-ok-circled"},null,-1));function We(t,s,r,k,n,i){return l(),o(b,null,[n.modal?(l(),o("div",xe,[e("div",Ne,[e("h3",null,[je,X(t.$slots,"title",{},()=>[a(" Confirmer ? ")],!0)]),e("div",Oe,[X(t.$slots,"message",{},()=>[a(" Voulez-vous continuer ? ")],!0)]),r.checkbox?(l(),o("div",ze,[e("label",Re,[C(e("input",{type:"checkbox",id:"confirm_ok","onUpdate:modelValue":s[0]||(s[0]=y=>n.checked=y)},null,512),[[W,n.checked]]),a(" J'ai bien compris ")])])):d("",!0),e("nav",null,[e("a",{href:"#",onClick:s[1]||(s[1]=v((...y)=>i.handlerCancel&&i.handlerCancel(...y),["prevent"])),class:"btn btn-danger"},[Ie,a(" Annuler ")]),e("a",{href:"#",onClick:s[2]||(s[2]=v((...y)=>i.handlerConfirm&&i.handlerConfirm(...y),["prevent"])),class:P(["btn btn-success",{disabled:!i.confirmEnabled}])},[Fe,a(" Confirmer")],2)])])])):d("",!0),e("a",{href:"#",class:P(r.class),onClick:s[3]||(s[3]=v(y=>n.modal=!0,["prevent"]))},[X(t.$slots,"default",{},()=>[a("Texte par défaut")],!0)],2)],64)}const Te=E(Ve,[["render",We],["__scopeId","data-v-efd4eea6"]]);const qe={name:"ActivityAvenants",components:{ButtonConfirm:Te,Amount:Ee,AvenantDate:Ue,Datepicker:Y,Modal:se,OrganizationAutoComplete:ve,PersonAutoCompleter:fe},props:["roles-person","roles-organization","currentPersons","currentOrganizations","avenants","manage"],data(){return{edit:null,selectedPerson:null}},computed:{modificationsEnabled(){return{personAdd:!0,personDel:!0,organizationAdd:!0,organizationDel:!0,changeAmount:!this.edit.modifications.find(t=>t.type=="changeAmount"),dateEnd:!this.edit.modifications.find(t=>t.type=="dateEnd")}},persons(){let t={};return this.currentPersons&&this.currentPersons.forEach(s=>{t.hasOwnProperty(s.enrolled)||(t[s.enrolled]={id:s.enrolled,firstName:s.firstName,lastName:s.lastName,roles:{}}),t[s.enrolled].hasOwnProperty(s.roleId)||(t[s.enrolled].roles[s.roleId]=s.roleLabel)}),t},organizations(){let t={};return this.currentOrganizations&&this.currentOrganizations.forEach(s=>{t.hasOwnProperty(s.enrolled)||(console.log(s),t[s.enrolled]={id:s.enrolled,label:s.enrolledLabel,roles:{}}),t[s.enrolled].hasOwnProperty(s.roleId)||(t[s.enrolled].roles[s.roleId]=s.roleLabel)}),t}},methods:{handlerConfirm(t,s,r){console.log("confirm",t),s.call(this,r)},handlerOk(t){console.log(JSON.stringify(t)),console.log(this.avenants.url_api)},handlerNew(){this.edit={id:null,dateAvenant:null,comment:"",previousFile:null,file:null,modifications:[]}},handlerEdit(t){this.edit={id:t.id,dateAvenant:t.date,comment:t.comment,previousFile:t.filename,file:null,modifications:JSON.parse(JSON.stringify(t.modifications))}},handlerCancel(){console.log("CANCEL"),this.edit=null},handlerSave(){let t=new FormData;t.append("id",this.edit.id??""),t.append("dateAvenant",this.edit.dateAvenant??""),t.append("comment",this.edit.comment??""),t.append("file",this.edit.file??""),t.append("modifications",this.edit.modifications?JSON.stringify(this.edit.modifications):"");let s="Mise à jour de l'avenant";this.edit.id?t.append("action","update"):(t.append("action","create"),s="Création de l'avenant"),B.post(this.avenants.url_api,t,{pendingMsg:s}).then(r=>{this.edit=null,this.fetch()})},handlerDelete(t){B.delete(t.url_api,{pendingMsg:"Suppression de l'avenant"}).then(s=>{this.fetch()})},handlerApplyAvenant(t){console.log("Application de l'avenant");let s=new FormData;s.append("id",t.id),s.append("action","apply");let r="Application de l'avenant";B.post(this.avenants.url_api,s,{pendingMsg:r,pendingBack:!1}).then(k=>{document.location.reload()})},handlerAddChange(t){if(this.edit)switch(t){case"dateEnd":this.edit.modifications.push({type:t,mode:"new",label:"Date de fin",value1:new Date().toISOString()});break;default:this.edit.modifications.push({type:t,mode:"new",label:"A définir",value1:null,valueObj:null,value2:null})}},handlerRemoveChange(t){let s=this.edit.modifications.indexOf(t);s>=0&&this.edit.modifications.splice(s,1)},handlerUpdatePersonChange(t,s){t.valueObj={id:s.id,firstName:s.firstName,lastName:s.lastName},t.value1=s.id},handlerUpdateOrganizationChange(t,s){console.log(JSON.stringify(t)),t.valueObj={id:s.id,label:s.label},t.value1=s.id},handlerSelectToDel(t,s){console.log("Changement de la personne à supprimer",t,s),t.value1=t.valueObj.id,t.value2=null},async handlerSelectFile(t){if(t.target.files.length===0){this.edit.file=null;return}this.edit.file=t.target.files[0]},fetch(){B.get(this.avenants.url_api,{pendingMsg:"Chargement des avenants"}).then(t=>{this.$emit("update",t.data.datas.avenants)})}},mounted(){console.log("mounted")}},U=t=>(T("data-v-833d8759"),t=t(),q(),t),Le={action:""},Je=U(()=>e("div",{class:"alert alert-info"},[a(" Vous pourrez revenir modifier cet avenant plus tard tant qu'il est en mode "),e("strong",null,"brouillon"),a(". ")],-1)),He={class:"form-group"},Be=U(()=>e("label",{for:"dateAvenant"},"Date : ",-1)),Ye=U(()=>e("div",{class:"help"},[a(" Date de "),e("strong",null,"signature"),a(" de l'avenant ")],-1)),Ge={class:"form-group"},Ke=U(()=>e("label",{for:"name",class:""},"Modifications : ",-1)),Xe=U(()=>e("br",null,null,-1)),Qe={class:"btn-group"},Ze=U(()=>e("button",{type:"button",class:"btn btn-default dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[a(" Ajouter une modification "),e("span",{class:"caret"})],-1)),$e={class:"dropdown-menu"},et={class:"modifications unsaved"},tt={class:"change"},st={key:0},nt=U(()=>e("span",{class:"text"}," Date de fin : ",-1)),lt={key:1},ot=U(()=>e("span",{class:"text"},"Nouveau montant : ",-1)),it={key:2},at=U(()=>e("span",{class:"text"},"Suppression d'un membre",-1)),rt=["onUpdate:modelValue","onChange"],dt=["value"],ct=["onUpdate:modelValue"],ut=["value"],ht={key:3},mt=U(()=>e("span",{class:"text"}," Ajout d'une personne : ",-1)),pt={key:0,class:"cartouche"},_t=["onClick"],ft=["onUpdate:modelValue"],vt=["value"],gt={key:4},yt=U(()=>e("span",{class:"text"}," Suppression d'une organisation : ",-1)),kt=["onUpdate:modelValue","onChange"],bt=["value"],Dt=["onUpdate:modelValue"],wt=["value"],Ct={key:5},Pt=U(()=>e("span",{class:"text"}," Ajout d'une organization : ",-1)),At=["onUpdate:modelValue"],Ut=["value"],St={key:6},Mt=["onClick"],Et=U(()=>e("i",{class:"icon-trash"},null,-1)),Vt=[Et],xt=U(()=>e("hr",null,null,-1)),Nt={class:"modifications saved"},jt={class:"change"},Ot={key:0,class:"icon-calendar"},zt={key:1,class:"icon-user"},Rt={key:2,class:"icon-bank"},It={key:3,class:"icon-user text-danger"},Ft={key:4,class:"icon-building-filled"},Wt={key:5,class:"icon-building-filled text-danger"},Tt=["onClick"],qt=U(()=>e("i",{class:"icon-trash"},null,-1)),Lt=[qt],Jt={class:"form-group"},Ht=U(()=>e("label",{for:"name"},"Fichier",-1)),Bt={key:0},Yt={class:"form-group"},Gt=U(()=>e("label",{for:"name"},"Commentaire",-1)),Kt={class:"avenants"},Xt={class:"admin-bar text-right"},Qt={key:0,class:"icon-ok-circled text-success"},Zt={key:1,class:"icon-pencil"},$t={class:"modification small"},es={class:"change"},ts={key:0,class:"icon-calendar"},ss={key:1,class:"icon-user"},ns={key:2,class:"icon-user text-danger"},ls={key:3,class:"icon-bank"},os={key:4,class:"icon-building-filled"},is={key:5,class:"icon-building-filled text-danger"},as={key:0},rs=["href"],ds=U(()=>e("i",{class:"icon-file-pdf"},null,-1)),cs=U(()=>e("i",{class:"icon-trash"},null,-1)),us=U(()=>e("strong",null,"définitivement",-1)),hs=["onClick"],ms=U(()=>e("i",{class:"icon-pencil"},null,-1)),ps=U(()=>e("i",{class:"icon-trash"},null,-1)),_s=U(()=>e("strong",null,"L'activité sera verrouillée",-1));function fs(t,s,r,k,n,i){const y=D("datepicker"),f=D("Datepicker"),h=D("Amount"),V=D("person-auto-completer"),G=D("organization-auto-complete"),K=D("modal"),H=D("ButtonConfirm");return l(),o(b,null,[g(K,{title:"Détails de l'avenant",visible:n.edit,onModalValid:i.handlerSave,onModalCancel:i.handlerCancel},{default:A(()=>[e("form",Le,[Je,e("div",He,[Be,Ye,g(y,{modelValue:n.edit.dateAvenant,"onUpdate:modelValue":s[0]||(s[0]=u=>n.edit.dateAvenant=u),id:"dateAvenant"},null,8,["modelValue"])]),e("div",Ge,[Ke,Xe,e("div",Qe,[Ze,e("ul",$e,[e("li",null,[e("a",{href:"#",onClick:s[1]||(s[1]=v(u=>i.handlerAddChange("personAdd"),["prevent"])),class:P(i.modificationsEnabled.personAdd?"":"disabled")},"Ajout d'une personne",2)]),e("li",null,[e("a",{href:"#",onClick:s[2]||(s[2]=v(u=>i.handlerAddChange("personDel"),["prevent"])),class:P(i.modificationsEnabled.personDel?"":"disabled")},"Suppression d'une personne",2)]),e("li",null,[e("a",{href:"#",onClick:s[3]||(s[3]=v(u=>i.handlerAddChange("organizationAdd"),["prevent"])),class:P(i.modificationsEnabled.organizationAdd?"":"disabled")},"Ajout d'une organisation",2)]),e("li",null,[e("a",{href:"#",onClick:s[4]||(s[4]=v(u=>i.handlerAddChange("organizationDel"),["prevent"])),class:P(i.modificationsEnabled.organizationDel?"":"disabled")},"Suppression d'une organisation",2)]),e("li",null,[e("a",{href:"#",onClick:s[5]||(s[5]=v(u=>i.handlerAddChange("changeAmount"),["prevent"])),class:P(i.modificationsEnabled.changeAmount?"":"disabled")},"Modification du montant",2)]),e("li",null,[e("a",{href:"#",onClick:s[6]||(s[6]=v(u=>i.handlerAddChange("dateEnd"),["prevent"])),class:P(i.modificationsEnabled.dateEnd?"":"disabled")},"Modification de la date de fin",2)])])]),e("section",et,[(l(!0),o(b,null,w(n.edit.modifications.filter(u=>u.mode==="new"),u=>(l(),o("article",tt,[u.type==="dateEnd"?(l(),o("div",st,[nt,e("span",null,[g(f,{modelValue:u.value1,"onUpdate:modelValue":_=>u.value1=_},null,8,["modelValue","onUpdate:modelValue"])])])):u.type==="changeAmount"?(l(),o("div",lt,[ot,g(h,{modelValue:u.value1,"onUpdate:modelValue":_=>u.value1=_},null,8,["modelValue","onUpdate:modelValue"])])):u.type==="personDel"?(l(),o("div",it,[at,C(e("select",{name:"",id:"",onClick:s[7]||(s[7]=v(()=>{},["stop"])),"onUpdate:modelValue":_=>u.valueObj=_,onChange:_=>i.handlerSelectToDel(u,_)},[(l(!0),o(b,null,w(i.persons,(_,O)=>(l(),o("option",{value:_},c(_.firstName)+" "+c(_.lastName),9,dt))),256))],40,rt),[[j,u.valueObj]]),u.valueObj?C((l(),o("select",{key:0,name:"",id:"",onClick:s[8]||(s[8]=v(()=>{},["stop"])),"onUpdate:modelValue":_=>u.value2=_},[(l(!0),o(b,null,w(u.valueObj.roles,(_,O)=>(l(),o("option",{value:O},c(_),9,ut))),256))],8,ct)),[[j,u.value2]]):d("",!0)])):u.type==="personAdd"?(l(),o("div",ht,[mt,u.valueObj?(l(),o("span",pt,[a(c(u.valueObj.firstName)+" "+c(u.valueObj.lastName)+" ",1),e("i",{class:"icon-cancel-alt",onClick:_=>u.valueObj=null},null,8,_t)])):(l(),I(V,{key:1,onPersonSelected:_=>i.handlerUpdatePersonChange(u,_)},null,8,["onPersonSelected"])),C(e("select",{name:"rolesPerson","onUpdate:modelValue":_=>u.value2=_,class:"form-control",onClick:s[9]||(s[9]=v(()=>{},["stop"]))},[(l(!0),o(b,null,w(t.rolesPerson,_=>(l(),o("option",{value:_.id},c(_.label),9,vt))),256))],8,ft),[[j,u.value2]])])):u.type==="organizationDel"?(l(),o("div",gt,[yt,C(e("select",{name:"",id:"",onClick:s[10]||(s[10]=v(()=>{},["stop"])),"onUpdate:modelValue":_=>u.valueObj=_,class:"form-control",onChange:_=>i.handlerSelectToDel(u,_)},[(l(!0),o(b,null,w(i.organizations,(_,O)=>(l(),o("option",{value:_},c(_.label),9,bt))),256))],40,kt),[[j,u.valueObj]]),u.valueObj?C((l(),o("select",{key:0,name:"",id:"",onClick:s[11]||(s[11]=v(()=>{},["stop"])),"onUpdate:modelValue":_=>u.value2=_,class:"form-control"},[(l(!0),o(b,null,w(u.valueObj.roles,(_,O)=>(l(),o("option",{value:O},c(_),9,wt))),256))],8,Dt)),[[j,u.value2]]):d("",!0)])):u.type==="organizationAdd"?(l(),o("div",Ct,[Pt,g(G,{onChange:_=>i.handlerUpdateOrganizationChange(u,_)},null,8,["onChange"]),C(e("select",{name:"rolesOrganization","onUpdate:modelValue":_=>u.value2=_,class:"form-control",onClick:s[12]||(s[12]=v(()=>{},["stop"]))},[(l(!0),o(b,null,w(t.rolesOrganization,_=>(l(),o("option",{value:_.id},c(_.label),9,Ut))),256))],8,At),[[j,u.value2]])])):(l(),o("div",St,c(u),1)),e("nav",null,[e("button",{class:"btn btn-xs btn-danger",onClick:v(_=>i.handlerRemoveChange(u),["prevent"])},Vt,8,Mt)])]))),256))]),xt,e("section",Nt,[(l(!0),o(b,null,w(n.edit.modifications.filter(u=>u.mode!=="new"),u=>(l(),o("article",jt,[e("div",null,[u.type==="dateEnd"?(l(),o("i",Ot)):d("",!0),u.type==="personAdd"?(l(),o("i",zt)):d("",!0),u.type==="changeAmount"?(l(),o("i",Rt)):d("",!0),u.type==="personDel"?(l(),o("i",It)):d("",!0),u.type==="organizationAdd"?(l(),o("i",Ft)):d("",!0),u.type==="organizationDel"?(l(),o("i",Wt)):d("",!0),e("strong",null,c(u.info),1),e("small",null,[e("code",null," ("+c(u.type)+")",1)])]),e("nav",null,[e("button",{class:"btn btn-xs btn-danger",onClick:v(_=>i.handlerRemoveChange(u),["prevent"])},Lt,8,Tt)])]))),256))])]),e("div",Jt,[Ht,n.edit.previousFile?(l(),o("section",Bt," Fichier précédent ")):d("",!0),e("input",{class:"form-control",type:"file",onChange:s[13]||(s[13]=(...u)=>i.handlerSelectFile&&i.handlerSelectFile(...u))},null,32)]),e("div",Yt,[Gt,C(e("textarea",{"onUpdate:modelValue":s[14]||(s[14]=u=>n.edit.comment=u),class:"form-control"},null,512),[[x,n.edit.comment]])])])]),_:1},8,["visible","onModalValid","onModalCancel"]),e("section",Kt,[e("nav",Xt,[r.manage?(l(),o("button",{key:0,class:"btn btn-xs btn-default",onClick:s[15]||(s[15]=(...u)=>i.handlerNew&&i.handlerNew(...u))}," Nouvel avenant ")):d("",!0)]),(l(!0),o(b,null,w(r.avenants.avenants,u=>(l(),o("article",{class:P(["avenant card","status-"+u.status])},[e("h4",null,[u.status==200?(l(),o("i",Qt)):d("",!0),u.status==100?(l(),o("i",Zt)):d("",!0),e("strong",null,c(t.$filters.dateFull(u.date)),1),e("small",null," - "+c(u.status_text),1)]),e("section",$t,[(l(!0),o(b,null,w(u.modifications,_=>(l(),o("article",es,[_.type==="dateEnd"?(l(),o("i",ts)):d("",!0),_.type==="personAdd"?(l(),o("i",ss)):d("",!0),_.type==="personDel"?(l(),o("i",ns)):d("",!0),_.type==="changeAmount"?(l(),o("i",ls)):d("",!0),_.type==="organizationAdd"?(l(),o("i",os)):d("",!0),_.type==="organizationDel"?(l(),o("i",is)):d("",!0),e("span",null,c(_.info),1)]))),256))]),u.comment?(l(),o("p",as,c(u.comment),1)):d("",!0),e("nav",null,[e("a",{href:u.url_download,class:"btn btn-xs btn-primary"},[ds,a(" Télécharger")],8,rs),r.manage?(l(),I(H,{key:0,onConfirm:_=>i.handlerDelete(u),class:P("btn btn-xs btn-danger"),checkbox:!0},{message:A(()=>[a(" Supprimer "),us,a(" cet avenant ? ")]),default:A(()=>[cs,a(" Supprimer ")]),_:2},1032,["onConfirm"])):d("",!0),r.manage&&u.editable?(l(),o("a",{key:1,href:"#",class:"btn btn-xs btn-default",onClick:v(_=>i.handlerEdit(u),["prevent"])},[ms,a(" Editer ")],8,hs)):d("",!0),u.status===100&&r.manage?(l(),I(H,{key:2,onConfirm:_=>i.handlerApplyAvenant(u),class:P("btn btn-xs btn-success")},{message:A(()=>[a(" Confirmer l'application de l'avenant pour cette activité ? "),_s]),default:A(()=>[ps,a(" Appliquer ")]),_:2},1032,["onConfirm"])):d("",!0)])],2))),256))])],64)}const vs=E(qe,[["render",fs],["__scopeId","data-v-833d8759"]]);const gs={props:{milestone:{required:!0},manage:{default:!1},progression:{default:!1}},computed:{finishedPerson(){let s=/\[Person:([0-9]*):(.*)\]/gm.exec(this.milestone.finishedBy);return s!==null?s[2]:""},statutText(){if(!this.milestone.type.finishable)return"";switch(this.milestone.finished){case 0:case null:return this.milestone.past?"EN RETARD":"A FAIRE";case 50:return"EN COURS";case 100:return"Validé";case 200:return"Sans suite";case 400:return"Refusé";default:return""}},owner(){return this.finishedPerson?finishedPerson[2]:"Unreadable data"},ownerId(){return this.finishedPerson?finishedPerson[1]:"Unreadble data"},finishable(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished<100},cancelFinish(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished>0},progressable(){return this.progression&&this.milestone.validable&&this.milestone.type.finishable==!0&&(this.milestone.finished==null||this.milestone.finished==0||this.milestone.finished==100)},inProgress(){return this.milestone.validable&&this.milestone.type.finishable==!0&&this.milestone.finished>0&&this.milestone.finished<100},finished(){return this.milestone.type.finishable==!0&&this.milestone.finished>=100},late(){return this.finishable==!0&&this.milestone.past&&!this.finished},past(){return this.milestone.past},cssClass(){let t={finishable:this.finishable,finished:this.finished||this.milestone.done,late:this.late||this.milestone.late,payment:this.milestone.isPayment,inprogress:this.inProgress,canceled:this.milestone.finished==200,refused:this.milestone.finished==400,valided:this.milestone.finished==100,past:this.past};return t[this.milestone.type.facet]=!0,t}}},F=t=>(T("data-v-42de1793"),t=t(),q(),t),ys={class:"main"},ks={key:0},bs=["datetime"],Ds={class:"ago"},ws={key:0},Cs={key:0},Ps={key:1,class:"details"},As={key:2},Us=F(()=>e("i",{class:"icon-rewind-outline"},null,-1)),Ss=[Us],Ms=F(()=>e("i",{class:"icon-cw-outline"},null,-1)),Es=[Ms],Vs=F(()=>e("i",{class:"icon-ok-circled"},null,-1)),xs=[Vs],Ns=F(()=>e("i",{class:"icon-archive"},null,-1)),js=[Ns],Os=F(()=>e("i",{class:"icon-block"},null,-1)),zs=[Os],Rs=F(()=>e("i",{class:"icon-trash"},null,-1)),Is=[Rs],Fs=F(()=>e("i",{class:"icon-edit"},null,-1)),Ws=[Fs];function Ts(t,s,r,k,n,i){return l(),o("article",{class:P(["jalon",i.cssClass])},[e("span",ys,[i.statutText?(l(),o("strong",ks," "+c(i.statutText),1)):d("",!0),e("time",{datetime:r.milestone.dateStart,class:"time-value"},[a(c(t.$filters.date(r.milestone.dateStart))+" ",1),e("span",Ds," ("+c(t.$filters.timeAgo(r.milestone.dateStart))+") ",1)],8,bs)]),e("strong",{class:P(["card-title",{"text-private":r.milestone.isPayment}])},[a(c(r.milestone.type.label)+" ",1),i.inProgress?(l(),o("small",ws,[a(" (En cours par "),e("strong",null,c(i.finishedPerson),1),a(")")])):d("",!0)],2),i.finished?(l(),o("p",Cs,[e("strong",null,c(i.finishedPerson),1),a(" a complété ce jalon")])):d("",!0),r.milestone.comment?(l(),o("p",Ps,c(r.milestone.comment),1)):d("",!0),r.milestone.isPayment?d("",!0):(l(),o("nav",As,[i.cancelFinish?(l(),o("a",{key:0,href:"#",title:"Réinitialiser la progression",onClick:s[0]||(s[0]=v(y=>t.$emit("unvalid",r.milestone),["prevent"]))},Ss)):d("",!0),i.progressable?(l(),o("a",{key:1,href:"#",title:"Marquer comme en cours",onClick:s[1]||(s[1]=v(y=>t.$emit("inprogress",r.milestone),["prevent"]))},Es)):d("",!0),i.finishable?(l(),o("a",{key:2,href:"#",title:"Marquer comme terminé",onClick:s[2]||(s[2]=v(y=>t.$emit("valid",r.milestone),["prevent"]))},xs)):d("",!0),i.finishable?(l(),o("a",{key:3,href:"#",title:"Marquer comme sans suite",onClick:s[3]||(s[3]=v(y=>t.$emit("cancel",r.milestone),["prevent"]))},js)):d("",!0),i.finishable?(l(),o("a",{key:4,href:"#",title:"Marquer comme refusé",onClick:s[4]||(s[4]=v(y=>t.$emit("refused",r.milestone),["prevent"]))},zs)):d("",!0),r.manage?(l(),o("a",{key:5,href:"#",title:"Supprimer ce jalon",onClick:s[5]||(s[5]=v(y=>t.$emit("remove",r.milestone),["prevent"]))},Is)):d("",!0),r.manage?(l(),o("a",{key:6,href:"#",title:"Modifier ce jalon",onClick:s[6]||(s[6]=v(y=>t.$emit("edit",r.milestone),["prevent"]))},Ws)):d("",!0)]))],2)}const qs=E(gs,[["render",Ts],["__scopeId","data-v-42de1793"]]);const Ls={props:{url:{required:!0},manage:{required:!0},progression:{default:!1},items:{default:[],type:Array},types:{default:[],type:Array},payments:{required:!1,default:[],type:Array}},components:{milestone:qs,datepicker:Y},data(){return{error:null,formData:null,pendingMsg:"",creatable:!1,deleteMilestone:null,editMilestone:null,validMilestone:null,cancelMilestone:null,refusedMilestone:null,unvalidMilestone:null,inProgressMilestone:null,action:null,actionMessage:"",actionMilestone:null,model:{}}},computed:{types(){return this.types},milestones(){let t=[];return this.payments.forEach(s=>{let r=new Date,k=!1,n=!1,i;switch(s.status){case 1:r=s.datePredicted,r?(i="PRÉVU",k=N(s.datePredicted.date).unix(){t.push(s)}),t.sort((s,r)=>{let k=N(s.dateStart).unix(),n=N(r.dateStart).unix();return k-n}),t},payments(){return this.payments},formTypeFinishable(){return this.formData?this.types.find(t=>t.id==this.formData.type.id&&t.finishable):!1},groupedTypes(){let t={};return this.types.forEach(s=>{let r=s.facet;t.hasOwnProperty(r)||(t[r]={label:r,types:[]}),t[s.facet].types.push(s)}),t}},methods:{handlerValid(t){this.validMilestone=t},handlerInProgress(t){this.inProgressMilestone=t},handlerUnvalid(t){this.unvalidMilestone=t},handlerActionConfirm(t,s,r){this.actionMilestone=t,this.action=s,this.actionMessage=r},handlerActionCancel(){this.actionMilestone=null,this.action=null,this.actionMessage=""},handlerCancel(t){this.unvalidMilestone=t},handlerRemove(t){this.deleteMilestone=t},handlerEdit(t){this.editMilestone=t,this.formData={type:t.type,id:t.id,comment:t.comment,dateStart:N(t.dateStart).format("YYYY-MM-DD")}},handlerNew(){this.formData={id:0,type:JSON.parse(JSON.stringify(this.types[0])),dateStart:N().format("Y-M-D HH:mm:ss"),comment:""}},preformDelete(){this.pendingMsg="Suppression du jalon",S.delete(this.url+"?id="+this.deleteMilestone.id).then(t=>{this.fetch()},t=>{R.commit("addErrorAxios",t)}).then(t=>{this.pendingMsg=null,this.deleteMilestone=null})},performValid(t){var s={},r;switch(t){case"valid":this.pendingMsg="Validation du jalon",r=this.validMilestone;break;case"unvalid":this.pendingMsg="Réinitialisation du jalon",r=this.unvalidMilestone;break;case"inprogress":this.pendingMsg="Marquage du jalon comme en cours",r=this.inProgressMilestone;break;case"cancel":case"refused":r=this.actionMilestone;break;default:this.error="Action incorrecte";return}s.id=r.id,s.action=t,this.action=null,this.actionMessage="",this.actionMilestone=null,S.put(this.url,s).then(k=>{this.fetch()},k=>{R.commit("addErrorAxios",k)}).then(k=>{this.pendingMsg=null,this.validMilestone=null,this.unvalidMilestone=null,this.inProgressMilestone=null})},performSave(){this.pendingMsg=this.formData.id?"Enregistrement des modifications":"Création du nouveau jalon",this.formData.id?S.put(this.url,this.formData).then(t=>{this.fetch()},t=>{R.commit("addErrorAxios",t)}).then(t=>{this.pendingMsg=null,this.formData=null}):S.post(this.url,this.formData).then(t=>{this.fetch()},t=>{R.commit("addErrorAxios",t)}).then(t=>{this.pendingMsg=null,this.formData=null})},fetch(){this.pendingMsg="Chargement des jalons : "+this.url,S.get(this.url).then(t=>{this.$emit("update",t.data.datas.milestones.entities)},t=>{console.log(t),this.error="Impossible de charger les jalons de cette activités : "+t}).then(t=>{this.pendingMsg=""})}},mounted(){}},Js={class:"milestones"},Hs={key:0,class:"error overlay"},Bs={class:"overlay-content"},Ys=e("i",{class:"icon-warning-empty"},null,-1),Gs=e("br",null,null,-1),Ks=e("i",{class:"icon-cancel-circled"},null,-1),Xs={key:0,class:"overlay"},Qs={class:"overlay-content"},Zs=e("i",{class:"icon-calendar"},null,-1),$s={key:0},en={key:1},tn={class:"form-group"},sn=e("label",{for:""},"Type de jalon",-1),nn=["label"],ln=["value"],on={class:"help"},an=e("i",{class:"icon-info-circled"},null,-1),rn={class:"form-group"},dn=e("label",{for:""},"Date prévue pour le jalon",-1),cn={class:"form-group"},un=e("label",{for:""},"Description",-1),hn=e("i",{class:"icon-floppy"},null,-1),mn=e("i",{class:"icon-cancel-outline"},null,-1),pn={key:0,class:"deleteconfirm overlay"},_n={class:"overlay-content"},fn=e("h2",null,[e("i",{class:"icon-help-circled"}),a(" Supprimer ce jalon ?")],-1),vn=e("strong",null,"définitive",-1),gn=e("em",null,"Marquer comme terminé",-1),yn=e("i",{class:"icon-trash"},null,-1),kn=e("i",{class:"icon-cancel-outline"},null,-1),bn={key:0,class:"validconfirm overlay"},Dn={class:"overlay-content"},wn=e("h2",null,[e("i",{class:"icon-help-circled"}),a(" Valider ce jalon ? ")],-1),Cn=e("p",null,"Les jalons marqués comme terminés ne feront pas l'objet de notifications ou d'alertes.",-1),Pn=e("i",{class:"icon-ok-circled"},null,-1),An=e("i",{class:"icon-cancel-outline"},null,-1),Un={key:0,class:"inprogressconfirm overlay"},Sn={class:"overlay-content"},Mn=e("h2",null,[e("i",{class:"icon-help-circled"}),a(' Marquer ce jalon "en cours" ? ')],-1),En=e("p",null,null,-1),Vn=e("i",{class:"icon-cw-outline"},null,-1),xn=e("i",{class:"icon-cancel-outline"},null,-1),Nn={key:0,class:"inprogressconfirm overlay"},jn={class:"overlay-content"},On=e("i",{class:"icon-help-circled"},null,-1),zn=e("p",null,"Les jalons marqués comme terminés (Validé, refusé ou sans suite) ne feront pas l'objet de notifications ou d'alertes",-1),Rn=e("i",{class:"icon-cw-outline"},null,-1),In=e("i",{class:"icon-cancel-outline"},null,-1),Fn={key:0,class:"validconfirm overlay"},Wn={class:"overlay-content"},Tn=e("h2",null,[e("i",{class:"icon-help-circled"}),a(" Invalider ce jalon ? ")],-1),qn=e("p",null,"L'état d'avancement du jalon sera réinitialisé.",-1),Ln=e("i",{class:"icon-ok-circled"},null,-1),Jn=e("i",{class:"icon-cancel-outline"},null,-1),Hn={key:0,class:"alert alert-info"},Bn=e("i",{class:"icon-spinner animate-spin"},null,-1),Yn={key:0,class:"admin-bar"},Gn=e("i",{class:"icon-calendar-plus-o"},null,-1),Kn=e("i",{class:"icon-bug"},null,-1),Xn={key:1,class:"list"},Qn={key:2,class:"alert"};function Zn(t,s,r,k,n,i){const y=D("datepicker"),f=D("milestone");return l(),o("section",Js,[g(M,{name:"fade"},{default:A(()=>[n.error?(l(),o("div",Hs,[e("div",Bs,[Ys,a(" "+c(n.error)+" ",1),Gs,e("a",{href:"#",onClick:s[0]||(s[0]=h=>n.error=null),class:"btn btn-sm btn-default btn-xs"},[Ks,a(" Fermer")])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.formData?(l(),o("div",Xs,[e("div",Qs,[e("h2",null,[Zs,n.formData.id?(l(),o("span",$s,[a("Modification du jalon "),e("strong",null,c(n.formData.type.label),1)])):(l(),o("span",en,"Nouveau jalon"))]),e("div",tn,[sn,C(e("select",{name:"",id:"","onUpdate:modelValue":s[1]||(s[1]=h=>n.formData.type.id=h),class:"form-control"},[(l(!0),o(b,null,w(i.groupedTypes,h=>(l(),o("optgroup",{label:h.label},[(l(!0),o(b,null,w(h.types,V=>(l(),o("option",{value:V.id},c(V.label),9,ln))),256))],8,nn))),256))],512),[[j,n.formData.type.id]]),C(e("p",on,[an,a(" Ce type de jalon inclut des méchanismes de validation pour marquer le jalon comme terminé ")],512),[[re,i.formTypeFinishable]])]),e("div",rn,[dn,g(y,{modelValue:n.formData.dateStart,"onUpdate:modelValue":s[2]||(s[2]=h=>n.formData.dateStart=h),onInput:s[3]||(s[3]=h=>{n.formData.dateStart=h})},null,8,["modelValue"])]),e("div",cn,[un,C(e("textarea",{"onUpdate:modelValue":s[4]||(s[4]=h=>n.formData.comment=h),class:"form-control"},null,512),[[x,n.formData.comment]])]),e("nav",null,[e("button",{class:"btn btn-default",onClick:s[5]||(s[5]=(...h)=>i.performSave&&i.performSave(...h))},[hn,a(" Enregistrer ")]),e("button",{class:"btn btn-default",onClick:s[6]||(s[6]=h=>n.formData=null)},[mn,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.deleteMilestone?(l(),o("div",pn,[e("div",_n,[fn,e("p",null,[a("Cette suppression sera "),vn,a(", si vous souhaitez signifier que ce jalon est réalisé, utilisez plutôt l'option "),gn,a(". Si cette option n'est pas disponible, demandez à l'administrateur Oscar si vous avez les privilèges pour réaliser cette action ou si le type de jalon "),e("strong",null,c(n.deleteMilestone.type.label),1),a(" est correctement configuré.")]),e("nav",null,[e("button",{class:"btn btn-default",onClick:s[7]||(s[7]=(...h)=>i.preformDelete&&i.preformDelete(...h))},[yn,a(" Supprimer ")]),e("button",{class:"btn btn-default",onClick:s[8]||(s[8]=h=>n.deleteMilestone=null)},[kn,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.validMilestone?(l(),o("div",bn,[e("div",Dn,[wn,Cn,e("nav",null,[e("button",{class:"btn btn-default",onClick:s[9]||(s[9]=h=>i.performValid("valid"))},[Pn,a(" Marquer ce jalon comme terminé ")]),e("button",{class:"btn btn-default",onClick:s[10]||(s[10]=h=>n.validMilestone=null)},[An,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.inProgressMilestone?(l(),o("div",Un,[e("div",Sn,[Mn,En,e("nav",null,[e("button",{class:"btn btn-default",onClick:s[11]||(s[11]=h=>i.performValid("inprogress"))},[Vn,a(" Marquer ce jalon comme en cours ")]),e("button",{class:"btn btn-default",onClick:s[12]||(s[12]=h=>n.inProgressMilestone=null)},[xn,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.actionMessage?(l(),o("div",Nn,[e("div",jn,[e("h2",null,[On,a(" "+c(n.actionMessage)+" ? ",1)]),zn,e("nav",null,[e("button",{class:"btn btn-default",onClick:s[13]||(s[13]=h=>i.performValid(n.action))},[Rn,a(" "+c(n.actionMessage),1)]),e("button",{class:"btn btn-default",onClick:s[14]||(s[14]=(...h)=>i.handlerActionCancel&&i.handlerActionCancel(...h))},[In,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.unvalidMilestone?(l(),o("div",Fn,[e("div",Wn,[Tn,qn,e("nav",null,[e("button",{class:"btn btn-success",onClick:s[15]||(s[15]=h=>i.performValid("unvalid"))},[Ln,a(" Réinitialiser la progression de ce jalon ")]),e("button",{class:"btn btn-danger",onClick:s[16]||(s[16]=h=>n.unvalidMilestone=null)},[Jn,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.pendingMsg?(l(),o("div",Hn,[Bn,a(" "+c(n.pendingMsg),1)])):d("",!0)]),_:1}),r.manage?(l(),o("nav",Yn,[e("a",{href:"#",onClick:s[17]||(s[17]=v((...h)=>i.handlerNew&&i.handlerNew(...h),["prevent"])),class:"btn btn-xs btn-default"},[Gn,a(" Nouveau Jalon ")]),e("a",{href:"#",onClick:s[18]||(s[18]=v((...h)=>i.fetch&&i.fetch(...h),["prevent"])),class:"btn btn-xs btn-warning"},[Kn,a(" fetch ")])])):d("",!0),i.milestones!=null?(l(),o("section",Xn,[(l(!0),o(b,null,w(i.milestones,h=>(l(),I(f,{milestone:h,key:h.id,manage:r.manage,progression:r.progression,onValid:i.handlerValid,onUnvalid:i.handlerUnvalid,onInprogress:i.handlerInProgress,onCancel:s[19]||(s[19]=V=>i.handlerActionConfirm(V,"cancel","Marquer ce jalon comme sans suite")),onRefused:s[20]||(s[20]=V=>i.handlerActionConfirm(V,"refused","Marquer ce jalon comme refusé")),onRemove:i.handlerRemove,onEdit:i.handlerEdit},null,8,["milestone","manage","progression","onValid","onUnvalid","onInprogress","onRemove","onEdit"]))),128))])):(l(),o("div",Qn," Aucun jalon "))])}const $n=E(Ls,[["render",Zn]]),el={props:["payment","manage"],data(){return{}},computed:{late(){if(this.payment.status===1){if(!this.payment.datePredicted)return!0;let t=N().unix();return N(this.payment.datePredicted).unix()t.$emit("delete",r.payment),["prevent"])),title:"Supprimer ce versement"},pl),e("a",{href:"#",class:"btn-edit",onClick:s[1]||(s[1]=v(y=>t.$emit("edit",r.payment),["prevent"])),title:"Modifier ce versement"},fl)])):d("",!0)]),e("p",vl,c(r.payment.comment),1)],2)}const yl=E(el,[["render",gl]]),kl={props:["url","amount","currency","currencies","manage","payments"],data(){return{formData:null,deletePayment:null,error:"",pendingMsg:""}},components:{payment:yl,datepicker:Y},computed:{total(){let t=0;return this.payments&&this.payments.forEach(s=>{let r=1;s.currency&&(r=s.rate),t+=s.amount/r}),Math.round(t*100)/100},currencySymbol(){return this.currency?this.currency.symbol:"€"},formHasError(){return!this.formData.amount||this.formData.status==2&&!this.formData.datePayment||this.formData.status==1&&!this.formData.datePredicted}},methods:{getPaymentDateValue(t){return t.status==2?t.datePayment?t.datePayment.date:null:t.status==1&&t.datePredicted?t.datePredicted.date:null},handlerNewPayment(){this.formData={id:null,amount:0,currencyId:1,rate:1,datePredicted:"",status:1,datePayment:"",codeTransaction:"",comment:""}},handlerDelete(t){this.deletePayment=t},handlerEdit(t){this.formData=JSON.parse(JSON.stringify(t)),this.formData.currencyId=t.currency.id,this.formData.datePayment=t.datePayment?N(t.datePayment.date).format("YYYY-MM-DD"):"",this.formData.datePredicted=t.datePredicted?N(t.datePredicted.date).format("YYYY-MM-DD"):"",this.formData.currencyId=t.currency.id},handlerFormUpdateRate(){let t=this.currencies.find(s=>s.id==this.formData.currencyId);t&&(this.formData.rate=t.rate)},performSave(){this.loading="Enregistrement du paiement",!this.formHasError&&(this.formData.id?S.post(this.url,this.formData).then(t=>{this.formData=null,this.fetch()},t=>{this.error=z.manageErrorResponse(t)}):S.put(this.url,this.formData).then(t=>{this.formData=null,this.fetch()},t=>{this.error=z.manageErrorResponse(t)}))},performDelete(){S.delete(this.url+"?id="+this.deletePayment.id).then(t=>{this.fetch()},t=>{this.error="Impossible de supprimer le versement : "+z.manageErrorResponse(t).message}).then(()=>{this.deletePayment=null})},fetch(){this.loading="Chargement des versements",S.get(this.url).then(t=>{this.$emit("update",t.data.datas.payments)},t=>{this.error=z.manageErrorResponse(t)}).finally(t=>this.loading=null)}},mounted(){}},bl={class:"payments"},Dl={key:0,class:"error overlay"},wl={class:"overlay-content"},Cl=e("i",{class:"icon-warning-empty"},null,-1),Pl=e("br",null,null,-1),Al=e("i",{class:"icon-cancel-outline"},null,-1),Ul={key:0,class:"pending overlay"},Sl={class:"overlay-content"},Ml=e("i",{class:"icon-spinner animate-spin"},null,-1),El={key:0,class:"deleteconfirm overlay"},Vl={class:"overlay-content"},xl=e("h3",null,[e("i",{class:"icon-help-circled"}),a(" Supprimer ce versement ?")],-1),Nl=e("i",{class:"icon-trash"},null,-1),jl=e("i",{class:"icon-cancel-outline"},null,-1),Ol={key:0,class:"overlay"},zl={class:"overlay-content"},Rl={key:0},Il={key:1},Fl={class:"container"},Wl={class:"row"},Tl={class:"col-xs-6"},ql={class:"form-group"},Ll=e("label",{class:"control-label",for:"amount"},"Montant",-1),Jl={key:0,class:"oscar-form-message error"},Hl={class:"col-xs-3"},Bl={class:"form-group"},Yl=e("label",{class:"control-label"},"Devise pour le versement",-1),Gl=["value"],Kl={class:"col-xs-3"},Xl={class:"form-group"},Ql=e("label",{class:"control-label"},"Taux",-1),Zl={class:"row"},$l={class:"col-xs-6"},eo={class:"form-group"},to=e("label",{class:"control-label"},"Date prévue",-1),so={key:0,class:"oscar-form-message error"},no={class:"col-xs-6"},lo={class:"form-group"},oo=e("label",{class:"control-label"},"Statut",-1),io=e("option",{value:"1",selected:"selected"},"Prévisionnel",-1),ao=e("option",{value:"2"},"Réalisé",-1),ro=e("option",{value:"3"},"Écart",-1),co=[io,ao,ro],uo={class:"done"},ho=e("h2",null,"Informations sur le versement effectif",-1),mo={class:"row"},po={class:"col-xs-6"},_o={class:"form-group"},fo=e("label",{class:"control-label"},"Date effective",-1),vo={key:0,class:"oscar-form-message error"},go={class:"col-xs-6"},yo={class:"form-group"},ko=e("label",{class:"control-label"},"N° de pièce",-1),bo=e("p",{class:"help"},"Numéro permettant d'identifier l'opération auprès des services comptables.",-1),Do={class:"form-group"},wo=e("label",{class:"control-label"},"Commentaire",-1),Co={class:"text-center"},Po={class:"btn-group"},Ao={key:0,class:"admin-bar"},Uo=e("i",{class:"icon-bank"},null,-1),So=e("i",{class:"icon-bug"},null,-1),Mo={class:"payment total"},Eo={class:"heading"},Vo={class:"amount text-private"},xo={class:"date"},No={class:"text-private"},jo={key:1,class:"alert alert-danger alertAmount"},Oo=e("p",null,[e("i",{class:"icon-attention-1"}),a(" Le total des versements prévus et réalisés ne semble pas correspondre avec le montant prévu initialement, Somme des versements :")],-1),zo={class:"amountPrevu text-private"},Ro={title:"Valeur exacte : = $entity->getAmount() ?>",class:"text-private"};function Io(t,s,r,k,n,i){const y=D("datepicker"),f=D("payment");return l(),o("section",bl,[g(M,{name:"fade"},{default:A(()=>[n.error?(l(),o("div",Dl,[e("div",wl,[Cl,a(" "+c(n.error)+" ",1),Pl,e("a",{href:"#",onClick:s[0]||(s[0]=h=>n.error=null),class:"btn btn-default"},[Al,a(" Fermer")])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.pendingMsg?(l(),o("div",Ul,[e("div",Sl,[Ml,a(" "+c(n.pendingMsg),1)])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.deletePayment?(l(),o("div",El,[e("div",Vl,[xl,e("nav",null,[e("button",{class:"btn btn-default",onClick:s[1]||(s[1]=(...h)=>i.performDelete&&i.performDelete(...h))},[Nl,a(" Supprimer ")]),e("button",{class:"btn btn-default",onClick:s[2]||(s[2]=h=>n.deletePayment=null)},[jl,a(" Annuler ")])])])])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.formData?(l(),o("div",Ol,[e("div",zl,[n.formData.id?(l(),o("h3",Rl,"Modification du versement")):(l(),o("h3",Il,"Nouveau versement")),e("div",Fl,[e("div",Wl,[e("div",Tl,[e("div",ql,[Ll,C(e("input",{name:"amount",class:"form-control input-lg form-control","onUpdate:modelValue":s[3]||(s[3]=h=>n.formData.amount=h),type:"text"},null,512),[[x,n.formData.amount]]),n.formData.amount?d("",!0):(l(),o("div",Jl," Vous devez indiquer un montant. "))])]),e("div",Hl,[e("div",Bl,[Yl,C(e("select",{name:"currency",class:"form-control form-control","onUpdate:modelValue":s[4]||(s[4]=h=>n.formData.currencyId=h),onChange:s[5]||(s[5]=(...h)=>i.handlerFormUpdateRate&&i.handlerFormUpdateRate(...h))},[(l(!0),o(b,null,w(r.currencies,h=>(l(),o("option",{value:h.id},c(h.label),9,Gl))),256))],544),[[j,n.formData.currencyId]])])]),e("div",Kl,[e("div",Xl,[Ql,C(e("input",{name:"rate",class:"form-control form-control","onUpdate:modelValue":s[6]||(s[6]=h=>n.formData.rate=h),type:"text"},null,512),[[x,n.formData.rate]])])])]),e("div",Zl,[e("div",$l,[e("div",eo,[to,g(y,{modelValue:n.formData.datePredicted,"onUpdate:modelValue":s[7]||(s[7]=h=>n.formData.datePredicted=h),onInput:s[8]||(s[8]=h=>{n.formData.datePredicted=h})},null,8,["modelValue"]),n.formData.status==1&&!n.formData.datePredicted?(l(),o("div",so," Les versements prévisionnels necessitent une date. ")):d("",!0)])]),e("div",no,[e("div",lo,[oo,C(e("select",{name:"status",class:"form-control form-control","onUpdate:modelValue":s[9]||(s[9]=h=>n.formData.status=h)},co,512),[[j,n.formData.status]])])])]),e("div",uo,[ho,e("div",mo,[e("div",po,[e("div",_o,[fo,g(y,{moment:t.moment,modelValue:n.formData.datePayment,"onUpdate:modelValue":s[10]||(s[10]=h=>n.formData.datePayment=h),onInput:s[11]||(s[11]=h=>{n.formData.datePayment=h})},null,8,["moment","modelValue"]),n.formData.status==2&&!n.formData.datePayment?(l(),o("div",vo," Les versements réalisés necessitent une date effective ")):d("",!0)])]),e("div",go,[e("div",yo,[ko,C(e("input",{name:"codeTransaction",class:"form-control form-control","onUpdate:modelValue":s[12]||(s[12]=h=>n.formData.codeTransaction=h),type:"text"},null,512),[[x,n.formData.codeTransaction]])]),bo])])]),e("div",Do,[wo,C(e("textarea",{name:"comment",class:"form-control form-control",placeholder:"Commentaire","onUpdate:modelValue":s[13]||(s[13]=h=>n.formData.comment=h)},null,512),[[x,n.formData.comment]])]),e("nav",Co,[e("nav",Po,[e("a",{class:"btn btn-default button-back",href:"#",onClick:s[14]||(s[14]=v(h=>n.formData=null,["prevent"]))},"Annuler"),e("button",{class:P(["btn btn-primary",{disabled:i.formHasError}]),onClick:s[15]||(s[15]=v((...h)=>i.performSave&&i.performSave(...h),["prevent"]))}," Enregistrer ",2)])])])])])):d("",!0)]),_:1}),r.manage?(l(),o("nav",Ao,[e("a",{href:"#",onClick:s[16]||(s[16]=v((...h)=>i.handlerNewPayment&&i.handlerNewPayment(...h),["prevent"])),class:"btn btn-default btn-xs"},[Uo,a(" Nouveau versement")]),e("button",{class:"btn btn-warning btn-xs",onClick:s[17]||(s[17]=v((...h)=>i.fetch&&i.fetch(...h),["prevent"]))},[So,a(" fetch ")])])):d("",!0),(l(!0),o(b,null,w(r.payments,h=>(l(),I(f,{payment:h,key:h.id,manage:r.manage,onDelete:i.handlerDelete,onEdit:i.handlerEdit},null,8,["payment","manage","onDelete","onEdit"]))),128)),e("article",Mo,[e("div",Eo,[e("strong",Vo,c(t.$filters.money(i.total))+" € ",1),e("span",xo,[a("/ "),e("strong",No,c(t.$filters.money(r.amount))+" €",1)])])]),i.total!=r.amount?(l(),o("div",jo,[Oo,e("ul",null,[e("li",null,[e("strong",zo,c(t.$filters.money(i.total))+" "+c(i.currencySymbol),1),a(" en versement,")]),e("li",null,[e("strong",Ro,c(t.$filters.money(r.amount))+" "+c(i.currencySymbol),1),a(" prévu ")])])])):d("",!0)])}const Fo=E(kl,[["render",Io]]);const Wo={name:"PersonCartouche",props:{person:{required:!0,type:Object}}},J=t=>(T("data-v-dfc2c1c6"),t=t(),q(),t),To={class:"person-text"},qo={class:"info-bulle"},Lo=["src"],Jo={class:"infos"},Ho={class:"firstname"},Bo={class:"lastname"},Yo={class:"content"},Go={style:{"white-space":"nowrap"}},Ko=J(()=>e("i",{class:"icon-mail"},null,-1)),Xo={key:0},Qo={key:1},Zo=J(()=>e("i",{class:"icon-phone-outline"},null,-1)),$o={key:0},ei={key:1},ti=J(()=>e("i",{class:"icon-building-filled"},null,-1)),si={key:0},ni={key:1},li={key:0},oi=J(()=>e("i",{class:"icon-direction"},null,-1)),ii=["href"],ai=J(()=>e("i",{class:"icon-zoom-in-outline"},null,-1)),ri={key:1};function di(t,s,r,k,n,i){return l(),o("span",To,[a(c(r.person.label)+" ",1),e("div",qo,[e("header",null,[e("figure",null,[e("img",{src:"https://www.gravatar.com/avatar/"+r.person.mailMd5+"?s=60",alt:""},null,8,Lo)]),e("div",Jo,[e("div",Ho,c(r.person.firstName),1),e("div",Bo,c(r.person.lastName),1)])]),e("div",Yo,[e("div",Go,[Ko,r.person.email?(l(),o("span",Xo,c(r.person.email),1)):(l(),o("em",Qo,"Inconnu"))]),e("div",null,[Zo,r.person.phone?(l(),o("span",$o,c(r.person.phone),1)):(l(),o("em",ei,"Inconnu"))]),e("div",null,[ti,r.person.affectation?(l(),o("span",si,c(r.person.affectation),1)):(l(),o("em",ni,"Inconnu"))]),r.person.ucbnSiteLocalisation?(l(),o("div",li,[oi,e("span",null,c(r.person.ucbnSiteLocalisation),1)])):d("",!0)]),e("footer",null,[r.person.url?(l(),o("a",{key:0,href:r.person.url,class:"btn btn-primary btn-xs"},[ai,a(" Fiche")],8,ii)):(l(),o("code",ri,c(r.person.id),1))])])])}const ci=E(Wo,[["render",di],["__scopeId","data-v-dfc2c1c6"]]),ui={components:{PersonDisplay:ne},props:{person:{default:function(){return{}}},editable:!1,allowTooltip:{default:!1}},computed:{duration(){return this.person.duration}},data(){return{canSave:!1,mode:"read",durationForm:666}},methods:{handlerKeyUp(){console.log(arguments)},handlerUpdate(){this.$emit("workpackagepersonupdate",this.person,this.durationForm),this.mode="read"},handlerEdit(){this.mode="edit",this.durationForm=this.person.duration},handlerCancel(){this.mode="read",this.durationForm=this.person.duration},handlerRemove(){this.$emit("workpackagepersondelete",this.person)}}},hi={class:"workpackage-person"},mi={class:"displayname"},pi=e("i",{class:"icon-trash"},null,-1),_i=[pi],fi={class:"tempsdeclare temps"},vi={key:0},gi=e("i",{class:"icon-floppy"},null,-1),yi=[gi],ki=e("i",{class:"icon-cancel-outline"},null,-1),bi=[ki],Di={key:1},wi={class:"wp-hours"},Ci={title:"Heure(s) saisie(s)",class:"wp-hour unsend"},Pi={title:"Heure(s) validée(s)",class:"wp-hour validate"},Ai={key:0,title:"Heure(s) en cours de validation",class:"wp-hour validating"},Ui={key:1,title:"Heure(s) en conflit",class:"wp-hour conflicts"},Si={title:"Heure(s) à valider",class:"wp-hour duration"},Mi=e("i",{class:"icon-pencil"},null,-1),Ei=[Mi];function Vi(t,s,r,k,n,i){const y=D("PersonDisplay");return l(),o("article",hi,[e("div",mi,[g(y,{person:r.person.person,"allow-tooltip":r.allowTooltip},null,8,["person","allow-tooltip"]),r.editable&&n.mode=="read"?(l(),o("a",{key:0,href:"#",onClick:s[0]||(s[0]=v(f=>i.handlerRemove(r.person),["prevent"])),class:"link",title:"Supprimer ce déclarant"},_i)):d("",!0)]),e("div",fi,[r.editable&&n.mode=="edit"?(l(),o("div",vi,[a(" Heures prévues : "),C(e("input",{type:"integer","onUpdate:modelValue":s[1]||(s[1]=f=>n.durationForm=f),style:{width:"5em"},onKeyup:s[2]||(s[2]=de((...f)=>i.handlerUpdate&&i.handlerUpdate(...f),["13"]))},null,544),[[x,n.durationForm]]),e("a",{href:"#",onClick:s[3]||(s[3]=v((...f)=>i.handlerUpdate&&i.handlerUpdate(...f),["prevent"])),title:"Appliquer la modification des heures prévues"},yi),e("a",{href:"#",onClick:s[4]||(s[4]=v((...f)=>i.handlerCancel&&i.handlerCancel(...f),["prevent"])),title:"Annuler la modification des heures prévues"},bi)])):(l(),o("span",Di,[e("strong",wi,[e("span",Ci,c(r.person.unsend|t.heures),1),e("span",Pi,c(r.person.validate|t.heures),1),r.person.validating>0?(l(),o("span",Ai,c(r.person.validating|t.heures),1)):d("",!0),r.person.conflicts>0?(l(),o("span",Ui,c(r.person.conflicts|t.heures),1)):d("",!0),e("span",Si,[a(" / "+c(r.person.duration|t.heures)+" ",1),r.editable&&n.mode=="read"?(l(),o("a",{key:0,href:"#",onClick:s[5]||(s[5]=v((...f)=>i.handlerEdit&&i.handlerEdit(...f),["prevent"])),title:"Modifier les heures prévues"},Ei)):d("",!0)])])]))])])}const xi=E(ui,[["render",Vi]]),Ni={components:{workpackageperson:xi},data(){return{mode:"read",canSave:!1,formData:{id:-1,code:"",label:"",description:""}}},created(){this.workpackage.id<0&&(this.mode="edit")},props:{workpackage:null,persons:{default:function(){return[]}},editable:!1,isValidateur:!1,allowTooltip:{default:!1}},watch:{},methods:{isDeclarant(t,s){return s.persons.find(r=>r.person.id===t.id)},handlerEditWorkPackage(){this.formData=JSON.parse(JSON.stringify(this.workpackage)),this.mode="edit"},handlerCancelEdit(){this.workpackage.id<0?this.$emit("workpackagecancelnew",this.workpackage):this.mode="read"},handlerDeleteWorkPackage(){this.$emit("workpackagedelete",this.workpackage)},handlerUpdateWorkPackage(t){if(this.formData.code)this.$emit("workpackageupdate",this.formData),this.mode="read";else return t.stopPropagation(),t.stopImmediatePropagation(),!1},handlerUpdate(t,s){this.$emit("workpackagepersonupdate",t,s)},handlerDelete(t){this.$emit("workpackagepersondelete",t)},roles(t){return t.roles.join(",")},tempsPrevu(t){return 0},tempsDeclare(t){return 0}}},ji={class:"workpackage"},Oi={key:0},zi={key:1},Ri={class:"form-group"},Ii=e("label",{for:""},"Code",-1),Fi=e("p",{class:"text-danger"},[a("Le code est "),e("strong",null,"utilisé pour l'affichage des créneaux"),a(" simplifiés, utilisez un code de préférence entre 3 et 5 caractères.")],-1),Wi={class:"form-group"},Ti=e("label",{for:""},"Intitulé",-1),qi={class:"form-group"},Li=e("label",{for:""},"Description",-1),Ji={class:"buttons"},Hi={key:1},Bi={class:"workpackage-persons"},Yi=e("h4",null,[e("i",{class:"icon-calendar"}),a("Déclarants ")],-1),Gi={key:0,class:"buttons"},Ki={class:"btn-group"},Xi=e("button",{type:"button",class:"btn btn-default btn-xs dropdown-toggle","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},[a(" Ajouter un déclarant "),e("span",{class:"caret"})],-1),Qi={class:"dropdown-menu"},Zi=["onClick"],$i=e("i",{class:"icon-pencil"},null,-1),ea=e("i",{class:"icon-trash"},null,-1),ta={key:1,class:"text-danger"},sa=e("strong",null,"Seul les membres d'une activité peuvent être identifiés comme déclarant",-1);function na(t,s,r,k,n,i){const y=D("workpackageperson");return l(),o("article",ji,[n.mode=="edit"?(l(),o("form",{key:0,action:"",onSubmit:s[4]||(s[4]=v((...f)=>i.handlerUpdateWorkPackage&&i.handlerUpdateWorkPackage(...f),["prevent"]))},[e("h4",null,[r.workpackage.id>0?(l(),o("span",Oi,"Modification du lot")):(l(),o("span",zi,"Nouveau lot")),a(" "+c(n.formData.label),1)]),e("div",Ri,[Ii,Fi,C(e("input",{type:"text",placeholder:"CODE","onUpdate:modelValue":s[0]||(s[0]=f=>n.formData.code=f),class:"form-control"},null,512),[[x,n.formData.code]])]),e("div",Wi,[Ti,C(e("input",{type:"text",placeholder:"Intitulé","onUpdate:modelValue":s[1]||(s[1]=f=>n.formData.label=f),class:"form-control"},null,512),[[x,n.formData.label]])]),e("div",qi,[Li,C(e("textarea",{type:"text",placeholder:"Description","onUpdate:modelValue":s[2]||(s[2]=f=>n.formData.description=f),class:"form-control"},null,512),[[x,n.formData.description]])]),e("div",Ji,[e("button",{type:"submit",class:P(["btn btn-default btn-save",{disabled:!n.formData.code}])},"Enregistrer ",2),e("button",{type:"button",class:"btn btn-default",onClick:s[3]||(s[3]=(...f)=>i.handlerCancelEdit&&i.handlerCancelEdit(...f))},"Annuler")])],32)):d("",!0),n.mode=="read"?(l(),o("div",Hi,[e("h3",null,"["+c(r.workpackage.code)+"] "+c(r.workpackage.label),1),e("p",null,c(r.workpackage.description),1),e("section",Bi,[Yi,(l(!0),o(b,null,w(r.workpackage.persons,f=>(l(),I(y,{key:f.id,"allow-tooltip":r.allowTooltip,person:f,editable:r.editable,onWorkpackagepersondelete:i.handlerDelete,onWorkpackagepersonupdate:i.handlerUpdate},null,8,["allow-tooltip","person","editable","onWorkpackagepersondelete","onWorkpackagepersonupdate"]))),128))]),r.editable&&r.persons.length?(l(),o("div",Gi,[e("div",Ki,[Xi,e("ul",Qi,[(l(!0),o(b,null,w(r.persons,f=>(l(),o("li",{class:P({disabled:i.isDeclarant(f,r.workpackage)})},[e("a",{href:"#",onClick:v(h=>t.$emit("addperson",f.id,r.workpackage.id),["prevent"])},c(f.displayname),9,Zi)],2))),256))])]),e("a",{href:"#",class:"btn btn-default btn-xs",onClick:s[5]||(s[5]=v((...f)=>i.handlerEditWorkPackage&&i.handlerEditWorkPackage(...f),["prevent"]))},[$i,a("Modifier")]),e("a",{href:"#",class:"btn btn-default btn-xs",onClick:s[6]||(s[6]=v((...f)=>i.handlerDeleteWorkPackage&&i.handlerDeleteWorkPackage(...f),["prevent"]))},[ea,a("Supprimer")])])):d("",!0),r.persons.length<=0?(l(),o("div",ta,[a(" Vous n'avez pas encore ajouté de membre à cette activité. "),sa,a(". ")])):d("",!0)])):d("",!0)])}const la=E(Ni,[["render",na]]);const oa={components:{Workpackage:la},data(){return{loading:!1,errors:[],isDeclarant:!1,isValidateur:!1,confirm:null,confirmData:null,confirmHandler:null,editedWorlpackage:null}},props:{url:{required:!0},editable:{required:!1,default:!1},allowTooltip:{default:!1},isValidateur:{required:!0},outsidePerson:{required:!0},persons:{required:!0},workpackages:{required:!0},debugEnabled:{default:!1}},methods:{handlerWorkPackageCancelNew(t){this.workpackages.splice(this.workpackages.indexOf(t),1)},handlerWorkPackageNew(){this.workpackages.push({id:-1,code:"Nouveau Lot",label:"",persons:[],description:""})},handlerConfirm(){console.log("handlerConfirm"),this.confirmHandler(this.confirmData),this.confirm=null},handlerWorkPackagePersonDelete(t){this.confirm="Supprimer le déclarant ?",this.confirmData=t,this.confirmHandler=this.handlerWorkPackagePersonDeleteDo},handlerWorkPackagePersonDeleteDo(t){S.delete(this.url+"?workpackagepersonid="+t.id).then(s=>{this.fetch()},s=>{this.errors.push("Impossible de supprimer le déclarant : "+s.body)})},handlerWorkPackageDelete(t){this.confirm="Supprimer le lot de travail ?",this.confirmData=t,this.confirmHandler=this.handlerWorkPackageDeleteDo},handlerWorkPackageDeleteDo(t){S.delete(this.url+"?workpackageid="+t.id).then(s=>{this.fetch()},s=>{this.errors.push("Impossible de supprimer le lot : "+s.body)})},handlerWorkPackageUpdate(t){var s=new FormData;for(var r in t)s.append(r,t[r]);if(t.id>0)console.log("MAJ du LOT"),s.append("workpackageid",t.id),S.post(this.url,s).then(k=>{this.fetch()},k=>{this.errors.push("Impossible de mettre à jour le lot de travail : "+k.body)});else{console.log("NOUVEAU du LOT ",this.url);let k=JSON.parse(JSON.stringify(t));k.workpackageid=-1,S.put(this.url,k).then(n=>{this.fetch()},n=>{this.errors.push("Impossible de créer le lot de travail : "+n.body)}).then(n=>this.fetch())}},handlerUpdateWorkPackagePerson(t,s){var r=new FormData;r.append("workpackagepersonid",t.id),r.append("duration",s),S.post(this.url,r).then(k=>{t.duration=s},k=>{this.errors.push("Impossible de mettre à jour les heures prévues : "+k.body)})},addperson(t,s){console.log(arguments);var r={idworkpackage:s,idperson:t};S.put(this.url,r).then(k=>{this.fetch()},k=>{this.errors.push("Impossible d'ajouter le déclarant : "+k.body)}).then(()=>this.loading=!1)},fetch(){this.loading="Chargement des lots de travails",console.log(this.url),S.get(this.url+"?v=2").then(t=>{console.log("Chargement des lots de travail : ",t);try{let s=t.data.datas.workpackages;this.$emit("update",s)}catch(s){this.errors.push("UI ERROR "+s)}},t=>{this.errors.push(z.manageErrorResponse(t).message)}).then(()=>this.loading=!1)},fetchPersons(){this.fetch()}}},ee=t=>(T("data-v-7f36a26b"),t=t(),q(),t),ia={key:0,class:"vue-loader"},aa={class:"alert alert-danger"},ra=["onClick"],da=ee(()=>e("i",{class:"icon-cancel-outline"},null,-1)),ca=[da],ua={key:0,class:"overlay"},ha={class:"overlay-content"},ma={class:"overlay-title"},pa={class:"buttons"},_a={class:"admin-bar"},fa=ee(()=>e("i",{class:"icon-book"},null,-1)),va=ee(()=>e("i",{class:"icon-bug"},null,-1)),ga={class:"workpackages"};function ya(t,s,r,k,n,i){const y=D("workpackage");return l(),o("section",null,[g(M,{name:"fade"},{default:A(()=>[n.errors.length?(l(),o("div",ia,[(l(!0),o(b,null,w(n.errors,(f,h)=>(l(),o("div",aa,[a(c(f)+" ",1),e("a",{href:"",onClick:v(V=>n.errors.splice(h,1),["prevent"])},ca,8,ra)]))),256))])):d("",!0)]),_:1}),g(M,{name:"fade"},{default:A(()=>[n.confirm?(l(),o("div",ua,[e("div",ha,[e("div",ma,[a(c(n.confirm)+" ",1),e("a",{href:"#",class:"overlay-closer",onClick:s[0]||(s[0]=v(f=>n.confirm=null,["prevent"]))},"x")]),e("nav",pa,[e("a",{href:"#",class:"btn btn-danger",onClick:s[1]||(s[1]=v(f=>n.confirm=null,["prevent"]))},"Annuler"),e("a",{href:"#",class:"btn btn-danger",onClick:s[2]||(s[2]=v(f=>i.handlerConfirm(),["prevent"]))},"Confirmer")])])])):d("",!0)]),_:1}),e("nav",_a,[e("a",{href:"",class:"btn btn-primary btn-xs",onClick:s[3]||(s[3]=v((...f)=>i.handlerWorkPackageNew&&i.handlerWorkPackageNew(...f),["prevent"]))},[fa,a(" Nouveau lot")]),r.debugEnabled?(l(),o("a",{key:0,href:"",class:"btn btn-warning btn-xs",onClick:s[4]||(s[4]=v((...f)=>i.fetch&&i.fetch(...f),["prevent"]))},[va,a(" fetch")])):d("",!0)]),e("section",ga,[(l(!0),o(b,null,w(r.workpackages,f=>(l(),I(y,{key:f.id,"allow-tooltip":r.allowTooltip,workpackage:f,persons:r.persons,editable:r.editable,"is-validateur":r.isValidateur,onAddperson:i.addperson,onWorkpackageupdate:i.handlerWorkPackageUpdate,onWorkpackagepersonupdate:i.handlerUpdateWorkPackagePerson,onWorkpackagepersondelete:i.handlerWorkPackagePersonDelete,onWorkpackagedelete:i.handlerWorkPackageDelete,onWorkpackagecancelnew:i.handlerWorkPackageCancelNew},null,8,["allow-tooltip","workpackage","persons","editable","is-validateur","onAddperson","onWorkpackageupdate","onWorkpackagepersonupdate","onWorkpackagepersondelete","onWorkpackagedelete","onWorkpackagecancelnew"]))),128))])])}const ka=E(oa,[["render",ya],["__scopeId","data-v-7f36a26b"]]);S.defaults.headers.common.Accept="application/json";S.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const L="activities_sticky",ba={name:"Activity",components:{ActivityAvenants:vs,ActivityNotes:ke,ActivityLogs:ye,ActivityDocument:ge,ActivitySpentSynthesis:be,EntityWithRole:De,Loader:we,Payments:Fo,PersonCartouche:ci,PersonDisplay:ne,Milestones:$n,Modal:se,VueJsonPretty:ce,WorkpackagesActivity:ka},props:{url:{required:!0},debugEnabled:{required:!1,type:Boolean,default:!1}},data(){return{administration:null,avenants:null,budget:null,core:null,credentials:null,currencies:[],documents:[],milestones:[],milestonesTypes:[],milestonesUrl:null,milestonesUrlNotifications:null,notes:null,notes_url:null,payments:[],paymentsUrl:null,persons:null,personsUrl:null,personsUrlNew:null,rolesOrganizations:null,rolesPersons:null,timesheets:null,timesheetsDeclarers:null,timesheetsValidators:null,timesheetsUrl:null,timesheetsUrlSynthesis:null,organizations:null,organizationsUrl:null,organizationsUrlNew:null,workpackages:null,workpackagesUrl:null,spents:null,activity:{},duplicateDatas:null,sticky:[],descriptionFull:!1,debug_content:null,debug_displayed:!1,error:null,loading:!0}},computed:{personsWP(){if(this.persons){let t={};return this.persons.forEach(s=>{t.hasOwnProperty(s.enrolled)||(t[s.enrolled]={id:s.enrolled,displayname:s.enrolledLabel,firstname:s.firstname,lastname:s.lastname})}),Object.values(t)}else return[]},storage(){return localStorage.getItem(L)},isSticky(){return this.sticky.find(t=>t.id==this.core.id)},labelReduced(){let t=this.core.label;return t.length>50?t.substr(0,50)+"...":t}},methods:{performLock(t){S.post(this.url,{action:t}).then(s=>{this.fetch()},s=>{let r=z.manageErrorResponse(s).message;R.commit("addError",r)})},handlerUnlock(){this.performLock("lock")},handlerLock(){this.performLock("unlock")},testError(t,s="Une erreur affichée"){R.commit("addError",s)},handlerHelp(t){R.dispatch("displayHelp",t)},handlerDebug(t){this.debug_content=t,this.debug_displayed=!0},handlerDebugHide(){this.debug_displayed=!1},handlerDebugShow(t){this.debug_content=JSON.parse(JSON.stringify(t)),this.debug_displayed=!0},handlerError(t){this.error=t.message},handlerUpdateWorkpackages(t){this.workpackages=t.entities},handlerUpdateNotes(t){this.notes=t.entities},handlerUpdatePayments(t){this.payments=t.entities,this.currencies=t.currencies,this.paymentsUrl=t.url},handlerUpdateMilestones(t){this.milestones=t},handlerUpdatePersons(t){this.persons=t.datas.items},handlerUpdateOrganizations(t){this.organizations=t.datas.items},handlerUpdateDocuments(t){console.log(t),this.documents=t},handlerUpdateAvenants(t){console.log("AVENANTS",t),this.avenants=t},handlerPurgeSticky(){this.sticky=[],localStorage.removeItem(L)},toogleSticky(){this.isSticky?this.handlerUnSticky():this.handlerSticky()},handlerUnSticky(){this.sticky.forEach((t,s)=>{t.id==this.core.id&&this.sticky.splice(s,1)}),localStorage.setItem(L,JSON.stringify(this.sticky))},handlerSticky(){this.sticky.push({id:this.core.id,label:this.core.label,num:this.core.numOscar,location:document.location.href}),localStorage.setItem(L,JSON.stringify(this.sticky))},handlerNavigateSticky(t){t.location&&(document.location=t.location)},test(){console.log(localStorage.getItem())},fetch(){this.loading=!0,S.get(this.url).then(t=>{this.budget=t.data.activity.datas.budget,this.core=t.data.activity.datas.core,t.data.activity.datas.spents&&(this.spents=t.data.activity.datas.spents),t.data.activity.datas.avenants&&this.handlerUpdateAvenants(t.data.activity.datas.avenants),t.data.activity.datas.administration&&(this.administration=t.data.activity.datas.administration),t.data.activity.datas.documents&&this.handlerUpdateDocuments(t.data.activity.datas.documents),t.data.activity.datas.notes&&(this.notes=t.data.activity.datas.notes.entities,this.notes_url=t.data.activity.datas.notes.url),t.data.activity.datas.milestones&&(this.milestones=t.data.activity.datas.milestones.entities,this.milestonesTypes=t.data.activity.datas.milestones.types,this.milestonesUrl=t.data.activity.datas.milestones.url,this.milestonesUrlNotifications=t.data.activity.datas.milestones.urlNotifications),t.data.activity.datas.organizations&&(this.organizations=t.data.activity.datas.organizations.entities,this.organizationsUrl=t.data.activity.datas.organizations.url,this.organizationsUrlNew=t.data.activity.datas.organizations.urlNew,this.rolesOrganizations=t.data.activity.datas.organizations.roles),t.data.activity.datas.payments&&this.handlerUpdatePayments(t.data.activity.datas.payments),t.data.activity.datas.persons&&(this.persons=t.data.activity.datas.persons.entities,this.personsUrlNew=t.data.activity.datas.persons.urlNew,this.personsUrl=t.data.activity.datas.persons.url,this.rolesPersons=t.data.activity.datas.persons.roles),t.data.activity.datas.timesheets?(this.timesheets=t.data.activity.datas.timesheets,this.timesheetsValidators=t.data.activity.datas.timesheets.validators,this.timesheetsDeclarers=t.data.activity.datas.timesheets.declarers,this.timesheetsUrl=t.data.activity.datas.timesheets.url,this.timesheetsUrlSynthesis=t.data.activity.datas.timesheets.urlSynthesis):console.log("pas de donnée FEUILLE DE TEMPS"),t.data.activity.datas.workpackages?(this.workpackages=t.data.activity.datas.workpackages.entities,this.workpackagesUrl=t.data.activity.datas.workpackages.url):console.log("pas de donnée LOTS DE TRAVAIL"),this.credentials=t.data.activity.credentials},t=>{this.handlerError(z.manageErrorResponse(t))}).finally(t=>{this.loading=!1})},handlerDuplicate(){this.duplicateDatas={displayed:!1,keepPersons:!0,keepOrganizations:!0,keepMilestones:!0,keepWorkpackages:!1,keepAdmData:!1}},handlerDuplicateDo(){document.location=this.core.urls.duplicate+"?"+(this.duplicateDatas.keepPersons?"&keeppersons=on":"")+(this.duplicateDatas.keepOrganizations?"&keeporganizations=on":"")+(this.duplicateDatas.keepMilestones?"&keepmilestones=on":"")+(this.duplicateDatas.keepWorkpackages?"&keepworkpackage=on":"")+(this.duplicateDatas.keepAdmData?"&keepadmdata=on":"")},handlerShowProject(){this.activity.project.url_show&&(document.location=this.activity.project.url_show)}},mounted(){this.fetch();let t=localStorage.getItem(L);t?t=JSON.parse(t):t=[],this.sticky=t}},m=t=>(T("data-v-8de60033"),t=t(),q(),t),Da={class:"alert alert-danger"},wa={key:0,class:"overlay"},Ca={class:"overlay-content"},Pa=m(()=>e("h1",{class:"overlay-title"},"Dupliquer cette activité",-1)),Aa={class:"row",style:{width:"80%"}},Ua={class:"col-md-6 col-md-offset-3"},Sa=m(()=>e("small",null,"Options de copie pour",-1)),Ma=m(()=>e("br",null,null,-1)),Ea={class:"col-md-6 col-md-offset-3"},Va={class:"list-group-item separator-bottom"},xa=m(()=>e("strong",null,[e("i",{class:"icon-group"}),a(" Reprendre les personnes ")],-1)),Na={class:"material-switch pull-right"},ja=m(()=>e("label",{for:"keeppersons",class:"label-primary"},null,-1)),Oa={class:"list-group-item separator-bottom"},za=m(()=>e("strong",null,[e("i",{class:"icon-calendar"}),a(" Reprendre les jalons ")],-1)),Ra={class:"material-switch pull-right"},Ia=m(()=>e("label",{for:"keepmilestones",class:"label-primary"},null,-1)),Fa={class:"list-group-item separator-bottom"},Wa=m(()=>e("strong",null,[e("i",{class:"icon-building-filled"}),a(" Reprendre les organisations ")],-1)),Ta={class:"material-switch pull-right"},qa=m(()=>e("label",{for:"keeporganizations",class:"label-primary"},null,-1)),La={class:"list-group-item separator-bottom"},Ja=m(()=>e("strong",null,[e("i",{class:"icon-archive"}),a(" Reprendre les lots de travail ")],-1)),Ha={class:"material-switch pull-right"},Ba=m(()=>e("label",{for:"keepworkpackages",class:"label-primary"},null,-1)),Ya={class:"list-group-item separator-bottom"},Ga=m(()=>e("strong",null,[e("i",{class:"icon-archive"}),a(" Reprendre les données de base ")],-1)),Ka=m(()=>e("br",null,null,-1)),Xa=m(()=>e("small",null,"Données du formulaire de créaton : Dates de début / fin, intitulé, description, type, etc...",-1)),Qa={class:"material-switch pull-right"},Za=m(()=>e("label",{for:"keepadmdata",class:"label-primary"},null,-1)),$a={class:"text-center"},er={key:1},tr={class:"navbar navbar-default navbar-fixed-top",style:{top:"50px","z-index":"500"}},sr={class:"container"},nr={class:"navbar-header"},lr=he('',1),or={class:"navbar-brand",href:"#"},ir=m(()=>e("i",{class:"icon-cube"},null,-1)),ar={class:"collapse navbar-collapse",id:"bs-example-navbar-collapse-1"},rr={class:"nav navbar-nav"},dr={key:0,href:"#members"},cr={key:0,href:"#partners"},ur={key:0,href:"#documents"},hr={key:0,href:"#milestones"},mr={key:0,href:"#notes"},pr={key:0,href:"#payments"},_r={key:0,href:"#spents"},fr={key:0,href:"#timesheets"},vr={class:"nav navbar-nav navbar-right"},gr={class:"dropdown"},yr=m(()=>e("a",{href:"#",class:"dropdown-toggle","data-toggle":"dropdown",role:"button","aria-haspopup":"true","aria-expanded":"false"},[e("i",{class:"icon-pin text-primary"}),e("span",{class:"caret"})],-1)),kr={class:"dropdown-menu"},br={key:0},Dr={key:1},wr=m(()=>e("i",{class:"icon-pin-outline"},null,-1)),Cr=m(()=>e("li",{role:"separator",class:"divider"},null,-1)),Pr=["onClick"],Ar=m(()=>e("i",{class:"icon-cube"},null,-1)),Ur={key:0,class:"icon-link-ext"},Sr=m(()=>e("li",{role:"separator",class:"divider"},null,-1)),Mr=m(()=>e("i",{class:"icon-trash"},null,-1)),Er={class:"jumbotron activity-header oscar-header",style:{"margin-top":"60px"}},Vr={class:"row line-bottom"},xr={class:"col-md-9"},Nr={class:"activity-project"},jr=m(()=>e("i",{class:"icon-cubes"},null,-1)),Or={key:0},zr={key:1},Rr=["href"],Ir={key:0},Fr={key:1},Wr={class:"activity-type"},Tr=m(()=>e("i",{class:"icon-tag"},null,-1)),qr={class:"type-chain"},Lr=m(()=>e("i",{class:"icon-cube"},null,-1)),Jr={class:"col-md-3"},Hr={key:0,class:"budget"},Br=m(()=>e("em",null,"Montant",-1)),Yr={class:"text-private amount"},Gr={class:"details"},Kr={class:"text-private"},Xr={key:0,class:"text-private"},Qr={class:"text-private"},Zr={class:"text-private"},$r={class:"text-private"},ed={class:"row"},td={class:"col-md-4"},sd=m(()=>e("h4",null,[e("i",{class:"icon-calendar"}),a("Dates")],-1)),nd={class:"texthighlight baseline"},ld={class:"aggo"},od=m(()=>e("br",null,null,-1)),id={class:"aggo"},ad=m(()=>e("br",null,null,-1)),rd={class:"aggo"},dd=m(()=>e("br",null,null,-1)),cd={class:"aggo"},ud={class:"col-md-4"},hd=m(()=>e("h4",null,[e("i",{class:"icon-briefcase"}),a("Numérotations")],-1)),md={class:"texthighlight baseline"},pd=m(()=>e("br",null,null,-1)),_d={key:0,class:"text-private"},fd={key:1,class:"text-private"},vd=m(()=>e("br",null,null,-1)),gd={class:"texthighlight baseline"},yd={class:"col-md-4"},kd=m(()=>e("h4",null,[e("i",{class:"icon-database-1"}),a("Divers")],-1)),bd={class:"texthighlight baseline"},Dd=m(()=>e("br",null,null,-1)),wd={class:"row line-bottom"},Cd={class:"col-md-4"},Pd=m(()=>e("h4",null,[e("i",{class:"icon-tags"}),a("Métas-données")],-1)),Ad={class:"texthighlight baseline"},Ud={class:"cartouche xs"},Sd={class:"texthighlight baseline"},Md={class:"cartouche complementary",style:{"line-break":"anywhere"}},Ed=m(()=>e("i",{class:"icon-tag"},null,-1)),Vd={class:"row"},xd={class:"col-md-12"},Nd={class:"admin-bar"},jd=m(()=>e("i",{class:"icon-lock-open"},null,-1)),Od=m(()=>e("i",{class:"icon-lock"},null,-1)),zd={key:1},Rd={key:0,class:"btn btn-default disabled"},Id=m(()=>e("i",{class:"icon-lock"},null,-1)),Fd=["href"],Wd=m(()=>e("i",{class:"icon-pencil"},null,-1)),Td=["href"],qd=m(()=>e("i",{class:"icon-cubes"},null,-1)),Ld=["href"],Jd=m(()=>e("i",{class:"icon-cubes"},null,-1)),Hd=m(()=>e("i",{class:"icon-paste"},null,-1)),Bd=m(()=>e("i",{class:"icon-bug"},null,-1)),Yd=m(()=>e("i",{class:"icon-bug"},null,-1)),Gd={class:"container-fluid"},Kd={class:"col-md-8"},Xd={key:0,class:"section-infos",id:"members"},Qd=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-group"}),a("Membres")])],-1)),Zd={key:1,class:"section-infos",id:"partners"},$d=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-building-filled"}),a("Partenaires")])],-1)),ec={key:2,class:"section-infos",id:"avenants"},tc=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-hammer"}),a(" Avenants ")])],-1)),sc={key:3,class:"section-infos",id:"documents"},nc=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-book"}),a("Documents")])],-1)),lc={key:4,class:"section-infos",id:"notes"},oc=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-comment"}),a("Notes")])],-1)),ic={key:5,id:"timesheets",class:"section-infos"},ac=m(()=>e("h2",{class:"section-title"},[e("span",null,[e("i",{class:"icon-book"}),a("Feuille de temps")])],-1)),rc={key:0,class:"alert alert-info"},dc={key:1},cc={class:"oscar-section"},uc=m(()=>e("h3",{class:"oscar-section-title"},[e("span",null,[e("i",{class:"icon-calendar"}),a("Général")])],-1)),hc={class:"oscar-section-content"},mc=["href"],pc=m(()=>e("i",{class:"icon-calendar"},null,-1)),_c=["href"],fc=m(()=>e("i",{class:"icon-book"},null,-1)),vc={key:0},gc={class:"oscar-section"},yc=m(()=>e("h3",{class:"oscar-section-title"},[e("span",null,[e("i",{class:"icon-group"}),a("Déclarants")])],-1)),kc={class:"oscar-section-content"},bc={key:0},Dc=["href"],wc={key:0},Cc={key:1,class:"alert-warning alert"},Pc=m(()=>e("strong",null,"Lots de travail",-1)),Ac={class:"oscar-section"},Uc={class:"oscar-section-title"},Sc=m(()=>e("span",{class:"text"},[e("i",{class:"icon-user-md"}),a(" Valideurs ")],-1)),Mc=["href"],Ec=m(()=>e("i",{class:"icon-user-md"},null,-1)),Vc={class:"row oscar-section-content"},xc={class:"col-md-4"},Nc=m(()=>e("h4",null,[e("i",{class:"icon-cube"}),a("Validation projet")],-1)),jc={key:0,class:"alert alert-warning"},Oc={class:"cartouche primary person"},zc={class:"col-md-4"},Rc=m(()=>e("h4",null,[e("i",{class:"icon-beaker"}),a("Validation scientifique")],-1)),Ic={key:0,class:"alert alert-warning"},Fc={class:"cartouche person primary"},Wc={class:"col-md-4"},Tc=m(()=>e("h4",null,[e("i",{class:"icon-book"}),a("Validation administrative")],-1)),qc={key:0,class:"alert alert-warning"},Lc={class:"cartouche person primary"},Jc={class:"oscar-section"},Hc=m(()=>e("h3",{class:"oscar-section-title"},[e("span",null,[e("i",{class:"icon-archive"}),a("Lots de travail")])],-1)),Bc={class:"oscar-section-content"},Yc={class:"col-md-4"},Gc={key:0,id:"milestones",class:"section-infos"},Kc=m(()=>e("span",null,[e("h2",null,[e("i",{class:"icon-calendar"}),a("Jalons")])],-1)),Xc=["href"],Qc=m(()=>e("i",{class:"icon-bell"},null,-1)),Zc={key:1,id:"payments",class:"section-infos"},$c=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-bank"}),a("Versements")])],-1)),eu={key:2,id:"spents",class:"section-infos"},tu=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-bank"}),a("Dépenses")])],-1)),su={key:0,class:"alert alert-warning"},nu={key:1},lu={class:"buttons xs"},ou=["href"],iu=m(()=>e("i",{class:"icon-file-excel"},null,-1)),au=["href"],ru=m(()=>e("i",{class:"icon-file-excel"},null,-1)),du={class:"section-infos"},cu=m(()=>e("h2",null,"PCRU",-1)),uu=["href"],hu={key:0,class:"container-fluid activity-fiche"},mu={class:"row"},pu={class:"col-md-12"},_u=m(()=>e("h2",null,[e("span",null,[e("i",{class:"icon-cog"}),a("Technique")])],-1)),fu={key:2};function vu(t,s,r,k,n,i){const y=D("loader"),f=D("VueJsonPretty"),h=D("modal"),V=D("EntityWithRole"),G=D("activity-avenants"),K=D("activity-document"),H=D("activity-notes"),u=D("PersonDisplay"),_=D("workpackages-activity"),O=D("Milestones"),oe=D("Payments"),ie=D("ActivitySpentSynthesis"),ae=D("ActivityLogs");return l(),o(b,null,[g(y,{text:"Chargement de l'activité",visible:n.loading},null,8,["visible"]),g(h,{title:"Debugger","title-icon":"icon-bug",visible:n.debug_displayed,onModalCancel:s[1]||(s[1]=p=>n.debug_displayed=!1)},{buttons:A(()=>[e("button",{class:"btn btn-default",onClick:s[0]||(s[0]=(...p)=>i.handlerDebugHide&&i.handlerDebugHide(...p))},"FERMER")]),default:A(()=>[g(f,{data:n.debug_content},null,8,["data"])]),_:1},8,["visible"]),g(h,{title:"Une erreur est survenue","title-icon":"icon-bug",visible:n.error!=null},{buttons:A(()=>[e("button",{class:"btn btn-default",onClick:s[2]||(s[2]=p=>n.error=null)},"FERMER")]),default:A(()=>[e("div",Da,c(n.error),1)]),_:1},8,["visible"]),n.duplicateDatas!=null?(l(),o("div",wa,[e("div",Ca,[Pa,e("a",{class:"overlay-closer",onClick:s[3]||(s[3]=p=>n.duplicateDatas=null)},"x"),e("div",Aa,[e("h1",Ua,[Sa,a(),Ma,e("strong",null,c(n.core.label),1)]),e("div",Ea,[e("div",Va,[xa,e("div",Na,[C(e("input",{id:"keeppersons",name:"keeppersons",type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=p=>n.duplicateDatas.keepPersons=p)},null,512),[[W,n.duplicateDatas.keepPersons]]),ja])]),e("div",Oa,[za,e("div",Ra,[C(e("input",{id:"keepmilestones",name:"keepmilestones",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=p=>n.duplicateDatas.keepMilestones=p)},null,512),[[W,n.duplicateDatas.keepMilestones]]),Ia])]),e("div",Fa,[Wa,e("div",Ta,[C(e("input",{id:"keeporganizations",name:"keeporganizations",type:"checkbox","onUpdate:modelValue":s[6]||(s[6]=p=>n.duplicateDatas.keepOrganizations=p)},null,512),[[W,n.duplicateDatas.keepOrganizations]]),qa])]),e("div",La,[Ja,e("div",Ha,[C(e("input",{id:"keepworkpackages",name:"keepworkpackages",type:"checkbox","onUpdate:modelValue":s[7]||(s[7]=p=>n.duplicateDatas.keepWorkpackages=p)},null,512),[[W,n.duplicateDatas.keepWorkpackages]]),Ba])]),e("div",Ya,[Ga,Ka,Xa,e("div",Qa,[C(e("input",{id:"keepadmdata",name:"keepadmdata",type:"checkbox","onUpdate:modelValue":s[8]||(s[8]=p=>n.duplicateDatas.keepAdmData=p)},null,512),[[W,n.duplicateDatas.keepAdmData]]),Za])]),e("nav",$a,[e("a",{href:"#",class:"btn btn-primary",onClick:s[9]||(s[9]=p=>n.duplicateDatas=null)},"Annuler"),e("a",{href:"#",class:"btn btn-default",onClick:s[10]||(s[10]=(...p)=>i.handlerDuplicateDo&&i.handlerDuplicateDo(...p))},"Dupliquer l'activité")])])])])])):d("",!0),n.core&&n.credentials&&n.credentials.read?(l(),o("div",er,[e("nav",tr,[e("div",sr,[e("div",nr,[lr,e("a",or,[ir,e("strong",null,c(n.core.numOscar),1),e("span",null," / "+c(i.labelReduced),1),e("i",{class:"icon-pin",style:ue({opacity:i.isSticky?1:.3}),onClick:s[11]||(s[11]=(...p)=>i.toogleSticky&&i.toogleSticky(...p))},null,4)])]),e("div",ar,[e("ul",rr,[e("li",null,[n.credentials.persons.read?(l(),o("a",dr,"Membres")):d("",!0)]),e("li",null,[n.credentials.organizations.read?(l(),o("a",cr,"Partenaires")):d("",!0)]),e("li",null,[n.credentials.documents.read?(l(),o("a",ur,"Documents")):d("",!0)]),e("li",null,[n.credentials.milestones.read?(l(),o("a",hr,"Jalons")):d("",!0)]),e("li",null,[n.credentials.notes.read?(l(),o("a",mr,"Notes")):d("",!0)]),e("li",null,[n.credentials.budget.read?(l(),o("a",pr,"Versements")):d("",!0)]),e("li",null,[n.credentials.spents.read?(l(),o("a",_r,"Dépenses")):d("",!0)]),e("li",null,[n.credentials.timesheets.read?(l(),o("a",fr,"Feuilles de temps")):d("",!0)])]),e("ul",vr,[e("li",gr,[yr,e("ul",kr,[i.isSticky?(l(),o("li",br,[e("a",{href:"#",onClick:s[12]||(s[12]=(...p)=>i.handlerUnSticky&&i.handlerUnSticky(...p))},"Désépingler")])):(l(),o("li",Dr,[e("a",{href:"#",onClick:s[13]||(s[13]=v((...p)=>i.handlerSticky&&i.handlerSticky(...p),["prevent"]))},[wr,a(" Epingler")])])),Cr,(l(!0),o(b,null,w(n.sticky,p=>(l(),o("li",{class:P(p.id==n.core.id?"disabled":"")},[e("a",{href:"#",onClick:te=>i.handlerNavigateSticky(p)},[Ar,e("strong",null,c(p.num),1),e("em",null,c(p.label),1),p.id!=n.core.id?(l(),o("i",Ur)):d("",!0)],8,Pr)],2))),256)),Sr,e("li",null,[e("a",{href:"#",onClick:s[14]||(s[14]=v((...p)=>i.handlerPurgeSticky&&i.handlerPurgeSticky(...p),["prevent"]))},[Mr,a(" Supprimer les épingles ")])])])])])])])]),e("header",Er,[e("div",Vr,[e("div",xr,[e("h4",Nr,[jr,a(" "),n.core.project===null?(l(),o("em",Or,"Aucun Projet")):(l(),o("span",zr,[n.credentials.project.read?(l(),o("a",{key:0,href:n.core.project.url_show},[n.core.project.acronym?(l(),o("strong",Ir,c(n.core.project.acronym)+" ",1)):d("",!0),e("em",null,c(n.core.project.label),1)],8,Rr)):(l(),o("span",Fr,[e("strong",null,c(n.core.project.acronym),1),e("em",null,c(n.core.project.label),1)]))]))]),e("h3",null,[e("span",{class:P(["picto status-","status-"+n.core.status])},[e("i",{class:P(["icon","icon-"+n.core.status])},null,2),a(" "+c(n.core.status_label),1)],2),e("span",Wr,[Tr,e("span",qr,[e("i",{class:P(n.core.type_slug)},null,2),(l(!0),o(b,null,w(n.core.type_chain,p=>(l(),o("span",null,c(p.label),1))),256))])])]),e("h1",null,[e("span",null,[Lr,a(" "+c(n.core.label),1)])])]),e("div",Jr,[n.budget&&n.credentials.budget.read?(l(),o("div",Hr,[Br,e("strong",Yr,c(t.$filters.money(n.budget.montant))+" "+c(n.budget.currency.symbol),1),e("div",Gr,[e("small",null,[a(" Frais de gestion : "),e("b",Kr,c(n.budget.fraisDeGestion),1)]),e("small",null,[a(" Part unité : "),n.budget.fraisDeGestionPartUnite?(l(),o("b",Xr,c(n.budget.fraisDeGestionPartUnite),1)):d("",!0)]),e("small",null,[a(" Part hébergeur : "),e("b",Qr,c(n.budget.fraisDeGestionPartHebergeur),1)]),e("small",null,[a(" Part Gestionnaire : "),e("b",Zr,c(n.budget.fraisDeGestionPartGestionnaire),1)]),e("small",null,[a(" TVA : "),e("b",$r,c(n.budget.tva),1)])])])):d("",!0)])]),n.core.description?(l(),o("p",{key:0,class:P(["baseline",{descriptionPacked:!n.descriptionFull}]),onClick:s[15]||(s[15]=p=>n.descriptionFull=!n.descriptionFull)},[e("small",null,c(n.core.description),1)],2)):d("",!0),e("div",ed,[e("div",td,[sd,e("p",nd,[a(" Début : "),e("time",null,c(t.$filters.date(n.core.dateStart)),1),e("small",ld," ("+c(t.$filters.timeAgo(n.core.dateStart))+")",1),od,a(" Fin : "),e("time",null,c(t.$filters.dateFull(n.core.dateEnd)),1),e("small",id," ("+c(t.$filters.timeAgo(n.core.dateEnd))+")",1),ad,a(" Signé le : "),e("time",null,c(t.$filters.dateFull(n.core.dateSigned)),1),e("small",rd," ("+c(t.$filters.timeAgo(n.core.dateSigned))+")",1),dd,a(" Date de début des négociations : "),e("time",null,c(t.$filters.dateFull(n.core.dateNegociation)),1),e("small",cd," ("+c(t.$filters.timeAgo(n.core.dateNegociation))+")",1)])]),e("div",ud,[hd,e("p",md,[a(' N° Oscar" : '),e("strong",null,c(n.core.numOscar),1),pd,a(" Numéro financier : "),n.core.pfi?(l(),o("strong",_d,c(n.core.pfi),1)):(l(),o("strong",fd,"AUCUN")),a(" - Ouverture du PFI le "),e("time",null,c(t.$filters.dateFull(n.core.dateOpened)),1),vd]),(l(!0),o(b,null,w(n.core.numeros,(p,te)=>(l(),o("p",gd,[a(c(te)+" : ",1),e("strong",null,c(p),1)]))),256))]),e("div",yd,[kd,e("p",bd,[a(" Création "),e("time",null,c(t.$filters.dateFull(n.core.dateCreated)),1),Dd,a(" Dernière MAJ "),e("time",null,c(t.$filters.dateFull(n.core.dateUpdated)),1)])])]),e("div",wd,[e("div",Cd,[Pd,e("p",Ad,[a(" Disciplines : "),(l(!0),o(b,null,w(n.core.disciplines,p=>(l(),o("span",Ud,c(p),1))),256))]),e("p",Sd,[a(" Mots clés : "),(l(!0),o(b,null,w(n.core.motscles,p=>(l(),o("span",Md,[Ed,a(" "+c(p),1)]))),256))])])]),e("div",Vd,[e("div",xd,[e("nav",Nd,[n.credentials.lock_edit?(l(),o(b,{key:0},[n.credentials.lock?(l(),o("a",{key:0,class:"btn btn-info",onClick:s[16]||(s[16]=p=>i.handlerLock())},[jd,a(" Déverrouiller")])):(l(),o("a",{key:1,class:"btn btn-info",onClick:s[17]||(s[17]=p=>i.handlerUnlock())},[Od,a(" Vérrouiller")]))],64)):n.credentials.lock?(l(),o("span",zd,[n.credentials.lock?(l(),o("strong",Rd,[Id,a(" VERROUILLEE ")])):d("",!0)])):d("",!0),n.credentials.core.edit?(l(),o("a",{key:2,class:"btn btn-primary",href:n.core.urls.edit},[Wd,a(" Modifier les informations")],8,Fd)):d("",!0),n.credentials.core.change_project?(l(),o("a",{key:3,class:"btn btn-default",href:n.core.urls.change_project},[qd,a(" Modifier le projet")],8,Td)):d("",!0),n.credentials.core.new_project?(l(),o("a",{key:4,class:"btn btn-default",href:n.core.urls.new_project},[Jd,a(" Créer un nouveau projet")],8,Ld)):d("",!0),n.core.urls.duplicate?(l(),o("a",{key:5,class:"btn btn-default",onClick:s[18]||(s[18]=(...p)=>i.handlerDuplicate&&i.handlerDuplicate(...p))},[Hd,a(" Dupliquer")])):d("",!0),r.debugEnabled?(l(),o("a",{key:6,class:"btn btn-warning",onClick:s[19]||(s[19]=p=>i.handlerDebugShow(t.$data))},[Bd,a(" Afficher le modèle")])):d("",!0),r.debugEnabled?(l(),o("a",{key:7,class:"btn btn-warning",onClick:s[20]||(s[20]=(...p)=>i.fetch&&i.fetch(...p))},[Yd,a(" Recharger le modèle")])):d("",!0)])])])]),e("div",Gd,[e("div",Kd,[n.credentials.persons.read?(l(),o("section",Xd,[Qd,g(V,{title:"Personne",standalone:!1,"entity-link-show":n.credentials.persons.show,manage:n.credentials.persons.edit,roles:n.rolesPersons,items:n.persons,"url-new":n.personsUrlNew,url:n.personsUrl,"debug-enabled":r.debugEnabled,onUpdate:i.handlerUpdatePersons},null,8,["entity-link-show","manage","roles","items","url-new","url","debug-enabled","onUpdate"])])):d("",!0),n.credentials.organizations.read?(l(),o("section",Zd,[$d,g(V,{title:"Organisation",standalone:!1,"debug-enabled":r.debugEnabled,"entity-link-show":n.credentials.organizations.show,manage:n.credentials.organizations.edit,roles:n.rolesOrganizations,items:n.organizations,url:n.organizationsUrl,"url-new":n.organizationsUrlNew,onUpdate:i.handlerUpdateOrganizations},null,8,["debug-enabled","entity-link-show","manage","roles","items","url","url-new","onUpdate"])])):d("",!0),n.credentials.avenants.read?(l(),o("section",ec,[tc,g(G,{avenants:n.avenants,"roles-person":n.rolesPersons,"roles-organization":n.rolesOrganizations,"current-persons":n.persons,"current-organizations":n.organizations,manage:n.credentials.avenants.edit,onUpdate:i.handlerUpdateAvenants},null,8,["avenants","roles-person","roles-organization","current-persons","current-organizations","manage","onUpdate"])])):d("",!0),n.credentials.documents.read?(l(),o("section",sc,[nc,g(K,{onDebug:i.handlerDebug,onUpdated:i.handlerUpdateDocuments,"debug-enabled":r.debugEnabled,standalone:!0,"sa-tabs":n.documents.tabs,"sa-types":n.documents.typesDocuments,"sa-generated-documents":n.documents.generatedDocuments,"sa-computed-documents":n.documents.computedDocuments,"sa-process-datas":n.documents.processDatas,"sa-credentials":n.credentials.documents,url:n.documents.url,"url-upload-new-doc":n.documents.url_upload_new_doc,"url-sign-document":n.documents.url_sign_document},null,8,["onDebug","onUpdated","debug-enabled","sa-tabs","sa-types","sa-generated-documents","sa-computed-documents","sa-process-datas","sa-credentials","url","url-upload-new-doc","url-sign-document"])])):d("",!0),n.credentials.notes.read?(l(),o("section",lc,[oc,g(H,{url:n.notes_url,showallowed:n.credentials.notes.read,manageuserallowed:n.credentials.notes.edit,manageadminallowed:n.credentials.notes.manage,items:n.notes,onUpdate:i.handlerUpdateNotes},null,8,["url","showallowed","manageuserallowed","manageadminallowed","items","onUpdate"])])):d("",!0),n.credentials.timesheets.read?(l(),o("section",ic,[ac,n.timesheets.enabled?(l(),o("div",dc,[e("section",cc,[uc,e("div",hc,[e("a",{href:n.timesheets.url,class:"btn btn-primary"},[pc,a(" Informations générales et lots de travails ")],8,mc),e("a",{href:n.timesheets.urlSynthesis,class:"btn btn-default"},[fc,a(" Résumé et documents ")],8,_c)])]),n.workpackages?(l(),o("section",vc,[e("div",gc,[yc,e("div",kc,[n.timesheets.declarers.length?(l(),o("div",bc,[(l(!0),o(b,null,w(n.timesheetsDeclarers,p=>(l(),o("a",{href:p.url_details,class:P(["btn",p.hasDeclaration?"btn-primary":"btn-default"])},[g(u,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"]),p.hasDeclaration==!1?(l(),o("small",wc," (Aucune déclaration) ")):d("",!0)],10,Dc))),256))])):(l(),o("div",Cc,[a(" Pour ajouter des déclarants, créez des "),Pc,a(" puis identifier les déclarants parmis les membres ")]))])]),e("div",Ac,[e("h3",Uc,[Sc,e("nav",null,[e("a",{href:n.timesheets.url+"#validators",class:"btn btn-primary btn-xs"},[Ec,a(" Désigner des validateurs ")],8,Mc)])]),e("div",Vc,[e("div",xc,[Nc,n.timesheets.validators.prj.length===0?(l(),o("div",jc," Aucun validateur pour cette étape ")):d("",!0),e("div",null,[(l(!0),o(b,null,w(n.timesheetsValidators.prj,p=>(l(),o("span",Oc,[g(u,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))])]),e("div",zc,[Rc,n.timesheets.validators.sci.length===0?(l(),o("div",Ic," Aucun validateur pour cette étape ")):d("",!0),(l(!0),o(b,null,w(n.timesheetsValidators.sci,p=>(l(),o("span",Fc,[g(u,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))]),e("div",Wc,[Tc,n.timesheets.validators.adm.length===0?(l(),o("div",qc," Aucun validateur pour cette étape ")):d("",!0),(l(!0),o(b,null,w(n.timesheetsValidators.adm,p=>(l(),o("span",Lc,[g(u,{person:p,"allow-tooltip":n.credentials.persons.show},null,8,["person","allow-tooltip"])]))),256))])])]),e("div",Jc,[Hc,a(" "+c(t.personWP)+" ",1),e("div",Bc,[g(_,{"debug-enabled":r.debugEnabled,"allow-tooltip":n.credentials.persons.show,editable:n.credentials.workpackages.edit,workpackages:n.workpackages,url:n.workpackagesUrl,persons:i.personsWP,onUpdate:i.handlerUpdateWorkpackages},null,8,["debug-enabled","allow-tooltip","editable","workpackages","url","persons","onUpdate"])])])])):d("",!0)])):(l(),o("div",rc,[a(" Feuilles de temps non-disponible pour cette activité : "),e("strong",null,c(n.timesheets.informations),1)]))])):d("",!0)]),e("aside",Yc,[n.credentials.milestones.read?(l(),o("section",Gc,[Kc,g(O,{url:n.milestonesUrl,manage:n.credentials.milestones.edit,progression:n.credentials.milestones.progression,payments:n.payments,items:n.milestones,types:n.milestonesTypes,onUpdate:i.handlerUpdateMilestones},null,8,["url","manage","progression","payments","items","types","onUpdate"]),n.milestonesUrlNotifications?(l(),o("a",{key:0,href:n.milestonesUrlNotifications,class:"btn btn-primary"},[Qc,a(" Voir les notifications planifiées ")],8,Xc)):d("",!0)])):d("",!0),n.credentials.payments.read?(l(),o("section",Zc,[$c,g(oe,{url:n.paymentsUrl,manage:n.credentials.payments.edit,amount:n.budget.amount,payments:n.payments,currencies:n.currencies,onDebug:i.handlerDebugShow,onUpdate:i.handlerUpdatePayments},null,8,["url","manage","amount","payments","currencies","onDebug","onUpdate"])])):d("",!0),n.credentials.spents.read?(l(),o("section",eu,[tu,n.spents.enabled?(l(),o("div",nu,[g(ie,{standalone:!1,datas:n.spents},null,8,["datas"]),e("nav",lu,[n.credentials.spents.details?(l(),o("a",{key:0,href:n.spents.url_details,class:"btn btn-primary btn"},[iu,a(" Détails des dépenses")],8,ou)):d("",!0),n.credentials.spents.previsionnel?(l(),o("a",{key:1,href:t.spentsUrlPrevisionnel,class:"btn btn-primary btn"},[ru,a(" Dépenses prévisionnelles (beta)")],8,au)):d("",!0)])])):(l(),o("div",su," Dépenses indisponibles : "+c(n.spents.enabled_reason),1))])):d("",!0),e("section",du,[cu,e("a",{href:n.core.urls.pcru,class:"btn btn-primary btn-xs"}," Accès aux informations PCRU ",8,uu)])])]),n.credentials.administration.read?(l(),o("div",hu,[e("div",mu,[e("div",pu,[_u,g(ae,{url:n.administration.url_logs},null,8,["url"])])])])):d("",!0)])):(l(),o("div",fu," Données inaccessibles "))],64)}const gu=E(ba,[["render",vu],["__scopeId","data-v-8de60033"]]);let Z=document.querySelector("#activity");const le=me(gu,{url:Z.dataset.url,"debug-enabled":Z.dataset.debugEnabled,manage:Z.dataset.manage});le.config.globalProperties.$filters={timeAgo(t){return Q.timeAgo(t)},date(t){return Q.date(t)},dateFull(t){return Q.dateFull(t)},filesize(t){return pe.filesize(t)},money(t){return _e.money(t)},log(t){return Ce.log(t)}};le.mount("#activity");
diff --git a/public/js/oscar/vite/dist/assets/activitydocuments-3139e448.js b/public/js/oscar/vite/dist/assets/activitydocuments-596bd3c4.js
similarity index 90%
rename from public/js/oscar/vite/dist/assets/activitydocuments-3139e448.js
rename to public/js/oscar/vite/dist/assets/activitydocuments-596bd3c4.js
index 6d2a3ca67..8b4bec9f4 100644
--- a/public/js/oscar/vite/dist/assets/activitydocuments-3139e448.js
+++ b/public/js/oscar/vite/dist/assets/activitydocuments-596bd3c4.js
@@ -1 +1 @@
-import{y as i}from"../vendor.js";import{m as r}from"../vendor2.js";import{f as m}from"../vendor3.js";import{A as a}from"../vendor10.js";import"../vendor6.js";import"../vendor7.js";import"../vendor20.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";import"../vendor17.js";let e=document.querySelector("#activitydocuments");const o=i(a,{url:e.dataset.url,urlUploadNewDoc:e.dataset.urlUploadNewDoc,urlSignDocument:e.dataset.urlSignDocument,manage:e.dataset.manage});o.config.globalProperties.$filters={timeAgo(t){return r.timeAgo(t)},date(t){return r.date(t)},dateFull(t){return r.dateFull(t)},filesize(t){return m.filesize(t)}};o.mount("#activitydocuments");
+import{A as i}from"../vendor.js";import{m as r}from"../vendor2.js";import{f as m}from"../vendor3.js";import{A as a}from"../vendor10.js";import"../vendor6.js";import"../vendor7.js";import"../vendor20.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";import"../vendor17.js";let e=document.querySelector("#activitydocuments");const o=i(a,{url:e.dataset.url,urlUploadNewDoc:e.dataset.urlUploadNewDoc,urlSignDocument:e.dataset.urlSignDocument,manage:e.dataset.manage});o.config.globalProperties.$filters={timeAgo(t){return r.timeAgo(t)},date(t){return r.date(t)},dateFull(t){return r.dateFull(t)},filesize(t){return m.filesize(t)}};o.mount("#activitydocuments");
diff --git a/public/js/oscar/vite/dist/assets/activitymotscles-2e3e437b.js b/public/js/oscar/vite/dist/assets/activitymotscles-2e3e437b.js
deleted file mode 100644
index 7ae805df8..000000000
--- a/public/js/oscar/vite/dist/assets/activitymotscles-2e3e437b.js
+++ /dev/null
@@ -1 +0,0 @@
-import{p as y,r as C,o as n,c as i,b,d as l,a as p,g as u,F as c,j as h,w as x,v as w,h as k,t as m,n as L,y as M}from"../vendor.js";import{A as I}from"../vendor14.js";import{L as D}from"../vendor17.js";import{_ as E}from"../vendor7.js";const N={components:{Loader:D},props:{url:{default:null},activityid:{default:null},motsclesselectionnes:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(t=>t.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{touslesmotscles:[],error:null,loading:null,affichertouslesmotscles:!1,userInput:""}},methods:{motCléExiste(){for(const t of this.touslesmotscles)if(t.label.toLocaleLowerCase()==this.userInput.toLocaleLowerCase())return!0;return!1},créerMotClé(t){t.preventDefault(),this.affichertouslesmotscles=!1,this.loading="Création du mot clé",y.post(this.url+"?activity_id="+this.activityid,{action:"create",label:this.userInput.trim()}).then(e=>{let a=e.data;a.selected=!0,this.touslesmotscles.push(a),this.userInput=""},e=>{this.handleError(e)}).finally(()=>{this.loading=null})},onKeyDown(t){if(t.key==="Enter"){t.preventDefault();return}if(t.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(t){!t.target.classList.contains("undetouslesmotscles")&&!t.target.classList.contains("inputNouveauMotCle")&&!t.target.classList.contains("listeDeTousLesMotsCles")&&(this.affichertouslesmotscles=!1)},fetch(){this.loading="Chargement des mots clés",y.get(this.url+"?activity_id="+this.activityid).then(t=>{this.touslesmotscles=t.data.motscles;const e=JSON.parse(this.motsclesselectionnes);for(let a of this.touslesmotscles)e.includes(a.id)&&(a.selected=!0);this.loading=null},t=>{this.handleError(t),this.loading=null})},handleError(t){if(!t.response.data){this.error=t;return}if(t.response.headers.get("content-type").includes("text/html")){var e=document.createElement("html");e.innerHTML=t.response.data;const a=e.querySelector('[id="contenu-principal"]');if(a){this.error=a.innerHTML;return}const d=t.response.headers.get("content-length");if(d&&typeof d=="string"&&!isNaN(d)&&Number(d)<1e3){this.error=t.response.data;return}}this.error=I.manageErrorResponse(t)}},mounted(){document.addEventListener("mousedown",this.onMouseDown),this.fetch()},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},T={style:{position:"relative"}},z={key:0,class:"overlay",style:{"z-index":"101"}},A={class:"overlay-content",style:{"max-width":"50%"}},H={class:"alert-danger alert"},S=["innerHTML"],V={style:{display:"none"},name:"motscles[]",multiple:"",tabindex:"-1","aria-hidden":"true"},F=["value"],K={style:{display:"flex"}},j={style:{width:"50%","min-width":"50%"}},B={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},q={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},J={key:0,class:"selectedmotcle"},O=["onClick"],P={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},R={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0",position:"absolute","z-index":"1051",width:"50%"}},U={class:"listeDeTousLesMotsCles"},X=["onClick"],G={key:0,style:{padding:"6px"}},Q={style:{"max-width":"50%",overflow:"auto","margin-left":"10px"}},W=["disabled"],Y={key:0},Z={key:1,style:{"white-space":"preserve-spaces"}},$={key:0,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}},ee={key:1,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}};function te(t,e,a,d,o,r){const g=C("Loader");return n(),i("section",T,[b(g,{visible:o.loading!=null,text:o.loading},null,8,["visible","text"]),o.error?(n(),i("div",z,[l("div",A,[l("h2",null,[e[7]||(e[7]=p(" Erreur mots clés ")),l("span",{class:"overlay-closer",onClick:e[0]||(e[0]=s=>o.error=null)},"X")]),l("div",H,[e[8]||(e[8]=l("i",{class:"icon-attention-1"},null,-1)),l("div",{innerHTML:o.error},null,8,S)]),l("button",{class:"btn btn-default",onClick:e[1]||(e[1]=s=>o.error=null)},e[9]||(e[9]=[l("i",{class:"icon-cancel-outline"},null,-1),p(" Fermer ")]))])])):u("",!0),e[11]||(e[11]=l("label",null,"Mots clés",-1)),l("select",V,[(n(!0),i(c,null,h(o.touslesmotscles,s=>(n(),i(c,null,[s.selected?(n(),i("option",{key:0,value:s.id,selected:""},m(s.label),9,F)):u("",!0)],64))),256))]),l("div",K,[l("div",j,[l("span",B,[l("ul",q,[(n(!0),i(c,null,h(o.touslesmotscles,s=>(n(),i(c,null,[s.selected?(n(),i("li",J,[l("span",{onClick:_=>s.selected=!1},"×",8,O),p(m(s.label),1)])):u("",!0)],64))),256)),l("li",P,[x(l("input",{onFocusin:e[2]||(e[2]=(...s)=>r.clickInput&&r.clickInput(...s)),onClick:e[3]||(e[3]=(...s)=>r.clickInput&&r.clickInput(...s)),onKeydown:e[4]||(e[4]=(...s)=>r.onKeyDown&&r.onKeyDown(...s)),"onUpdate:modelValue":e[5]||(e[5]=s=>o.userInput=s),size:"1",class:"inputNouveauMotCle"},null,544),[[w,o.userInput]])])])]),o.affichertouslesmotscles?(n(),i("span",R,[l("ul",U,[(n(!0),i(c,null,h(o.touslesmotscles,s=>(n(),i(c,null,[s.label.toLocaleLowerCase().includes(o.userInput.toLocaleLowerCase())?(n(),i("li",{key:0,class:L(["undetouslesmotscles",{selected:s.selected}]),onClick:_=>{s.selected=!s.selected,o.affichertouslesmotscles=!1,o.userInput=""}},m(s.label),11,X)):u("",!0)],64))),256)),r.aucunMotCleNeCorrespond?(n(),i("li",G,"Aucun mot clé existant correspondant")):u("",!0)])])):u("",!0)]),l("div",Q,[l("button",{class:"bouton",onClick:e[6]||(e[6]=k((...s)=>r.créerMotClé&&r.créerMotClé(...s),["stop"])),disabled:!o.userInput.trim()||r.motCléExiste()},[e[10]||(e[10]=p("Créer le nouveau mot clé : ")),o.userInput.trim()?u("",!0):(n(),i("span",Y,"∅")),o.userInput.trim()?(n(),i("span",Z,m(o.userInput.trim()),1)):u("",!0)],8,W),o.userInput.trim()?u("",!0):(n(),i("div",$,`ℹ️ Pour créer un nouveau mot clé, veuillez d'abord saisir son libellé dans le champ "Mots clés"`)),o.userInput.trim()&&r.motCléExiste()?(n(),i("div",ee,"ℹ️ Le mot clé existe déjà")):u("",!0)])])])}const se=E(N,[["render",te],["__scopeId","data-v-926a5c63"]]);let v="#activity-mots-cles",f=document.querySelector(v);const oe=M(se,{url:f.dataset.url,activityid:f.dataset.activityid,motsclesselectionnes:f.dataset.motsclesselectionnes});oe.mount(v);
diff --git a/public/js/oscar/vite/dist/assets/activitymotscles-7b1fc39f.js b/public/js/oscar/vite/dist/assets/activitymotscles-7b1fc39f.js
new file mode 100644
index 000000000..61258674f
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/activitymotscles-7b1fc39f.js
@@ -0,0 +1 @@
+import{s as y,r as b,o as n,c as i,b as x,d as l,a as p,g as u,F as a,k as h,w,v as k,h as L,t as m,n as M,p as I,i as D,A as E}from"../vendor.js";import{A as N}from"../vendor14.js";import{L as T}from"../vendor17.js";import{_ as S}from"../vendor7.js";const z={components:{Loader:T},props:{url:{default:null},activityid:{default:null},motsclesselectionnes:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(e=>e.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{touslesmotscles:[],error:null,loading:null,affichertouslesmotscles:!1,userInput:""}},methods:{motCléExiste(){for(const e of this.touslesmotscles)if(e.label.toLocaleLowerCase()==this.userInput.toLocaleLowerCase())return!0;return!1},créerMotClé(e){e.preventDefault(),this.affichertouslesmotscles=!1,this.loading="Création du mot clé",y.post(this.url+"?activity_id="+this.activityid,{action:"create",label:this.userInput.trim()}).then(s=>{let c=s.data;c.selected=!0,this.touslesmotscles.push(c),this.userInput=""},s=>{this.handleError(s)}).finally(()=>{this.loading=null})},onKeyDown(e){if(e.key==="Enter"){e.preventDefault();return}if(e.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(e){!e.target.classList.contains("undetouslesmotscles")&&!e.target.classList.contains("inputNouveauMotCle")&&!e.target.classList.contains("listeDeTousLesMotsCles")&&(this.affichertouslesmotscles=!1)},fetch(){this.loading="Chargement des mots clés",y.get(this.url+"?activity_id="+this.activityid).then(e=>{this.touslesmotscles=e.data.motscles;const s=JSON.parse(this.motsclesselectionnes);for(let c of this.touslesmotscles)s.includes(c.id)&&(c.selected=!0);this.loading=null},e=>{this.handleError(e),this.loading=null})},handleError(e){if(!e.response.data){this.error=e;return}if(e.response.headers.get("content-type").includes("text/html")){var s=document.createElement("html");s.innerHTML=e.response.data;const c=s.querySelector('[id="contenu-principal"]');if(c){this.error=c.innerHTML;return}const d=e.response.headers.get("content-length");if(d&&typeof d=="string"&&!isNaN(d)&&Number(d)<1e3){this.error=e.response.data;return}}this.error=N.manageErrorResponse(e)}},mounted(){document.addEventListener("mousedown",this.onMouseDown),this.fetch()},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},_=e=>(I("data-v-926a5c63"),e=e(),D(),e),A={style:{position:"relative"}},H={key:0,class:"overlay",style:{"z-index":"101"}},V={class:"overlay-content",style:{"max-width":"50%"}},F={class:"alert-danger alert"},K=_(()=>l("i",{class:"icon-attention-1"},null,-1)),B=["innerHTML"],j=_(()=>l("i",{class:"icon-cancel-outline"},null,-1)),q=_(()=>l("label",null,"Mots clés",-1)),J={style:{display:"none"},name:"motscles[]",multiple:"",tabindex:"-1","aria-hidden":"true"},O=["value"],P={style:{display:"flex"}},R={style:{width:"50%","min-width":"50%"}},U={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},X={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},G={key:0,class:"selectedmotcle"},Q=["onClick"],W={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},Y={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0",position:"absolute","z-index":"1051",width:"50%"}},Z={class:"listeDeTousLesMotsCles"},$=["onClick"],ee={key:0,style:{padding:"6px"}},te={style:{"max-width":"50%",overflow:"auto","margin-left":"10px"}},se=["disabled"],oe={key:0},le={key:1,style:{"white-space":"preserve-spaces"}},ne={key:0,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}},ie={key:1,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}};function re(e,s,c,d,o,r){const g=b("Loader");return n(),i("section",A,[x(g,{visible:o.loading!=null,text:o.loading},null,8,["visible","text"]),o.error?(n(),i("div",H,[l("div",V,[l("h2",null,[p(" Erreur mots clés "),l("span",{class:"overlay-closer",onClick:s[0]||(s[0]=t=>o.error=null)},"X")]),l("div",F,[K,l("div",{innerHTML:o.error},null,8,B)]),l("button",{class:"btn btn-default",onClick:s[1]||(s[1]=t=>o.error=null)},[j,p(" Fermer ")])])])):u("",!0),q,l("select",J,[(n(!0),i(a,null,h(o.touslesmotscles,t=>(n(),i(a,null,[t.selected?(n(),i("option",{key:0,value:t.id,selected:""},m(t.label),9,O)):u("",!0)],64))),256))]),l("div",P,[l("div",R,[l("span",U,[l("ul",X,[(n(!0),i(a,null,h(o.touslesmotscles,t=>(n(),i(a,null,[t.selected?(n(),i("li",G,[l("span",{onClick:C=>t.selected=!1},"×",8,Q),p(m(t.label),1)])):u("",!0)],64))),256)),l("li",W,[w(l("input",{onFocusin:s[2]||(s[2]=(...t)=>r.clickInput&&r.clickInput(...t)),onClick:s[3]||(s[3]=(...t)=>r.clickInput&&r.clickInput(...t)),onKeydown:s[4]||(s[4]=(...t)=>r.onKeyDown&&r.onKeyDown(...t)),"onUpdate:modelValue":s[5]||(s[5]=t=>o.userInput=t),size:"1",class:"inputNouveauMotCle"},null,544),[[k,o.userInput]])])])]),o.affichertouslesmotscles?(n(),i("span",Y,[l("ul",Z,[(n(!0),i(a,null,h(o.touslesmotscles,t=>(n(),i(a,null,[t.label.toLocaleLowerCase().includes(o.userInput.toLocaleLowerCase())?(n(),i("li",{key:0,class:M(["undetouslesmotscles",{selected:t.selected}]),onClick:C=>{t.selected=!t.selected,o.affichertouslesmotscles=!1,o.userInput=""}},m(t.label),11,$)):u("",!0)],64))),256)),r.aucunMotCleNeCorrespond?(n(),i("li",ee,"Aucun mot clé existant correspondant")):u("",!0)])])):u("",!0)]),l("div",te,[l("button",{class:"bouton",onClick:s[6]||(s[6]=L((...t)=>r.créerMotClé&&r.créerMotClé(...t),["stop"])),disabled:!o.userInput.trim()||r.motCléExiste()},[p("Créer le nouveau mot clé : "),o.userInput.trim()?u("",!0):(n(),i("span",oe,"∅")),o.userInput.trim()?(n(),i("span",le,m(o.userInput.trim()),1)):u("",!0)],8,se),o.userInput.trim()?u("",!0):(n(),i("div",ne,`ℹ️ Pour créer un nouveau mot clé, veuillez d'abord saisir son libellé dans le champ "Mots clés"`)),o.userInput.trim()&&r.motCléExiste()?(n(),i("div",ie,"ℹ️ Le mot clé existe déjà")):u("",!0)])])])}const ue=S(z,[["render",re],["__scopeId","data-v-926a5c63"]]);let v="#activity-mots-cles",f=document.querySelector(v);const ce=E(ue,{url:f.dataset.url,activityid:f.dataset.activityid,motsclesselectionnes:f.dataset.motsclesselectionnes});ce.mount(v);
diff --git a/public/js/oscar/vite/dist/assets/activitymotsclesadmin-696ec89a.js b/public/js/oscar/vite/dist/assets/activitymotsclesadmin-696ec89a.js
deleted file mode 100644
index 089360867..000000000
--- a/public/js/oscar/vite/dist/assets/activitymotsclesadmin-696ec89a.js
+++ /dev/null
@@ -1 +0,0 @@
-import{o as n,c as i,d as t,a as d,g as c,F as v,j as C,t as r,w as g,v as M,n as D,k as L,p as y,r as _,z as E,b as h,h as S,y as A}from"../vendor.js";import{A as I}from"../vendor14.js";import{L as z}from"../vendor17.js";import{_ as k}from"../vendor7.js";const F={props:{touslesmotscles:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(o=>o.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{affichertouslesmotscles:!1,userInput:"",idMotCleCible:null,motsClesSelectionnes:new Set}},methods:{motCleParId(o){for(const e of this.touslesmotscles)if(e.id==o)return e;return null},onKeyDown(o){if(o.key==="Enter"){o.preventDefault();return}if(o.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(o){!o.target.classList.contains("undetouslesmotscles")&&!o.target.classList.contains("inputNouveauMotCle")&&!o.target.classList.contains("listeDeTousLesMotsCles")&&!o.target.classList.contains("labelDuMotCle")&&(this.affichertouslesmotscles=!1)}},mounted(){document.addEventListener("mousedown",this.onMouseDown)},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},N={key:0,class:"row"},T={class:"row",style:{"margin-bottom":"2em"}},V={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},j={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},q={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},H={key:0,class:"selectedmotcle"},K=["onClick"],P={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},X={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0","z-index":"1051"}},B={class:"listeDeTousLesMotsCles"},U=["onClick"],R={class:"labelDuMotCle"},G={key:0,style:{padding:"6px"}},J={key:1,class:"row"},O={class:"row"},Q={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},W=["value"],Y={key:2,class:"row"},Z={style:{"background-color":"#dff0d8","border-color":"#d6e9c6",color:"#3c763d",margin:"1em",padding:"1em"}},$={style:{"line-break":"anywhere"}},ee={key:0},te={style:{"line-break":"anywhere"}},se={key:0},le={style:{"line-break":"anywhere"}},oe={class:"row"},ne={class:"col-md-12"},ie={class:"buttons-bar"},re=["disabled"];function de(o,e,m,p,s,a){return n(),i("section",null,[t("h2",null,[e[8]||(e[8]=t("small",null,[t("i",{class:"icon-doc"}),t("span",null,"Fusionner des mots clés")],-1)),t("span",{class:"overlay-closer",onClick:e[0]||(e[0]=l=>o.$emit("close"))},"X")]),s.motsClesSelectionnes.size<2?(n(),i("div",N,e[9]||(e[9]=[t("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[t("span",{style:{"font-size":"xx-large"}},"⚠"),d(" Veuillez sélectionner au moins deux mots clés à fusionner ")],-1)]))):c("",!0),t("div",T,[t("div",V,[e[10]||(e[10]=t("label",{for:"nouveauMotCle"},"Sélectionnez les mots clés à fusionner",-1)),t("div",null,[t("span",j,[t("ul",q,[(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[s.motsClesSelectionnes.has(l.id)?(n(),i("li",H,[t("span",{onClick:b=>s.motsClesSelectionnes.delete(l.id)},"×",8,K),t("strong",null,r(l.label),1),d(" (id : "+r(l.id)+", "+r(l.activity_count)+" activité"+r(l.activity_count>1?"s":"")+") ",1)])):c("",!0)],64))),256)),t("li",P,[g(t("input",{id:"nouveauMotCle",onFocusin:e[1]||(e[1]=(...l)=>a.clickInput&&a.clickInput(...l)),onClick:e[2]||(e[2]=(...l)=>a.clickInput&&a.clickInput(...l)),onKeydown:e[3]||(e[3]=(...l)=>a.onKeyDown&&a.onKeyDown(...l)),"onUpdate:modelValue":e[4]||(e[4]=l=>s.userInput=l),size:"1",class:"inputNouveauMotCle"},null,544),[[M,s.userInput]])])])]),s.affichertouslesmotscles?(n(),i("div",X,[t("ul",B,[(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[l.label.toLocaleLowerCase().includes(s.userInput.toLocaleLowerCase())?(n(),i("li",{key:0,class:D(["undetouslesmotscles",{selected:s.motsClesSelectionnes.has(l.id)}]),onClick:b=>{s.motsClesSelectionnes.has(l.id)?s.motsClesSelectionnes.delete(l.id):s.motsClesSelectionnes.add(l.id),s.affichertouslesmotscles=!1,s.userInput=""}},[t("strong",R,r(l.label),1),d(" (id : "+r(l.id)+", "+r(l.activity_count)+" activité"+r(l.activity_count>1?"s":"")+")",1)],10,U)):c("",!0)],64))),256)),a.aucunMotCleNeCorrespond?(n(),i("li",G,"Aucun mot clé existant correspondant")):c("",!0)])])):c("",!0)])])]),s.idMotCleCible?c("",!0):(n(),i("div",J,e[11]||(e[11]=[t("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[t("span",{style:{"font-size":"xx-large"}},"⚠"),d(" Veuillez sélectionner le nom du mot clé qui remplacera tous les autres après la fusion ")],-1)]))),t("div",O,[t("div",Q,[e[13]||(e[13]=t("label",{for:"motCleCible"},"Sélectionnez le nom du mot clé qui remplacera tous les autres après la fusion",-1)),g(t("select",{id:"motCleCible","onUpdate:modelValue":e[5]||(e[5]=l=>s.idMotCleCible=l)},[e[12]||(e[12]=t("option",{value:""},null,-1)),(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[s.motsClesSelectionnes.has(l.id)?(n(),i("option",{key:0,value:l.id},[t("strong",null,r(l.label),1),d(" (id : "+r(l.id)+", "+r(l.activity_count)+" activité"+r(l.activity_count>1?"s":"")+")",1)],8,W)):c("",!0)],64))),256))],512),[[L,s.idMotCleCible]])])]),s.motsClesSelectionnes.size>=2&&s.idMotCleCible?(n(),i("div",Y,[t("div",Z,[e[14]||(e[14]=d(" En cliquant sur fusionner, le mot clé ")),t("strong",$,r(a.motCleParId(s.idMotCleCible).label),1),d(" (id: "+r(s.idMotCleCible)+", "+r(a.motCleParId(s.idMotCleCible).activity_count)+" activité"+r(a.motCleParId(s.idMotCleCible).activity_count>1?"s":"")+") va être ajouté : ",1),t("ul",null,[(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[s.motsClesSelectionnes.has(l.id)&&l.id!=s.idMotCleCible?(n(),i("li",ee,[d("aux "+r(l.activity_count)+" activité"+r(l.activity_count>1?"s":"")+" ayant le mot clé ",1),t("strong",te,r(l.label),1),d(" (id : "+r(l.id)+")",1)])):c("",!0)],64))),256))]),e[15]||(e[15]=d(" Ensuite, ces mots clés seront supprimés : ")),(n(!0),i(v,null,C(m.touslesmotscles,l=>(n(),i(v,null,[s.motsClesSelectionnes.has(l.id)&&l.id!=s.idMotCleCible?(n(),i("span",se,[t("strong",le," "+r(l.label),1),d(" (id : "+r(l.id)+")",1)])):c("",!0)],64))),256))])])):c("",!0),t("div",oe,[t("div",ne,[t("nav",ie,[t("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:e[6]||(e[6]=l=>o.$emit("close"))},e[16]||(e[16]=[t("i",{class:"icon-cancel-alt"},null,-1),d(" Annuler ")])),t("button",{class:"btn btn-success",disabled:s.motsClesSelectionnes.size<2||!s.idMotCleCible,onClick:e[7]||(e[7]=l=>o.$emit("fusion",Array.from(s.motsClesSelectionnes),s.idMotCleCible))},e[17]||(e[17]=[t("i",{class:"icon-valid"},null,-1),d(" Fusionner ")]),8,re)])])])])}const ue=k(F,[["render",de],["__scopeId","data-v-41814f90"]]);const ce={directives:{focus:o=>o.focus()},components:{Loader:z,ActivityMotsClesAdminFusion:ue},props:{url:{default:null}},computed:{motCleExisteDeja(){return this.editedMotCle&&this.editedMotCle.label&&this.touslesmotscles.filter(o=>o.label.toLocaleLowerCase()==this.editedMotCle.label.trim().toLocaleLowerCase()).length>0}},data(){return{touslesmotscles:[],error:null,loading:null,deleteData:null,editedMotCle:null,fusionEnCours:!1}},methods:{fusionner(o,e){this.fusionEnCours=!1,this.loading="Fusion des mots clés",y.post(this.url,{action:"fusion",idsToMerge:o,targetId:e}).then(()=>{this.fetch()},m=>{this.handleError(m)}).finally(()=>{this.loading=null})},applyEdit(){let o="create";this.editedMotCle.id&&(o="update"),this.loading=o=="create"?"Création du mot clé":"Modification du mot clé",y.post(this.url,{action:o,id:this.editedMotCle.id,label:this.editedMotCle.label.trim()}).then(()=>{this.fetch()},e=>{this.handleError(e)}).finally(()=>{this.loading=null,this.editedMotCle=null})},deleteMotCle(){this.loading="Suppression du mot clé",y.post(this.url,{action:"delete",id:this.deleteData.id}).then(()=>{this.touslesmotscles.splice(this.touslesmotscles.findIndex(o=>o.id===this.deleteData.id),1)},o=>{this.handleError(o)}).finally(()=>{this.loading=null,this.deleteData=null})},fetch(){this.loading="Chargement des mots clés",y.get(this.url+"?include_activity_count=true").then(o=>{this.touslesmotscles=o.data.motscles,this.loading=null},o=>{this.handleError(o),this.loading=null})},handleError(o){if(!o.response.data){this.error=o;return}if(o.response.headers.get("content-type").includes("text/html")){var e=document.createElement("html");e.innerHTML=o.response.data;const m=e.querySelector('[id="contenu-principal"]');if(m){this.error=m.innerHTML;return}const p=o.response.headers.get("content-length");if(p&&typeof p=="string"&&!isNaN(p)&&Number(p)<1e3){this.error=o.response.data;return}}this.error=I.manageErrorResponse(o)}},mounted(){this.fetch()}},ae={key:0,class:"overlay",style:{"z-index":"101"}},me={class:"overlay-content",style:{"max-width":"50%"}},ve={class:"alert-danger alert"},pe=["innerHTML"],Ce={style:{display:"flex","flex-direction":"row-reverse"}},ye={class:"title"},be={style:{display:"inline","line-break":"anywhere"}},fe=["onClick"],ge=["onClick"],_e={style:{"padding-left":"1em","padding-bottom":"0.3em"}},he={key:1,class:"overlay"},Me={class:"overlay-content"},ke={style:{"padding-right":"1em"}},xe={style:{"line-break":"anywhere"}},we={class:"alert-danger alert"},De={style:{"line-break":"anywhere"}},Le={key:0},Ee={key:1},Se={class:"row"},Ae={class:"col-md-12"},Ie={class:"buttons-bar"},ze={key:2,class:"overlay"},Fe={class:"overlay-content",style:{display:"flex","flex-direction":"column"}},Ne={key:0},Te={key:1},Ve={key:0,class:"row"},je={key:1,class:"row"},qe={class:"row",style:{"flex-grow":"2"}},He={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},Ke={class:"row"},Pe={class:"col-md-12"},Xe={class:"buttons-bar"},Be=["disabled"],Ue={key:3,class:"overlay"},Re={class:"overlay-content",style:{display:"flex","flex-direction":"column"}};function Ge(o,e,m,p,s,a){const l=_("Loader"),b=_("ActivityMotsClesAdminFusion"),w=E("focus");return n(),i("section",null,[h(l,{visible:s.loading!=null,text:s.loading},null,8,["visible","text"]),s.error?(n(),i("div",ae,[t("div",me,[t("h2",null,[e[13]||(e[13]=d(" Erreur mots clés ")),t("span",{class:"overlay-closer",onClick:e[0]||(e[0]=u=>s.error=null)},"X")]),t("div",ve,[e[14]||(e[14]=t("i",{class:"icon-attention-1"},null,-1)),t("div",{innerHTML:s.error},null,8,pe)]),t("button",{class:"btn btn-default",onClick:e[1]||(e[1]=u=>s.error=null)},e[15]||(e[15]=[t("i",{class:"icon-cancel-outline"},null,-1),d(" Fermer ")]))])])):c("",!0),e[33]||(e[33]=t("h1",null,[t("span",{class:"icon-tags"}),d(" Mots clés")],-1)),t("div",Ce,[t("button",{onClick:e[2]||(e[2]=u=>s.editedMotCle={}),class:"btn btn-primary"},e[16]||(e[16]=[t("span",{class:"icon-plus-circled"},null,-1),d(" Créer un nouveau mot clé")])),t("button",{onClick:e[3]||(e[3]=u=>s.fusionEnCours=!0),class:"btn btn-primary",style:{"margin-right":"1em"}},e[17]||(e[17]=[t("span",{class:"icon-tags"},null,-1),d(" Fusionner des mots clés")]))]),t("ol",null,[(n(!0),i(v,null,C(s.touslesmotscles,u=>(n(),i("li",null,[t("div",ye,[t("div",null,[t("span",null,"[id : "+r(u.id)+"]",1),e[18]||(e[18]=d()),t("h3",be,r(u.label),1)]),t("div",null,[t("button",{onClick:f=>s.editedMotCle={id:u.id,label:u.label},class:"cardbutton"},e[19]||(e[19]=[t("span",{class:"icon-pencil"},null,-1),d(" Éditer")]),8,fe),t("button",{onClick:f=>s.deleteData=u,class:"cardbutton"},e[20]||(e[20]=[t("span",{class:"icon-trash"},null,-1),d(" Supprimer")]),8,ge)])]),t("div",_e,r(u.activity_count)+" activité"+r(u.activity_count>1?"s":"")+" pour ce mot clé",1)]))),256))]),s.deleteData?(n(),i("div",he,[t("div",Me,[t("h2",ke,[d(" Suppression du mot clé : [id : "+r(s.deleteData.id)+'] "',1),t("span",xe,r(s.deleteData.label),1),e[21]||(e[21]=d('" ? ')),t("span",{class:"overlay-closer",onClick:e[4]||(e[4]=u=>s.deleteData=null)},"X")]),t("p",we,[e[22]||(e[22]=t("i",{class:"icon-attention-1"},null,-1)),d(" Souhaitez-vous supprimer le mot clé : [id : "+r(s.deleteData.id)+"] ",1),t("strong",De,r(s.deleteData.label),1),e[23]||(e[23]=d(" ? ")),e[24]||(e[24]=t("br",null,null,-1)),e[25]||(e[25]=d(" Actuellement attaché à ")),s.deleteData.activity_count>0?(n(),i("span",Le,[t("strong",null,r(s.deleteData.activity_count)+" activité"+r(s.deleteData.activity_count>1?"s":""),1)])):c("",!0),s.deleteData.activity_count==0?(n(),i("span",Ee,"aucune activité")):c("",!0)]),t("div",Se,[t("div",Ae,[t("nav",Ie,[t("button",{class:"btn",onClick:e[5]||(e[5]=u=>s.deleteData=null),style:{"margin-right":"1em"}},e[26]||(e[26]=[t("i",{class:"icon-cancel-alt"},null,-1),d(" Annuler ")])),t("button",{class:"btn btn-danger",onClick:e[6]||(e[6]=(...u)=>a.deleteMotCle&&a.deleteMotCle(...u))},e[27]||(e[27]=[t("i",{class:"icon-valid"},null,-1),d(" Confirmer ")]))])])])])])):c("",!0),s.editedMotCle?(n(),i("div",ze,[t("div",Fe,[t("h2",null,[t("small",null,[e[28]||(e[28]=t("i",{class:"icon-doc"},null,-1)),s.editedMotCle.id?c("",!0):(n(),i("span",Ne,"Création d'un nouveau mot clé")),s.editedMotCle.id?(n(),i("span",Te,"Modification d'un mot clé")):c("",!0)]),t("span",{class:"overlay-closer",onClick:e[7]||(e[7]=u=>s.editedMotCle=null)},"X")]),s.editedMotCle.label?c("",!0):(n(),i("div",Ve,e[29]||(e[29]=[t("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[t("span",{style:{"font-size":"xx-large"}},"⚠"),d(" Veuillez saisir un libellé pour le mot clé ")],-1)]))),a.motCleExisteDeja?(n(),i("div",je,e[30]||(e[30]=[t("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[t("span",{style:{"font-size":"xx-large"}},"⚠"),d(" Le mot clé saisi existe déjà ")],-1)]))):c("",!0),t("div",qe,[t("div",He,[g(t("input",{maxlength:"128","onUpdate:modelValue":e[8]||(e[8]=u=>s.editedMotCle.label=u),id:"content",class:"form-control",style:{"flex-grow":"2"}},null,512),[[w],[M,s.editedMotCle.label]])])]),t("div",Ke,[t("div",Pe,[t("nav",Xe,[t("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:e[9]||(e[9]=u=>s.editedMotCle=null)},e[31]||(e[31]=[t("i",{class:"icon-cancel-alt"},null,-1),d(" Annuler ")])),t("button",{class:"btn btn-success",onClick:e[10]||(e[10]=S(u=>a.applyEdit(),["prevent"])),disabled:!s.editedMotCle.label||a.motCleExisteDeja},e[32]||(e[32]=[t("i",{class:"icon-valid"},null,-1),d(" Enregistrer ")]),8,Be)])])])])])):c("",!0),s.fusionEnCours?(n(),i("div",Ue,[t("div",Re,[h(b,{onClose:e[11]||(e[11]=u=>s.fusionEnCours=!1),onFusion:e[12]||(e[12]=(u,f)=>a.fusionner(u,f)),touslesmotscles:s.touslesmotscles},null,8,["touslesmotscles"])])])):c("",!0)])}const Je=k(ce,[["render",Ge],["__scopeId","data-v-837865bb"]]);let x="#activity-mots-cles-admin",Oe=document.querySelector(x);const Qe=A(Je,{url:Oe.dataset.url});Qe.mount(x);
diff --git a/public/js/oscar/vite/dist/assets/activitymotsclesadmin-70f45e39.js b/public/js/oscar/vite/dist/assets/activitymotsclesadmin-70f45e39.js
new file mode 100644
index 000000000..c22e31db2
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/activitymotsclesadmin-70f45e39.js
@@ -0,0 +1 @@
+import{o as n,c as i,d as e,g as u,F as m,k as C,t as c,a as r,w as g,v as x,n as I,l as A,p as w,i as D,s as y,r as M,B as z,b as k,h as F,A as N}from"../vendor.js";import{A as T}from"../vendor14.js";import{L as V}from"../vendor17.js";import{_ as L}from"../vendor7.js";const j={props:{touslesmotscles:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(l=>l.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{affichertouslesmotscles:!1,userInput:"",idMotCleCible:null,motsClesSelectionnes:new Set}},methods:{motCleParId(l){for(const s of this.touslesmotscles)if(s.id==l)return s;return null},onKeyDown(l){if(l.key==="Enter"){l.preventDefault();return}if(l.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(l){!l.target.classList.contains("undetouslesmotscles")&&!l.target.classList.contains("inputNouveauMotCle")&&!l.target.classList.contains("listeDeTousLesMotsCles")&&!l.target.classList.contains("labelDuMotCle")&&(this.affichertouslesmotscles=!1)}},mounted(){document.addEventListener("mousedown",this.onMouseDown)},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},p=l=>(w("data-v-41814f90"),l=l(),D(),l),q=p(()=>e("small",null,[e("i",{class:"icon-doc"}),e("span",null,"Fusionner des mots clés")],-1)),H={key:0,class:"row"},B=p(()=>e("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[e("span",{style:{"font-size":"xx-large"}},"⚠"),r(" Veuillez sélectionner au moins deux mots clés à fusionner ")],-1)),K=[B],P={class:"row",style:{"margin-bottom":"2em"}},X={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},U=p(()=>e("label",{for:"nouveauMotCle"},"Sélectionnez les mots clés à fusionner",-1)),R={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},G={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},J={key:0,class:"selectedmotcle"},O=["onClick"],Q={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},W={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0","z-index":"1051"}},Y={class:"listeDeTousLesMotsCles"},Z=["onClick"],$={class:"labelDuMotCle"},ee={key:0,style:{padding:"6px"}},te={key:1,class:"row"},se=p(()=>e("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[e("span",{style:{"font-size":"xx-large"}},"⚠"),r(" Veuillez sélectionner le nom du mot clé qui remplacera tous les autres après la fusion ")],-1)),le=[se],oe={class:"row"},ne={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},ie=p(()=>e("label",{for:"motCleCible"},"Sélectionnez le nom du mot clé qui remplacera tous les autres après la fusion",-1)),ce=p(()=>e("option",{value:""},null,-1)),re=["value"],de={key:2,class:"row"},ue={style:{"background-color":"#dff0d8","border-color":"#d6e9c6",color:"#3c763d",margin:"1em",padding:"1em"}},ae={style:{"line-break":"anywhere"}},_e={key:0},he={style:{"line-break":"anywhere"}},me={key:0},pe={style:{"line-break":"anywhere"}},ve={class:"row"},Ce={class:"col-md-12"},ye={class:"buttons-bar"},be=p(()=>e("i",{class:"icon-cancel-alt"},null,-1)),fe=["disabled"],ge=p(()=>e("i",{class:"icon-valid"},null,-1));function Me(l,s,h,v,t,a){return n(),i("section",null,[e("h2",null,[q,e("span",{class:"overlay-closer",onClick:s[0]||(s[0]=o=>l.$emit("close"))},"X")]),t.motsClesSelectionnes.size<2?(n(),i("div",H,K)):u("",!0),e("div",P,[e("div",X,[U,e("div",null,[e("span",R,[e("ul",G,[(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[t.motsClesSelectionnes.has(o.id)?(n(),i("li",J,[e("span",{onClick:b=>t.motsClesSelectionnes.delete(o.id)},"×",8,O),e("strong",null,c(o.label),1),r(" (id : "+c(o.id)+", "+c(o.activity_count)+" activité"+c(o.activity_count>1?"s":"")+") ",1)])):u("",!0)],64))),256)),e("li",Q,[g(e("input",{id:"nouveauMotCle",onFocusin:s[1]||(s[1]=(...o)=>a.clickInput&&a.clickInput(...o)),onClick:s[2]||(s[2]=(...o)=>a.clickInput&&a.clickInput(...o)),onKeydown:s[3]||(s[3]=(...o)=>a.onKeyDown&&a.onKeyDown(...o)),"onUpdate:modelValue":s[4]||(s[4]=o=>t.userInput=o),size:"1",class:"inputNouveauMotCle"},null,544),[[x,t.userInput]])])])]),t.affichertouslesmotscles?(n(),i("div",W,[e("ul",Y,[(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[o.label.toLocaleLowerCase().includes(t.userInput.toLocaleLowerCase())?(n(),i("li",{key:0,class:I(["undetouslesmotscles",{selected:t.motsClesSelectionnes.has(o.id)}]),onClick:b=>{t.motsClesSelectionnes.has(o.id)?t.motsClesSelectionnes.delete(o.id):t.motsClesSelectionnes.add(o.id),t.affichertouslesmotscles=!1,t.userInput=""}},[e("strong",$,c(o.label),1),r(" (id : "+c(o.id)+", "+c(o.activity_count)+" activité"+c(o.activity_count>1?"s":"")+")",1)],10,Z)):u("",!0)],64))),256)),a.aucunMotCleNeCorrespond?(n(),i("li",ee,"Aucun mot clé existant correspondant")):u("",!0)])])):u("",!0)])])]),t.idMotCleCible?u("",!0):(n(),i("div",te,le)),e("div",oe,[e("div",ne,[ie,g(e("select",{id:"motCleCible","onUpdate:modelValue":s[5]||(s[5]=o=>t.idMotCleCible=o)},[ce,(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[t.motsClesSelectionnes.has(o.id)?(n(),i("option",{key:0,value:o.id},[e("strong",null,c(o.label),1),r(" (id : "+c(o.id)+", "+c(o.activity_count)+" activité"+c(o.activity_count>1?"s":"")+")",1)],8,re)):u("",!0)],64))),256))],512),[[A,t.idMotCleCible]])])]),t.motsClesSelectionnes.size>=2&&t.idMotCleCible?(n(),i("div",de,[e("div",ue,[r(" En cliquant sur fusionner, le mot clé "),e("strong",ae,c(a.motCleParId(t.idMotCleCible).label),1),r(" (id: "+c(t.idMotCleCible)+", "+c(a.motCleParId(t.idMotCleCible).activity_count)+" activité"+c(a.motCleParId(t.idMotCleCible).activity_count>1?"s":"")+") va être ajouté : ",1),e("ul",null,[(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[t.motsClesSelectionnes.has(o.id)&&o.id!=t.idMotCleCible?(n(),i("li",_e,[r("aux "+c(o.activity_count)+" activité"+c(o.activity_count>1?"s":"")+" ayant le mot clé ",1),e("strong",he,c(o.label),1),r(" (id : "+c(o.id)+")",1)])):u("",!0)],64))),256))]),r(" Ensuite, ces mots clés seront supprimés : "),(n(!0),i(m,null,C(h.touslesmotscles,o=>(n(),i(m,null,[t.motsClesSelectionnes.has(o.id)&&o.id!=t.idMotCleCible?(n(),i("span",me,[e("strong",pe," "+c(o.label),1),r(" (id : "+c(o.id)+")",1)])):u("",!0)],64))),256))])])):u("",!0),e("div",ve,[e("div",Ce,[e("nav",ye,[e("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:s[6]||(s[6]=o=>l.$emit("close"))},[be,r(" Annuler ")]),e("button",{class:"btn btn-success",disabled:t.motsClesSelectionnes.size<2||!t.idMotCleCible,onClick:s[7]||(s[7]=o=>l.$emit("fusion",Array.from(t.motsClesSelectionnes),t.idMotCleCible))},[ge,r(" Fusionner ")],8,fe)])])])])}const ke=L(j,[["render",Me],["__scopeId","data-v-41814f90"]]);const xe={directives:{focus:l=>l.focus()},components:{Loader:V,ActivityMotsClesAdminFusion:ke},props:{url:{default:null}},computed:{motCleExisteDeja(){return this.editedMotCle&&this.editedMotCle.label&&this.touslesmotscles.filter(l=>l.label.toLocaleLowerCase()==this.editedMotCle.label.trim().toLocaleLowerCase()).length>0}},data(){return{touslesmotscles:[],error:null,loading:null,deleteData:null,editedMotCle:null,fusionEnCours:!1}},methods:{fusionner(l,s){this.fusionEnCours=!1,this.loading="Fusion des mots clés",y.post(this.url,{action:"fusion",idsToMerge:l,targetId:s}).then(()=>{this.fetch()},h=>{this.handleError(h)}).finally(()=>{this.loading=null})},applyEdit(){let l="create";this.editedMotCle.id&&(l="update"),this.loading=l=="create"?"Création du mot clé":"Modification du mot clé",y.post(this.url,{action:l,id:this.editedMotCle.id,label:this.editedMotCle.label.trim()}).then(()=>{this.fetch()},s=>{this.handleError(s)}).finally(()=>{this.loading=null,this.editedMotCle=null})},deleteMotCle(){this.loading="Suppression du mot clé",y.post(this.url,{action:"delete",id:this.deleteData.id}).then(()=>{this.touslesmotscles.splice(this.touslesmotscles.findIndex(l=>l.id===this.deleteData.id),1)},l=>{this.handleError(l)}).finally(()=>{this.loading=null,this.deleteData=null})},fetch(){this.loading="Chargement des mots clés",y.get(this.url+"?include_activity_count=true").then(l=>{this.touslesmotscles=l.data.motscles,this.loading=null},l=>{this.handleError(l),this.loading=null})},handleError(l){if(!l.response.data){this.error=l;return}if(l.response.headers.get("content-type").includes("text/html")){var s=document.createElement("html");s.innerHTML=l.response.data;const h=s.querySelector('[id="contenu-principal"]');if(h){this.error=h.innerHTML;return}const v=l.response.headers.get("content-length");if(v&&typeof v=="string"&&!isNaN(v)&&Number(v)<1e3){this.error=l.response.data;return}}this.error=T.manageErrorResponse(l)}},mounted(){this.fetch()}},_=l=>(w("data-v-837865bb"),l=l(),D(),l),we={key:0,class:"overlay",style:{"z-index":"101"}},De={class:"overlay-content",style:{"max-width":"50%"}},Le={class:"alert-danger alert"},Se=_(()=>e("i",{class:"icon-attention-1"},null,-1)),Ee=["innerHTML"],Ie=_(()=>e("i",{class:"icon-cancel-outline"},null,-1)),Ae=_(()=>e("h1",null,[e("span",{class:"icon-tags"}),r(" Mots clés")],-1)),ze={style:{display:"flex","flex-direction":"row-reverse"}},Fe=_(()=>e("span",{class:"icon-plus-circled"},null,-1)),Ne=_(()=>e("span",{class:"icon-tags"},null,-1)),Te={class:"title"},Ve={style:{display:"inline","line-break":"anywhere"}},je=["onClick"],qe=_(()=>e("span",{class:"icon-pencil"},null,-1)),He=["onClick"],Be=_(()=>e("span",{class:"icon-trash"},null,-1)),Ke={style:{"padding-left":"1em","padding-bottom":"0.3em"}},Pe={key:1,class:"overlay"},Xe={class:"overlay-content"},Ue={style:{"padding-right":"1em"}},Re={style:{"line-break":"anywhere"}},Ge={class:"alert-danger alert"},Je=_(()=>e("i",{class:"icon-attention-1"},null,-1)),Oe={style:{"line-break":"anywhere"}},Qe=_(()=>e("br",null,null,-1)),We={key:0},Ye={key:1},Ze={class:"row"},$e={class:"col-md-12"},et={class:"buttons-bar"},tt=_(()=>e("i",{class:"icon-cancel-alt"},null,-1)),st=_(()=>e("i",{class:"icon-valid"},null,-1)),lt={key:2,class:"overlay"},ot={class:"overlay-content",style:{display:"flex","flex-direction":"column"}},nt=_(()=>e("i",{class:"icon-doc"},null,-1)),it={key:0},ct={key:1},rt={key:0,class:"row"},dt=_(()=>e("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[e("span",{style:{"font-size":"xx-large"}},"⚠"),r(" Veuillez saisir un libellé pour le mot clé ")],-1)),ut=[dt],at={key:1,class:"row"},_t=_(()=>e("div",{style:{"background-color":"#fcf8e3","border-color":"#faebcc",color:"#8a6d3b",margin:"1em",padding:"1em"}},[e("span",{style:{"font-size":"xx-large"}},"⚠"),r(" Le mot clé saisi existe déjà ")],-1)),ht=[_t],mt={class:"row",style:{"flex-grow":"2"}},pt={class:"col-md-12",style:{display:"flex","flex-direction":"column"}},vt={class:"row"},Ct={class:"col-md-12"},yt={class:"buttons-bar"},bt=_(()=>e("i",{class:"icon-cancel-alt"},null,-1)),ft=["disabled"],gt=_(()=>e("i",{class:"icon-valid"},null,-1)),Mt={key:3,class:"overlay"},kt={class:"overlay-content",style:{display:"flex","flex-direction":"column"}};function xt(l,s,h,v,t,a){const o=M("Loader"),b=M("ActivityMotsClesAdminFusion"),E=z("focus");return n(),i("section",null,[k(o,{visible:t.loading!=null,text:t.loading},null,8,["visible","text"]),t.error?(n(),i("div",we,[e("div",De,[e("h2",null,[r(" Erreur mots clés "),e("span",{class:"overlay-closer",onClick:s[0]||(s[0]=d=>t.error=null)},"X")]),e("div",Le,[Se,e("div",{innerHTML:t.error},null,8,Ee)]),e("button",{class:"btn btn-default",onClick:s[1]||(s[1]=d=>t.error=null)},[Ie,r(" Fermer ")])])])):u("",!0),Ae,e("div",ze,[e("button",{onClick:s[2]||(s[2]=d=>t.editedMotCle={}),class:"btn btn-primary"},[Fe,r(" Créer un nouveau mot clé")]),e("button",{onClick:s[3]||(s[3]=d=>t.fusionEnCours=!0),class:"btn btn-primary",style:{"margin-right":"1em"}},[Ne,r(" Fusionner des mots clés")])]),e("ol",null,[(n(!0),i(m,null,C(t.touslesmotscles,d=>(n(),i("li",null,[e("div",Te,[e("div",null,[e("span",null,"[id : "+c(d.id)+"]",1),r(),e("h3",Ve,c(d.label),1)]),e("div",null,[e("button",{onClick:f=>t.editedMotCle={id:d.id,label:d.label},class:"cardbutton"},[qe,r(" Éditer")],8,je),e("button",{onClick:f=>t.deleteData=d,class:"cardbutton"},[Be,r(" Supprimer")],8,He)])]),e("div",Ke,c(d.activity_count)+" activité"+c(d.activity_count>1?"s":"")+" pour ce mot clé",1)]))),256))]),t.deleteData?(n(),i("div",Pe,[e("div",Xe,[e("h2",Ue,[r(" Suppression du mot clé : [id : "+c(t.deleteData.id)+'] "',1),e("span",Re,c(t.deleteData.label),1),r('" ? '),e("span",{class:"overlay-closer",onClick:s[4]||(s[4]=d=>t.deleteData=null)},"X")]),e("p",Ge,[Je,r(" Souhaitez-vous supprimer le mot clé : [id : "+c(t.deleteData.id)+"] ",1),e("strong",Oe,c(t.deleteData.label),1),r(" ? "),Qe,r(" Actuellement attaché à "),t.deleteData.activity_count>0?(n(),i("span",We,[e("strong",null,c(t.deleteData.activity_count)+" activité"+c(t.deleteData.activity_count>1?"s":""),1)])):u("",!0),t.deleteData.activity_count==0?(n(),i("span",Ye,"aucune activité")):u("",!0)]),e("div",Ze,[e("div",$e,[e("nav",et,[e("button",{class:"btn",onClick:s[5]||(s[5]=d=>t.deleteData=null),style:{"margin-right":"1em"}},[tt,r(" Annuler ")]),e("button",{class:"btn btn-danger",onClick:s[6]||(s[6]=(...d)=>a.deleteMotCle&&a.deleteMotCle(...d))},[st,r(" Confirmer ")])])])])])])):u("",!0),t.editedMotCle?(n(),i("div",lt,[e("div",ot,[e("h2",null,[e("small",null,[nt,t.editedMotCle.id?u("",!0):(n(),i("span",it,"Création d'un nouveau mot clé")),t.editedMotCle.id?(n(),i("span",ct,"Modification d'un mot clé")):u("",!0)]),e("span",{class:"overlay-closer",onClick:s[7]||(s[7]=d=>t.editedMotCle=null)},"X")]),t.editedMotCle.label?u("",!0):(n(),i("div",rt,ut)),a.motCleExisteDeja?(n(),i("div",at,ht)):u("",!0),e("div",mt,[e("div",pt,[g(e("input",{maxlength:"128","onUpdate:modelValue":s[8]||(s[8]=d=>t.editedMotCle.label=d),id:"content",class:"form-control",style:{"flex-grow":"2"}},null,512),[[E],[x,t.editedMotCle.label]])])]),e("div",vt,[e("div",Ct,[e("nav",yt,[e("button",{class:"btn btn-danger",style:{"margin-right":"1em"},onClick:s[9]||(s[9]=d=>t.editedMotCle=null)},[bt,r(" Annuler ")]),e("button",{class:"btn btn-success",onClick:s[10]||(s[10]=F(d=>a.applyEdit(),["prevent"])),disabled:!t.editedMotCle.label||a.motCleExisteDeja},[gt,r(" Enregistrer ")],8,ft)])])])])])):u("",!0),t.fusionEnCours?(n(),i("div",Mt,[e("div",kt,[k(b,{onClose:s[11]||(s[11]=d=>t.fusionEnCours=!1),onFusion:s[12]||(s[12]=(d,f)=>a.fusionner(d,f)),touslesmotscles:t.touslesmotscles},null,8,["touslesmotscles"])])])):u("",!0)])}const wt=L(xe,[["render",xt],["__scopeId","data-v-837865bb"]]);let S="#activity-mots-cles-admin",Dt=document.querySelector(S);const Lt=N(wt,{url:Dt.dataset.url});Lt.mount(S);
diff --git a/public/js/oscar/vite/dist/assets/activitynotes-e551577c.js b/public/js/oscar/vite/dist/assets/activitynotes-fbb89777.js
similarity index 86%
rename from public/js/oscar/vite/dist/assets/activitynotes-e551577c.js
rename to public/js/oscar/vite/dist/assets/activitynotes-fbb89777.js
index ca898409a..8282a440f 100644
--- a/public/js/oscar/vite/dist/assets/activitynotes-e551577c.js
+++ b/public/js/oscar/vite/dist/assets/activitynotes-fbb89777.js
@@ -1 +1 @@
-import{y as t}from"../vendor.js";import{A as o}from"../vendor12.js";import"../vendor17.js";import"../vendor7.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";let e="#activity-notes",a=document.querySelector(e);const l=t(o,{activityid:a.dataset.activityid,url:a.dataset.url,showallowed:a.dataset.showallowed=="1",manageuserallowed:a.dataset.manageuserallowed=="1",manageadminallowed:a.dataset.manageadminallowed=="1",userid:a.dataset.userid});l.mount(e);
+import{A as t}from"../vendor.js";import{A as o}from"../vendor12.js";import"../vendor17.js";import"../vendor7.js";import"../vendor14.js";import"../vendor18.js";import"../vendor16.js";let e="#activity-notes",a=document.querySelector(e);const l=t(o,{activityid:a.dataset.activityid,url:a.dataset.url,showallowed:a.dataset.showallowed=="1",manageuserallowed:a.dataset.manageuserallowed=="1",manageadminallowed:a.dataset.manageadminallowed=="1",userid:a.dataset.userid});l.mount(e);
diff --git a/public/js/oscar/vite/dist/assets/activitypcruinformations-dff9ae49.js b/public/js/oscar/vite/dist/assets/activitypcruinformations-dff9ae49.js
new file mode 100644
index 000000000..738e95e59
--- /dev/null
+++ b/public/js/oscar/vite/dist/assets/activitypcruinformations-dff9ae49.js
@@ -0,0 +1 @@
+import{s as D,q as v,r as M,o as a,c as u,b as V,j as N,d as e,g as c,a as m,t as s,F as p,k as f,h as K,n as d,w as l,f as h,v as P,l as y,z as I,A as G}from"../vendor.js";import{A as O}from"../vendor14.js";import{L as X}from"../vendor17.js";import{M as W}from"../vendor5.js";import{_ as J}from"../vendor7.js";D.defaults.headers.common.Accept="application/json";D.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";const Q={name:"ActivityPcruInformations",components:{Loader:X,Modal:W},props:{urlActivity:{required:!0},urlPcruApi:{required:!0}},computed:{objetErreursPasParDefaut(){let n=[];return!this.pcru.activityPcruInformations.objet||this.pcru.activityPcruInformations.objet.trim()==""?n.push("Le champ Objet est obligatoire et doit être défini"):this.pcru.activityPcruInformations.objet.trim().length>1e3&&n.push("Le champ Objet doit faire moins de 1000 caractères"),this.objetAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.objetErreurs))]),n},objetErreurs(){return this.pcru.activityPcruInformations.utiliserObjetParDefaut?this.pcru.pcruInformationParDefaut.objetErreurs:this.objetErreursPasParDefaut},labintelErreursPasParDefaut(){let n=[];return!this.pcru.activityPcruInformations.labintel||this.pcru.activityPcruInformations.labintel.trim()==""?n.push("Le champ CodeUniteLabintel est obligatoire et doit être défini"):this.pcru.activityPcruInformations.labintel.trim().length>10&&n.push("Le champ CodeUniteLabintel doit faire moins de 10 caractères"),this.labintelAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.labintelErreurs))]),n},labintelErreurs(){return this.pcru.activityPcruInformations.utiliserLabintelParDefaut?this.pcru.pcruInformationParDefaut.labintelErreurs:this.labintelErreursPasParDefaut},sigleErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.sigle&&this.pcru.activityPcruInformations.sigle.trim().length>20&&n.push("Le champ SigleUnite doit faire moins de 20 caractères"),this.sigleAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.sigleErreurs))]),n},sigleErreurs(){return this.pcru.activityPcruInformations.utiliserSigleParDefaut?this.pcru.pcruInformationParDefaut.sigleErreurs:this.sigleErreursPasParDefaut},numContratErreursPasParDefaut(){let n=[];return!this.pcru.activityPcruInformations.numContrat||this.pcru.activityPcruInformations.numContrat.trim()==""?n.push("Le champ NumContratTutelleGestionnaire est obligatoire et doit être défini"):this.pcru.activityPcruInformations.numContrat.trim().length>30&&n.push("Le champ NumContratTutelleGestionnaire doit faire moins de 30 caractères"),this.numContratAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.numContratErreurs))]),n},numContratErreurs(){return this.pcru.activityPcruInformations.utiliserNumContratParDefaut?this.pcru.pcruInformationParDefaut.numContratErreurs:this.numContratErreursPasParDefaut},equipeErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.equipe&&this.pcru.activityPcruInformations.equipe.trim().length>150&&n.push("Le champ Equipe doit faire moins de 150 caractères"),this.equipeAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.equipeErreurs))]),n},typeContratErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.pcruTypeContractId||n.push("Le champ TypeContrat est obligatoire et doit être défini"),this.typeContratAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.typeContratErreurs))]),n},typeContratErreurs(){return this.pcru.activityPcruInformations.utiliserTypeContratParDefaut?this.pcru.pcruInformationParDefaut.typeContratErreurs:this.typeContratErreursPasParDefaut},acronymeErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.acronyme&&this.pcru.activityPcruInformations.acronyme.trim().length>50&&n.push("Le champ Acronyme doit faire moins de 50 caractères"),this.acronymeAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.acronymeErreurs))]),n},acronymeErreurs(){return this.pcru.activityPcruInformations.utiliserAcronymeParDefaut?this.pcru.pcruInformationParDefaut.acronymeErreurs:this.acronymeErreursPasParDefaut},contratsAssociesErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.contratsAssocies&&this.pcru.activityPcruInformations.contratsAssocies.trim().length>300&&n.push("Le champ ContratsAssocies doit faire moins de 300 caractères"),this.contratsAssociesAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.contratsAssociesErreurs))]),n},responsableScientifiqueErreursPasParDefaut(){let n=[];return!this.pcru.activityPcruInformations.responsableScientifique||this.pcru.activityPcruInformations.responsableScientifique.trim()==""?n.push("Le champ ResponsableScientifique est obligatoire et doit être défini"):this.pcru.activityPcruInformations.responsableScientifique.trim().length>50&&n.push("Le champ ResponsableScientifique doit faire moins de 50 caractères"),this.responsableScientifiqueAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.responsableScientifiqueErreurs))]),n},responsableScientifiqueErreurs(){return this.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut?this.pcru.pcruInformationParDefaut.responsableScientifiqueErreurs:this.responsableScientifiqueErreursPasParDefaut},employeurResponsableScientifiqueErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.employeurResponsableScientifique&&this.pcru.activityPcruInformations.employeurResponsableScientifique.trim().length>50&&n.push("Le champ EmployeurResponsableScientifique doit faire moins de 150 caractères"),this.employeurResponsableScientifiqueAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.employeurResponsableScientifiqueErreurs))]),n},partenairesErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.partenaires&&this.pcru.activityPcruInformations.partenaires.trim().length>200&&n.push("Le champ Partenaires doit faire moins de 200 caractères"),this.partenairesAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.partenairesErreurs))]),n},partenairesErreurs(){return this.pcru.activityPcruInformations.utiliserPartenairesParDefaut?this.pcru.pcruInformationParDefaut.partenairesErreurs:this.partenairesErreursPasParDefaut},partenairePrincipalErreursPasParDefaut(){let n=[];return!this.pcru.activityPcruInformations.partenairePrincipal||this.pcru.activityPcruInformations.partenairePrincipal.trim()==""?n.push("Le champ PartenairePrincipal est obligatoire et doit être défini"):this.pcru.activityPcruInformations.partenairePrincipal.trim().length>this.pcru.partenairePrincipalMaxLength&&n.push("Le champ PartenairePrincipal doit faire moins de "+this.pcru.partenairePrincipalMaxLength+" caractères"),this.partenairePrincipalAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.partenairePrincipalErreurs))]),n},partenairePrincipalErreurs(){return this.pcru.activityPcruInformations.utiliserPartenairePrincipalParDefaut?this.pcru.pcruInformationParDefaut.partenairePrincipalErreurs:this.partenairePrincipalErreursPasParDefaut},idPartenairePrincipalErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.idPartenairePrincipal&&this.pcru.activityPcruInformations.idPartenairePrincipal.trim().length>this.pcru.idPartenairePrincipalMaxLength&&n.push("Le champ IdPartenairePrincipal doit faire moins de "+this.pcru.idPartenairePrincipalMaxLength+" caractères"),this.idPartenairePrincipalAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.idPartenairePrincipalErreurs))]),n},idPartenairePrincipalErreurs(){return this.pcru.activityPcruInformations.utiliserIdPartenairePrincipalParDefaut?this.pcru.pcruInformationParDefaut.idPartenairePrincipalErreurs:this.idPartenairePrincipalErreursPasParDefaut},lieuExecutionErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.lieuExecution&&this.pcru.activityPcruInformations.lieuExecution.trim().length>this.pcru.lieuExecutionMaxLength&&n.push("Le champ LieuExecution doit faire moins de "+this.pcru.lieuExecutionMaxLength+" caractères"),this.lieuExecutionAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.lieuExecutionErreurs))]),n},dateDerniereSignatureErreursPasParDefaut(){let n=[];return!this.pcru.activityPcruInformations.dateDerniereSignature||this.pcru.activityPcruInformations.dateDerniereSignature.trim()==""?n.push("Le champ DateDerniereSignature est obligatoire et doit être défini"):v(this.pcru.activityPcruInformations.dateDerniereSignature,"DD-MM-YYYY",!0).isValid()||n.push("Le champ DateDerniereSignature doit être une date valide au format jj-mm-aaaa"),this.dateDerniereSignatureAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.dateDerniereSignatureErreurs))]),n},dateDerniereSignatureErreurs(){return this.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut?this.pcru.pcruInformationParDefaut.dateDerniereSignatureErreurs:this.dateDerniereSignatureErreursPasParDefaut},dureeErreursPasParDefaut(){let n=[];if(this.pcru.activityPcruInformations.duree!=null&&this.pcru.activityPcruInformations.duree!=""){this.pcru.activityPcruInformations.duree>999.5&&n.push("Le champ Duree contient une valeur trop grande."),this.pcru.activityPcruInformations.duree<.5&&n.push("Le champ Duree ne peut pas être plus petit que 0,5 mois.");const i=Math.abs(this.pcru.activityPcruInformations.duree-Math.trunc(this.pcru.activityPcruInformations.duree));i!=0&&i!=.5&&n.push("Si le champ Duree doit avoir une valeur après la virgule, ça ne peut être que 0,5")}else(this.pcru.activityPcruInformations.utiliserDateFinParDefaut&&(!this.pcru.pcruInformationParDefaut.dateFin||this.pcru.pcruInformationParDefaut.dateFin.trim()=="")||!this.pcru.activityPcruInformations.utiliserDateFinParDefaut&&(!this.pcru.activityPcruInformations.dateFin||this.pcru.activityPcruInformations.dateFin.trim()==""))&&n.push("Si la date de fin du contrat n'est pas renseignée, alors le champ Duree doit l'être.");return this.dureeAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.dureeErreurs))]),n},dateDebutErreursPasParDefaut(){let n=[];return!this.pcru.activityPcruInformations.dateDebut||this.pcru.activityPcruInformations.dateDebut.trim()==""?n.push("Le champ DateDebut est obligatoire et doit être défini"):v(this.pcru.activityPcruInformations.dateDebut,"DD-MM-YYYY",!0).isValid()||n.push("Le champ DateDebut doit être une date valide au format jj-mm-aaaa"),this.dateDebutAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.dateDebutErreurs))]),n},dateDebutErreurs(){return this.pcru.activityPcruInformations.utiliserDateDebutParDefaut?this.pcru.pcruInformationParDefaut.dateDebutErreurs:this.dateDebutErreursPasParDefaut},dateFinErreursParDefaut(){let n=this.pcru.pcruInformationParDefaut.dateFinErreurs;if(this.dateDebutErreurs.length==0&&this.pcru.pcruInformationParDefaut.dateFin&&v(this.pcru.pcruInformationParDefaut.dateFin,"DD-MM-YYYY",!0).isValid()){let i=this.pcru.pcruInformationParDefaut.dateDebut;this.pcru.activityPcruInformations.utiliserDateDebutParDefaut||(i=this.pcru.activityPcruInformations.dateDebut);const _=v(i,"DD-MM-YYYY",!0);v(this.pcru.pcruInformationParDefaut.dateFin,"DD-MM-YYYY",!0).isBefore(_)?n=[...new Set(n.concat(["La date de fin doit être postérieure à la date de début"]))]:n=n.filter(t=>t!=="La date de fin doit être postérieure à la date de début")}return this.pcru.activityPcruInformations.duree?n=n.filter(i=>i!=="Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être."):this.pcru.pcruInformationParDefaut.dateFin||(n=[...new Set(n.concat(["Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être."]))]),n},dateFinErreursPasParDefaut(){let n=[];if(!this.pcru.activityPcruInformations.dateFin&&!this.pcru.activityPcruInformations.duree&&n.push("Si la durée du contrat n'est pas renseignée, alors le champ DateFin doit l'être."),this.pcru.activityPcruInformations.dateFin&&this.pcru.activityPcruInformations.dateFin.trim()!=""&&!v(this.pcru.activityPcruInformations.dateFin,"DD-MM-YYYY",!0).isValid()&&n.push("Le champ DateFin doit être une date valide au format jj-mm-aaaa"),n.length==0&&this.dateDebutErreurs.length==0){let i=this.pcru.pcruInformationParDefaut.dateDebut;this.pcru.activityPcruInformations.utiliserDateDebutParDefaut||(i=this.pcru.activityPcruInformations.dateDebut);const _=v(i,"DD-MM-YYYY",!0);v(this.pcru.activityPcruInformations.dateFin,"DD-MM-YYYY",!0).isBefore(_)&&n.push("La date de fin doit être postérieure à la date de début")}return this.dateFinAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.dateFinErreurs))]),n},dateFinErreurs(){return this.pcru.activityPcruInformations.utiliserDateFinParDefaut?this.dateFinErreursParDefaut:this.dateFinErreursPasParDefaut},montantPercuUniteErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.montantPercuUnite==null||typeof this.pcru.activityPcruInformations.montantPercuUnite!="number"?n.push("Le champ MontantPercuUnite est obligatoire et doit être défini"):this.pcru.activityPcruInformations.montantPercuUnite!=null&&this.pcru.activityPcruInformations.montantPercuUnite!=""&&(this.pcru.activityPcruInformations.montantPercuUnite>999999999999e-2&&n.push("Le champ MontantPercuUnite contient une valeur trop grande."),this.pcru.activityPcruInformations.montantPercuUnite<-999999999999e-2&&n.push("Le champ MontantPercuUnite contient une valeur trop petite.")),this.montantPercuUniteAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.montantPercuUniteErreurs))]),n},coutTotalEtudeErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.coutTotalEtude!=null&&typeof this.pcru.activityPcruInformations.coutTotalEtude=="number"&&this.pcru.activityPcruInformations.coutTotalEtude!=""&&(this.pcru.activityPcruInformations.coutTotalEtude>999999999999e-2&&n.push("Le champ CoutTotalEtude contient une valeur trop grande."),this.pcru.activityPcruInformations.coutTotalEtude<-999999999999e-2&&n.push("Le champ CoutTotalEtude contient une valeur trop petite.")),this.coutTotalEtudeAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.coutTotalEtudeErreurs))]),n},montantTotalErreurs(){return this.pcru.activityPcruInformations.utiliserMontantTotalParDefaut?this.pcru.pcruInformationParDefaut.montantTotalErreurs:[]},commentairesErreursPasParDefaut(){let n=[];return this.pcru.activityPcruInformations.commentaires&&this.pcru.activityPcruInformations.commentaires.trim().length>this.pcru.commentairesMaxLength&&n.push("Le champ Commentaires doit faire moins de "+this.pcru.commentairesMaxLength+" caractères"),this.commentairesAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.commentairesErreurs))]),n},referenceErreursPasParDefaut(){let n=[];return!this.pcru.activityPcruInformations.reference||this.pcru.activityPcruInformations.reference.trim()==""?n.push("Le champ Reference est obligatoire et doit être défini"):this.pcru.activityPcruInformations.reference&&this.pcru.activityPcruInformations.reference.trim().length>this.pcru.referenceMaxLength&&n.push("Le champ Reference doit faire moins de "+this.pcru.referenceMaxLength+" caractères"),this.referenceAfficherLesErreursServeur&&(n=[...new Set(n.concat(this.pcru.activityPcruInformations.referenceErreurs))]),n},referenceErreurs(){return this.pcru.activityPcruInformations.utiliserReferenceParDefaut?this.pcru.pcruInformationParDefaut.referenceErreurs:this.referenceErreursPasParDefaut},toutesLesErreurs(){return this.objetErreurs.concat(this.labintelErreurs.concat(this.sigleErreurs.concat(this.numContratErreurs.concat(this.equipeErreursPasParDefaut.concat(this.typeContratErreurs.concat(this.acronymeErreurs.concat(this.contratsAssociesErreursPasParDefaut.concat(this.responsableScientifiqueErreurs.concat(this.employeurResponsableScientifiqueErreursPasParDefaut.concat(this.partenairesErreurs.concat(this.partenairePrincipalErreurs.concat(this.idPartenairePrincipalErreurs.concat(this.pcru.pcruInformationParDefaut.sourceFinancementErreurs.concat(this.lieuExecutionErreursPasParDefaut.concat(this.dateDerniereSignatureErreurs.concat(this.dureeErreursPasParDefaut.concat(this.dateDebutErreurs.concat(this.dateFinErreurs.concat(this.montantPercuUniteErreursPasParDefaut.concat(this.coutTotalEtudeErreursPasParDefaut.concat(this.montantTotalErreurs.concat(this.pcru.pcruInformationParDefaut.poleCompetitiviteErreurs.concat(this.commentairesErreursPasParDefaut.concat(this.referenceErreurs))))))))))))))))))))))))},erreursCoteServeur(){return this.pcru.enErreur}},data(){return{loading:"",error:null,pcru:null,objetAfficherLesErreursServeur:!0,labintelAfficherLesErreursServeur:!0,sigleAfficherLesErreursServeur:!0,numContratAfficherLesErreursServeur:!0,equipeAfficherLesErreursServeur:!0,typeContratAfficherLesErreursServeur:!0,acronymeAfficherLesErreursServeur:!0,contratsAssociesAfficherLesErreursServeur:!0,responsableScientifiqueAfficherLesErreursServeur:!0,employeurResponsableScientifiqueAfficherLesErreursServeur:!0,partenairesAfficherLesErreursServeur:!0,partenairePrincipalAfficherLesErreursServeur:!0,idPartenairePrincipalAfficherLesErreursServeur:!0,lieuExecutionAfficherLesErreursServeur:!0,dateDerniereSignatureAfficherLesErreursServeur:!0,dureeAfficherLesErreursServeur:!0,dateDebutAfficherLesErreursServeur:!0,dateFinAfficherLesErreursServeur:!0,montantPercuUniteAfficherLesErreursServeur:!0,coutTotalEtudeAfficherLesErreursServeur:!0,montantTotalAfficherLesErreursServeur:!0,commentairesAfficherLesErreursServeur:!0,referenceAfficherLesErreursServeur:!0,activityId:null,envoiActif:!1,core:null,budget:null}},methods:{formatDate(n){return new Intl.DateTimeFormat(void 0,{dateStyle:"full",timeStyle:"medium"}).format(Date.parse(n))},checkObjetParDefaut(n){this.pcru.activityPcruInformations.utiliserObjetParDefaut?this.pcru.activityPcruInformations.objet=null:(this.pcru.activityPcruInformations.objet=this.pcru.pcruInformationParDefaut.objet.substring(0,1e3),document.getElementById("objet").focus())},checkLabintelParDefaut(n){this.pcru.activityPcruInformations.labintel=null,this.pcru.activityPcruInformations.utiliserLabintelParDefaut||(this.pcru.pcruInformationParDefaut.labintel!=null&&(this.pcru.activityPcruInformations.labintel=this.pcru.pcruInformationParDefaut.labintel.substring(0,10)),document.getElementById("labintel").focus())},checkSigleParDefaut(n){this.pcru.activityPcruInformations.sigle=null,this.pcru.activityPcruInformations.utiliserSigleParDefaut||(this.pcru.pcruInformationParDefaut.sigle!=null&&(this.pcru.activityPcruInformations.sigle=this.pcru.pcruInformationParDefaut.sigle.substring(0,20)),document.getElementById("sigleunite").focus())},checkNumContratParDefaut(n){this.pcru.activityPcruInformations.numContrat=null,this.pcru.activityPcruInformations.utiliserNumContratParDefaut||(this.pcru.pcruInformationParDefaut.numContrat!=null&&(this.pcru.activityPcruInformations.numContrat=this.pcru.pcruInformationParDefaut.numContrat.substring(0,30)),document.getElementById("numcontrat").focus())},checkTypeContratParDefaut(n){this.pcru.activityPcruInformations.pcruTypeContractId=null,this.pcru.activityPcruInformations.utiliserTypeContratParDefaut||(this.pcru.pcruInformationParDefaut.typeContratId!=null&&(this.pcru.activityPcruInformations.pcruTypeContractId=this.pcru.pcruInformationParDefaut.typeContratId),document.getElementById("typeContrat").focus())},checkAcronymeParDefaut(n){this.pcru.activityPcruInformations.utiliserAcronymeParDefaut?this.pcru.activityPcruInformations.acronyme=null:(this.pcru.activityPcruInformations.acronyme=this.pcru.pcruInformationParDefaut.acronyme.substring(0,50),document.getElementById("acronyme").focus())},checkResponsableScientifiqueParDefaut(n){this.pcru.activityPcruInformations.responsableScientifique=null,this.pcru.activityPcruInformations.utiliserResponsableScientifiqueParDefaut||(this.pcru.pcruInformationParDefaut.responsableScientifique!=null&&(this.pcru.activityPcruInformations.responsableScientifique=this.pcru.pcruInformationParDefaut.responsableScientifique.substring(0,50)),document.getElementById("responsableScientifique").focus())},checkPartenairesParDefaut(n){this.pcru.activityPcruInformations.partenaires=null,this.pcru.activityPcruInformations.utiliserPartenairesParDefaut||(this.pcru.pcruInformationParDefaut.partenaires!=null&&(this.pcru.activityPcruInformations.partenaires=this.pcru.pcruInformationParDefaut.partenaires.substring(0,200)),document.getElementById("partenaires").focus())},checkPartenairePrincipalParDefaut(n){this.pcru.activityPcruInformations.partenairePrincipal=null,this.pcru.activityPcruInformations.utiliserPartenairePrincipalParDefaut||(this.pcru.pcruInformationParDefaut.partenairePrincipal!=null&&(this.pcru.activityPcruInformations.partenairePrincipal=this.pcru.pcruInformationParDefaut.partenairePrincipal.substring(0,this.pcru.partenairePrincipalMaxLength)),document.getElementById("partenairePrincipal").focus())},checkIdPartenairePrincipalParDefaut(n){this.pcru.activityPcruInformations.idPartenairePrincipal=null,this.pcru.activityPcruInformations.utiliserIdPartenairePrincipalParDefaut||(this.pcru.pcruInformationParDefaut.idPartenairePrincipal!=null&&(this.pcru.activityPcruInformations.idPartenairePrincipal=this.pcru.pcruInformationParDefaut.idPartenairePrincipal.substring(0,this.pcru.idPartenairePrincipalMaxLength)),document.getElementById("idPartenairePrincipal").focus())},checkDateDerniereSignatureParDefaut(n){this.pcru.activityPcruInformations.dateDerniereSignature=null,this.pcru.activityPcruInformations.utiliserDateDerniereSignatureParDefaut||(this.pcru.pcruInformationParDefaut.dateDerniereSignature!=null&&(this.pcru.activityPcruInformations.dateDerniereSignature=this.pcru.pcruInformationParDefaut.dateDerniereSignature.substring(0,10)),document.getElementById("dateDerniereSignature").focus())},checkDateDebutParDefaut(n){this.pcru.activityPcruInformations.dateDebut=null,this.pcru.activityPcruInformations.utiliserDateDebutParDefaut||(this.pcru.pcruInformationParDefaut.dateDebut!=null&&(this.pcru.activityPcruInformations.dateDebut=this.pcru.pcruInformationParDefaut.dateDebut.substring(0,10)),document.getElementById("dateDebut").focus())},checkDateFinParDefaut(n){this.pcru.activityPcruInformations.dateFin=null,this.pcru.activityPcruInformations.utiliserDateFinParDefaut||(this.pcru.pcruInformationParDefaut.dateFin!=null&&(this.pcru.activityPcruInformations.dateFin=this.pcru.pcruInformationParDefaut.dateFin.substring(0,10)),document.getElementById("dateFin").focus())},checkMontantTotalParDefaut(n){this.pcru.activityPcruInformations.montantTotal=null,this.pcru.activityPcruInformations.utiliserMontantTotalParDefaut||(this.pcru.pcruInformationParDefaut.montantTotal!==null&&(this.pcru.activityPcruInformations.montantTotal=this.pcru.pcruInformationParDefaut.montantTotal),document.getElementById("montantTotal").focus())},checkReferenceParDefaut(n){this.pcru.activityPcruInformations.reference=null,this.pcru.activityPcruInformations.utiliserReferenceParDefaut||(this.pcru.pcruInformationParDefaut.reference!=null&&(this.pcru.activityPcruInformations.reference=this.pcru.pcruInformationParDefaut.reference.substring(0,this.pcru.referenceMaxLength)),document.getElementById("reference").focus())},enregistrer(n){this.loading="Enregistrement des informations PCRU",D.post(this.urlPcruApi,{action:"enregistrer",activityId:this.activityId,activityPcruInformations:this.pcru.activityPcruInformations}).then(i=>{this.pcru=i.data.pcru,this.envoiActif=this.pcru.activityPcruInformations.envoiActif},i=>{this.handlerError(O.manageErrorResponse(i)),this.fetch()}).finally(()=>{this.loading=""})},handlerError(n){this.error=n.message},fetch(){this.loading="Chargement des informations de l'activité",D.get(this.urlActivity).then(n=>{this.core=n.data.activity.datas.core,this.budget=n.data.activity.datas.budget,this.activityId=n.data.activity.datas.core.id,this.pcru=n.data.activity.datas.pcru,this.envoiActif=this.pcru.activityPcruInformations.envoiActif},n=>{this.handlerError(O.manageErrorResponse(n))}).finally(n=>{this.loading=""})}},mounted(){this.fetch()}},Z={class:"alert alert-danger"},$={style:{display:"flex","justify-content":"space-between"}},ee=e("h1",null,"Informations PCRU",-1),te={style:{"align-content":"center"}},re=["href"],ie={key:0},ne={key:0,style:{padding:"1em"},class:"warning"},ae={key:1,style:{"margin-top":"1em",padding:"1em"},class:"warning"},ue=e("b",null,"pas activé",-1),se={key:2,class:"info",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},oe={key:3,class:"error",style:{"margin-top":"1em"}},ce={key:4,class:"success",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},le={key:5,class:"success",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},pe={key:6,class:"warning",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},fe={key:7,class:"success",style:{"margin-top":"1em",padding:"15px",border:"1px solid transparent"}},de={key:8,style:{padding:"1em","margin-top":"1em"},class:"warning"},me={key:9},Pe=e("div",{style:{display:"flex","justify-content":"space-between"}},[e("h2",null,"Historique")],-1),he={key:0},ve={key:1},ye={key:2},_e={key:3},De={key:10},Ie=e("div",{style:{display:"flex","justify-content":"space-between"}},[e("h2",null,"Données envoyées à PCRU")],-1),be={id:"donnees-envoyees-table"},ge=I('N°Intitulé PCRUDescription PCRUOrigine de la valeur par défaut dans OscarValeur envoyée1Le titre/l’objet du contratL'intitulé de l'activité',9),Ee={style:{"font-weight":"bold"}},Se=e("span",null,"2",-1),Le=e("label",{for:"labintel"},"CodeUniteLabintel",-1),Ce=e("span",null,"Le code labintel de l’unité du contrat",-1),xe={style:{"font-weight":"bold"}},ke=e("span",null,"3",-1),Ae=e("label",{for:"sigleunite"},"SigleUnite",-1),qe=e("span",null,"Le sigle de l’unité du contrat",-1),je={style:{"font-weight":"bold"}},Ue=e("span",null,"4",-1),Re=e("label",{for:"numcontrat"},"NumContratTutelleGestionnaire",-1),we=e("span",null,"Le numéro de contrat pour la tutelle qui en assure la gestion, ce numéro ne peut être modifié que par les personnes appartenant à l’organisme gestionnaire.",-1),Te=e("span",null,"N° Oscar",-1),Fe={style:{"font-weight":"bold"}},Me=e("span",null,"5",-1),Ve=e("label",{for:"equipe"},"Equipe",-1),Ne=e("span",null,"Le nom de l’équipe concernée par le contrat (ou de la sous-unité)",-1),Oe=e("span",null,"Pas de valeur par défaut",-1),Ye={style:{"font-weight":"bold"}},Be=e("span",null,"6",-1),ze=e("label",{for:"typeContrat"},"TypeContrat",-1),He=e("span",null,"Le type du contrat",-1),Ke=e("span",null,"Configuration des correspondances entre les types d'activités Oscar et les types de contrat PCRU",-1),Ge={style:{"font-weight":"bold"}},Xe=e("span",null,"7",-1),We=e("label",{for:"acronyme"},"Acronyme",-1),Je=e("span",null,"L’acronyme du contrat",-1),Qe=e("span",null,"L'acronyme du projet de l'activité",-1),Ze={style:{"font-weight":"bold"}},$e=e("span",null,"8",-1),et=e("label",{for:"contratsAssocies"},"ContratsAssocies",-1),tt=e("span",null,"Les numéros de tutelle gestionnaire des contrats associés séparés par un pipe «|»",-1),rt=e("span",null,"Pas de valeur par défaut",-1),it={style:{"font-weight":"bold"}},nt=e("span",null,"9",-1),at=e("label",{for:"responsableScientifique"},"ResponsableScientifique",-1),ut=e("span",null,"Le responsable scientifique",-1),st={style:{"font-weight":"bold"}},ot=e("span",null,"10",-1),ct=e("label",{for:"employeurResponsableScientifique"},"EmployeurResponsableScientifique",-1),lt=e("span",null,"L’employeur du responsable scientifique",-1),pt=e("span",null,"Pas de valeur par défaut",-1),ft={style:{"font-weight":"bold"}},dt=e("span",null,"11",-1),mt=e("label",{for:"coordinateurConsortium"},"CoordinateurConsortium",-1),Pt=e("span",null,"Indique si le responsable scientifique est aussi coordinateur du consortium",-1),ht=e("span",null,"Pas de valeur par défaut",-1),vt={style:{"font-weight":"bold"}},yt=e("span",null,"12",-1),_t=e("label",{for:"partenaires"},"Partenaires",-1),Dt=e("span",null,'Ensemble de partenaires du contrat séparés par un pipe ("|")',-1),It={style:{"font-weight":"bold"}},bt=e("span",null,"13",-1),gt=e("label",{for:"partenairePrincipal"},"PartenairePrincipal",-1),Et=e("span",null,"Le libellé du partenaire principal",-1),St={style:{"font-weight":"bold"}},Lt=e("span",null,"14",-1),Ct=e("label",{for:"idPartenairePrincipal"},"IdPartenairePrincipal",-1),xt=e("span",null,"L'identifiant du Partenaire Principal (Référence du référentiel partenaire ou SIRET ou SIREN ou TVA intracommunautaire ou DUN)",-1),kt=e("span",null,"Le SIRET ou le numéro de TVA intracommunautaire ou le N°DUNS du partenaire principal",-1),At={style:{"font-weight":"bold"}},qt=e("span",null,"15",-1),jt=e("label",null,"SourceFinancement",-1),Ut=e("span",null,"Le type de source de financement du projet",-1),Rt=e("span",null,"La source de financement (PCRU) définie sur la page de l'activité",-1),wt={style:{"font-weight":"bold"}},Tt=e("span",null,"16",-1),Ft=e("label",{for:"lieuExecution"},"LieuExecution",-1),Mt=e("span",null,"Le lieu d’exécution de l’unité de recherche",-1),Vt=e("span",null,"Pas de valeur par défaut",-1),Nt={style:{"font-weight":"bold"}},Ot=e("span",null,"17",-1),Yt=e("label",{for:"dateDerniereSignature"},"DateDerniereSignature",-1),Bt=e("span",null,"La date de la dernière signature du contrat",-1),zt=e("span",null,"La date de signature de la fiche activité",-1),Ht={style:{"font-weight":"bold"}},Kt=e("span",null,"18",-1),Gt=e("label",{for:"duree"},"Duree",-1),Xt=e("span",null,"La durée du contrat en mois (minimum 0,5)",-1),Wt=e("span",null,"Pas de valeur par défaut",-1),Jt={style:{"font-weight":"bold"}},Qt=e("span",null,"19",-1),Zt=e("label",{for:"dateDebut"},"DateDebut",-1),$t=e("span",null,"La date de début du contrat",-1),er=e("span",null,"La date de début du contrat de la fiche activité",-1),tr={style:{"font-weight":"bold"}},rr=e("span",null,"20",-1),ir=e("label",{for:"dateFin"},"DateFin",-1),nr=e("span",null,"La date de fin du contrat",-1),ar=e("span",null,"La date de fin du contrat de la fiche activité",-1),ur={style:{"font-weight":"bold"}},sr=e("span",null,"21",-1),or=e("label",{for:"montantPercuUnite"},"MontantPercuUnite",-1),cr=e("span",null,"Le montant reçu par l'Etablissement pour l'unité, y compris les frais de gestion forfaitaires",-1),lr=e("span",null,"Pas de valeur par défaut",-1),pr={style:{"font-weight":"bold"}},fr=e("span",null,"22",-1),dr=e("label",{for:"coutTotalEtude"},"CoutTotalEtude",-1),mr=e("span",null,"Le coût complet supporté par l’unité ou les unités mixtes concernées y compris la masse salariale et y compris les frais de gestion forfaitaires et éligibles auxtermes du règlement financier du financeur",-1),Pr=e("span",null,"Pas de valeur par défaut",-1),hr={style:{"font-weight":"bold"}},vr=e("span",null,"23",-1),yr=e("label",{for:"montantTotal"},"MontantTotal",-1),_r=e("span",null,"Le montant total de la contribution du financeur",-1),Dr=e("span",null,"Le montant de l'activité",-1),Ir={style:{"font-weight":"bold"}},br=e("span",null,"24",-1),gr=e("label",null,"ValidePoleCompetitivite",-1),Er=e("span",null,"Indique si le contrat a été validé par un pôle de compétitivité",-1),Sr=e("span",null,`La case "validé par le pôle de compétitivité (PCRU)" définie sur la page de l'activité`,-1),Lr={style:{"font-weight":"bold"}},Cr=e("span",null,"25",-1),xr=e("label",null,"PoleCompetitivite",-1),kr=e("span",null,"Nom du pôle de compétitivité qui a validé le projet",-1),Ar=e("span",null,"Le pôle de compétitivité (PCRU) défini sur la page de l'activité",-1),qr={style:{"font-weight":"bold"}},jr=e("span",null,"26",-1),Ur=e("label",{for:"commentaires"},"Commentaires",-1),Rr=e("span",null,"Commentaire du gestionnaire de contrat (information à destination des autres tutelles)",-1),wr=e("span",null,"Pas de valeur par défaut",-1),Tr={style:{"font-weight":"bold"}},Fr=e("span",null,"27",-1),Mr=e("label",{for:"pia"},"Pia",-1),Vr=e("span",null,"Programme Investissement Avenir",-1),Nr=e("span",null,"Pas de valeur par défaut",-1),Or={style:{"font-weight":"bold"}},Yr=e("span",null,"28",-1),Br=e("label",{for:"reference"},"Reference",-1),zr=e("span",null,"Votre propre référence désignant ce contrat",-1),Hr=e("span",null,"N° Oscar",-1),Kr={style:{"font-weight":"bold"}},Gr=e("span",null,"29",-1),Xr=e("label",{for:"accordCadre"},"AccordCadre",-1),Wr=e("span",null,"Accord cadre",-1),Jr=e("span",null,"Pas de valeur par défaut",-1),Qr={style:{"font-weight":"bold"}},Zr=e("span",null,"30",-1),$r=e("label",{for:"cifre"},"Cifre",-1),ei=e("span",null,"Contrat d'accompagnement d'une bourse CIFRE",-1),ti=e("span",null,"Pas de valeur par défaut",-1),ri={style:{"font-weight":"bold"}},ii=e("span",null,"31",-1),ni=e("label",{for:"accordCadre"},"ChaireIndustrielle",-1),ai=e("span",null,"Chaire industrielle ?",-1),ui=e("span",null,"Pas de valeur par défaut",-1),si={style:{"font-weight":"bold"}},oi=e("span",null,"32",-1),ci=e("label",{for:"accordCadre"},"PresencePartenaireIndustriel",-1),li=e("span",null,"Présence d’un partenaire industriel ?",-1),pi=e("span",null,"Pas de valeur par défaut",-1),fi={style:{"font-weight":"bold"}},di={key:11},mi=e("div",{style:{display:"flex","justify-content":"space-between"}},[e("h2",null,"Données à envoyer à PCRU")],-1),Pi={key:0,class:"error",style:{"margin-bottom":"1em"}},hi=I('
Les champs marqués d'une étoile rouge * sont obligatoires. Les champs Durée et Date de Fin sont marqués de deux étoiles rouges ** pour indiquer qu'au moins l'un des 2 champs est obligatoire Si le contrat est validé par un pôle de compétitivité alors le champ PoleCompetitivite marqué de trois étoiles rouges *** est obligatoire