Olivier Massot пре 3 месеци
родитељ
комит
405420ee2f

+ 1 - 2
models/HelloAsso/ConnectionRequest.ts

@@ -1,6 +1,5 @@
-import { Uid, Str } from 'pinia-orm/dist/decorators'
+import { Uid, Str, Num  } from 'pinia-orm/dist/decorators'
 import { IdField } from '~/models/decorators'
-import { Num } from 'pinia-orm/decorators'
 import ApiResource from '~/models/ApiResource'
 
 /**

+ 1 - 2
models/HelloAsso/HelloAsso.ts

@@ -1,7 +1,6 @@
-import { Bool, Num, Uid } from 'pinia-orm/dist/decorators'
+import { Num, Uid, Str  } from 'pinia-orm/dist/decorators'
 import ApiResource from '~/models/ApiResource'
 import { IdField } from '~/models/decorators'
-import { Str } from 'pinia-orm/decorators'
 
 /**
  * The Mobyt user status of an organization

+ 1 - 2
models/HelloAsso/UnlinkRequest.ts

@@ -1,6 +1,5 @@
-import { Uid, Str } from 'pinia-orm/dist/decorators'
+import { Uid, Num  } from 'pinia-orm/dist/decorators'
 import { IdField } from '~/models/decorators'
-import { Num } from 'pinia-orm/decorators'
 import ApiResource from '~/models/ApiResource'
 
 /**

+ 82 - 81
pages/freemium/dashboard.vue

@@ -1,91 +1,88 @@
 <template>
-  <v-container fluid class="inner-container">
-    <v-row>
-      <!-- Bloc événements -->
-      <v-col cols="12" md="7">
-        <v-card>
-          <v-tabs v-model="tab" class="tabs-title">
-            <v-tab value="future">{{$t('futur_event')}}</v-tab>
-            <v-tab value="past">{{$t('past_event')}}</v-tab>
-          </v-tabs>
-
-          <v-btn color="primary" to="events/new" class="ml-5 mt-5">{{$t('add_event')}}</v-btn>
-
-          <v-tabs-window v-model="tab">
-            <v-tabs-window-item value="future">
-              <UiLoadingPanel v-if="statusUpcomingEvents == FETCHING_STATUS.PENDING" />
-
-              <UiEventList
-                v-if="statusUpcomingEvents == FETCHING_STATUS.SUCCESS && upcomingEvents?.items"
-                :events="upcomingEvents.items"
-                :pagination="upcomingEvents.pagination"
-                @load="loadUpcomingEvents"
-                @edit="editEvent"
-              />
-              <span v-if="upcomingEvents.items.length == 0" class="no_event">
-                {{$t('no_future_event')}}
-              </span>
-            </v-tabs-window-item>
-            <v-tabs-window-item value="past">
-              <UiLoadingPanel v-if="statusPastEvents == FETCHING_STATUS.PENDING" />
-
-              <UiEventList
-                v-if="statusPastEvents == FETCHING_STATUS.SUCCESS && pastEvents?.items"
-                :events="pastEvents.items"
-                :pagination="pastEvents.pagination"
-                @load="loadPastEvents"
-                @edit="editEvent"
-              />
-              <span v-if="pastEvents.items.length == 0" class="no_event">
-                {{$t('no_past_event')}}
-              </span>
-            </v-tabs-window-item>
-          </v-tabs-window>
-
-        </v-card>
-      </v-col>
-
-      <!-- Bloc structure -->
-      <v-col cols="12" md="5">
-        <v-card v-if="statusOrganization == FETCHING_STATUS.SUCCESS" class="pa-5">
-          <v-card-title class="text-h6" >
-            <v-icon icon="fa fa-hotel" class="text-button icon-hotel"  />
-            <span class="organization_title">{{$t('my_organization')}}</span>
-          </v-card-title>
-          <v-card-text>
-            <div><strong>{{$t('name')}} :</strong> {{ organization?.name }}</div>
-            <div><strong>{{$t('email')}} :</strong> {{ organization?.email }}</div>
-          </v-card-text>
-        </v-card>
-
-        <v-btn block class="mb-2 btn btn_edit_orga" to="organization">
-          <i class="fa fa-pen mr-2" />{{$t('edit_organization')}}
-        </v-btn>
-
-        <v-btn block class="text-black btn btn_trial" @click="startTrial">
-          <span><v-icon icon="fa fa-ticket" /> {{$t('try_premium_light')}}<br /> {{$t('30_days_free')}}</span>
-        </v-btn>
-
-      </v-col>
-    </v-row>
-
-  </v-container>
-
-  <LayoutDialogTrialAlreadyDid
-    :show="showDialogTrialAlReadyDid"
-    @close-dialog="showDialogTrialAlReadyDid = false"
-  />
-
+  <div>
+    <v-container fluid class="inner-container">
+      <v-row>
+        <!-- Bloc événements -->
+        <v-col cols="12" md="7">
+          <v-card>
+            <v-tabs v-model="tab" class="tabs-title">
+              <v-tab value="future">{{$t('futur_event')}}</v-tab>
+              <v-tab value="past">{{$t('past_event')}}</v-tab>
+            </v-tabs>
+
+            <v-btn color="primary" to="events/new" class="ml-5 mt-5">{{$t('add_event')}}</v-btn>
+
+            <v-tabs-window v-model="tab">
+              <v-tabs-window-item value="future">
+                <UiLoadingPanel v-if="statusUpcomingEvents == FETCHING_STATUS.PENDING" />
+
+                <UiEventList
+                  v-if="statusUpcomingEvents == FETCHING_STATUS.SUCCESS && upcomingEvents?.items"
+                  :events="upcomingEvents.items"
+                  :pagination="upcomingEvents.pagination"
+                  @load="loadUpcomingEvents"
+                  @edit="editEvent"
+                />
+                <span v-if="upcomingEvents.items.length == 0" class="no_event">
+                  {{$t('no_future_event')}}
+                </span>
+              </v-tabs-window-item>
+              <v-tabs-window-item value="past">
+                <UiLoadingPanel v-if="statusPastEvents == FETCHING_STATUS.PENDING" />
+
+                <UiEventList
+                  v-if="statusPastEvents == FETCHING_STATUS.SUCCESS && pastEvents?.items"
+                  :events="pastEvents.items"
+                  :pagination="pastEvents.pagination"
+                  @load="loadPastEvents"
+                  @edit="editEvent"
+                />
+                <span v-if="pastEvents.items.length == 0" class="no_event">
+                  {{$t('no_past_event')}}
+                </span>
+              </v-tabs-window-item>
+            </v-tabs-window>
+
+          </v-card>
+        </v-col>
+
+        <!-- Bloc structure -->
+        <v-col cols="12" md="5">
+          <v-card v-if="statusOrganization == FETCHING_STATUS.SUCCESS" class="pa-5">
+            <v-card-title class="text-h6" >
+              <v-icon icon="fa fa-hotel" class="text-button icon-hotel"  />
+              <span class="organization_title">{{$t('my_organization')}}</span>
+            </v-card-title>
+            <v-card-text>
+              <div><strong>{{$t('name')}} :</strong> {{ organization?.name }}</div>
+              <div><strong>{{$t('email')}} :</strong> {{ organization?.email }}</div>
+            </v-card-text>
+          </v-card>
+
+          <v-btn block class="mb-2 btn btn_edit_orga" to="organization">
+            <i class="fa fa-pen mr-2" />{{$t('edit_organization')}}
+          </v-btn>
+
+          <v-btn block class="text-black btn btn_trial" @click="startTrial">
+            <span><v-icon icon="fa fa-ticket" /> {{$t('try_premium_light')}}<br /> {{$t('30_days_free')}}</span>
+          </v-btn>
+
+        </v-col>
+      </v-row>
+
+    </v-container>
+
+    <LayoutDialogTrialAlreadyDid
+      :show="showDialogTrialAlReadyDid"
+      @close-dialog="showDialogTrialAlReadyDid = false"
+    />
+  </div>
 </template>
 
 <script setup lang="ts">
 
 import Query from "~/services/data/Query";
 
-definePageMeta({
-  name: 'freemium_dashboard_page',
-})
-
 import {type Ref, ref} from 'vue'
 import {useEntityFetch} from "~/composables/data/useEntityFetch";
 import Organization from "~/models/Freemium/Organization";
@@ -101,6 +98,10 @@ import UrlUtils from "~/services/utils/urlUtils";
 import {useApiLegacyRequestService} from "~/composables/data/useApiLegacyRequestService";
 import {useAdminUrl} from "~/composables/utils/useAdminUrl";
 
+definePageMeta({
+  name: 'freemium_dashboard_page',
+})
+
 //Ref Définition
 const runtimeConfig = useRuntimeConfig()
 const { fetch, fetchCollection } = useEntityFetch()

+ 2 - 2
pages/helloasso/index.vue

@@ -48,7 +48,7 @@ Administration de la connexion Opentalent / HelloAsso
     <v-snackbar v-model="connectedSnackbar" color="success">
       {{ $t('your_helloasso_account_was_successfully_connected') }}
 
-      <template v-slot:actions>
+      <template #actions>
         <v-btn variant="text" @click="connectedSnackbar = false">
           {{ $t('close') }}
         </v-btn>
@@ -58,7 +58,7 @@ Administration de la connexion Opentalent / HelloAsso
     <v-snackbar v-model="unlinkedSnackbar" color="success">
       {{ $t('your_helloasso_account_was_successfully_unlinked') }}
 
-      <template v-slot:actions>
+      <template #actions>
         <v-btn variant="text" @click="unlinkedSnackbar = false">
           {{ $t('close') }}
         </v-btn>

+ 1 - 1
services/data/entityManager.ts

@@ -118,7 +118,7 @@ class EntityManager {
    * @param iri An IRI of the form .../api/<entity>/...
    */
   public async getModelFromIri(iri: string): Promise<typeof ApiResource> {
-    const matches = iri.match(/^\/api\/([\w-\/]+)(\/\d+)?/)
+    const matches = iri.match(/^\/api\/([\w-/]+)(\/\d+)?/)
     if (!matches || !matches[1]) {
       throw new Error('cannot parse the IRI')
     }

+ 0 - 1
stores/helloasso.ts

@@ -1,7 +1,6 @@
 import { defineStore } from 'pinia'
 import { ref } from 'vue'
 import type { Ref } from 'vue'
-import type { MenuGroup, MenuItem } from '~/types/layout'
 
 export const useHelloAssoStore = defineStore('helloasso', () => {
   /**