diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29055f008..f50462c86 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -97,10 +97,12 @@ build: stage: Composer install image: chill/base-image:8.3-edge variables: + COMPOSER_MEMORY_LIMIT: 3G before_script: - composer config -g cache-dir "$(pwd)/.cache" script: - composer install --optimize-autoloader --no-ansi --no-interaction --no-progress + - php bin/console cache:clear cache: paths: - .cache/ @@ -108,12 +110,15 @@ build: expire_in: 1 day paths: - vendor/ + - var/ code_style: stage: Tests image: chill/base-image:8.3-edge script: - php-cs-fixer fix --dry-run -v --show-progress=none + dependencies: + - build cache: paths: - .cache/ @@ -131,6 +136,8 @@ phpstan_tests: - bin/console cache:clear --env=dev script: - composer exec phpstan -- analyze --memory-limit=3G + dependencies: + - build cache: paths: - .cache/ @@ -146,6 +153,8 @@ rector_tests: - bin/console cache:clear --env=dev script: - composer exec rector -- process --dry-run + dependencies: + - build cache: paths: - .cache/ @@ -164,16 +173,37 @@ lint: script: - yarn install --ignore-optional - npx eslint-baseline "src/**/*.{js,ts,vue}" + dependencies: + - build + cache: + paths: + - node_modules/ + artifacts: + expire_in: 1 day + paths: + - vendor/ +vue_tsc: + stage: Tests + image: node:20-alpine + before_script: + - apk add --no-cache python3 make g++ py3-setuptools + - export PYTHON="$(which python3)" + - export PATH="./node_modules/.bin:$PATH" + script: + - yarn install --ignore-optional - yarn vue-tsc --noEmit > vue-tsc-report.txt 2>&1 || true + - cat vue-tsc-report.txt - grep -q "error" vue-tsc-report.txt && exit 2 || exit 0 + dependencies: + - build + cache: + paths: + - node_modules/ artifacts: expire_in: 1 day paths: - vue-tsc-report.txt - cache: - paths: - - node_modules/ - +--- # psalm_tests: # stage: Tests # image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82 @@ -199,6 +229,8 @@ unit_tests: - php bin/console doctrine:fixtures:load -n --env=test script: - composer exec phpunit -- --colors=never --exclude-group dbIntensive,openstack-integration + dependencies: + - build artifacts: expire_in: 1 day paths: diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/types.ts b/src/Bundle/ChillCalendarBundle/Resources/public/types.ts index 542067901..7d237a251 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/types.ts +++ b/src/Bundle/ChillCalendarBundle/Resources/public/types.ts @@ -71,4 +71,11 @@ export function isEventInputCalendarRange( return typeof toBeDetermined.is === "string" && toBeDetermined.is === "range"; } +export enum AnswerStatus { + ACCEPTED = "accepted", + DECLINED = "declined", + PENDING = "pending", + TENTATIVE = "tentative", +} + export {}; diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/Components/CalendarActive.vue b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/Components/CalendarActive.vue index b90349025..75ef76dbf 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/Components/CalendarActive.vue +++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/Components/CalendarActive.vue @@ -7,7 +7,7 @@ - {{ invite.status }} + {{ invite.status }} @@ -42,8 +42,6 @@ diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue index e35db74ad..9b24611cf 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue +++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/App2.vue @@ -146,7 +146,11 @@ id="copyFromWeek" class="form-select" > - @@ -156,7 +160,11 @@
diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue index 5f434052e..b2d50cb6a 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue +++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue @@ -74,12 +74,12 @@ const saveAndClose = function (e: Event): void { location: location.value, calendarRangeId: calendarRangeId.value, }) - .then((_) => { + .then(() => { showModal.value = false; }); }; -const closeModal = function (_: any): void { +const closeModal = function (): void { showModal.value = false; }; diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/module/document_action_buttons_group/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/module/document_action_buttons_group/index.ts index 080f63c66..012693fac 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/module/document_action_buttons_group/index.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/module/document_action_buttons_group/index.ts @@ -2,12 +2,11 @@ import { _createI18n } from "ChillMainAssets/vuejs/_js/i18n"; import DocumentActionButtonsGroup from "../../vuejs/DocumentActionButtonsGroup.vue"; import { createApp } from "vue"; import { StoredObject, StoredObjectStatusChange } from "../../types"; -import { is_object_ready } from "../../vuejs/StoredObjectButton/helpers"; import ToastPlugin from "vue-toast-notification"; const i18n = _createI18n({}); -window.addEventListener("DOMContentLoaded", function (e) { +window.addEventListener("DOMContentLoaded", function () { document .querySelectorAll("div[data-download-buttons]") .forEach((el) => { diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/types/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/types/index.ts index 688f52865..882d46716 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/types/index.ts +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/types/index.ts @@ -9,6 +9,7 @@ export interface StoredObject { uuid: string; prefix: string; status: StoredObjectStatus; + type: string; currentVersion: | null | StoredObjectVersionCreated diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue index 8fd348807..baa99c5ab 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue @@ -26,8 +26,8 @@
  • @@ -75,7 +75,6 @@ import { import { StoredObject, StoredObjectStatusChange, - StoredObjectVersion, WopiEditButtonExecutableBeforeLeaveFunction, } from "../types"; import DesktopEditButton from "ChillDocStoreAssets/vuejs/StoredObjectButton/DesktopEditButton.vue"; @@ -206,10 +205,6 @@ const checkForReady = function (): void { }; const onObjectNewStatusCallback = async function (): Promise { - if (props.storedObject.status === "stored_object_created") { - return Promise.resolve(); - } - const new_status = await is_object_ready(props.storedObject); if (props.storedObject.status !== new_status.status) { emit("onStoredObjectStatusChange", new_status); diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue index c731ef19f..2e1dd158d 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue @@ -1,3 +1,35 @@ + + - - diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/FileIcon.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/FileIcon.vue index ba2c44f6a..8556524ad 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/FileIcon.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/FileIcon.vue @@ -1,11 +1,3 @@ - - + + diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue index f00889a8e..9bb3c4c6f 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue @@ -1,42 +1,3 @@ - - - + + diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue index 4ea96bbe9..ee09270ec 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/Modal.vue @@ -1,6 +1,6 @@