Olivier Massot 3 mesi fa
parent
commit
6dcd4ed77a

+ 5 - 1
components/Form/Freemium/Event.vue

@@ -270,7 +270,11 @@ const props = defineProps<{
 }>()
 
 const { em } = useEntityManager()
-const getAsserts = (key: string) => getAssertUtils(Event.getAsserts() as Record<string, Record<string, unknown>>, key)
+const getAsserts = (key: string) =>
+  getAssertUtils(
+    Event.getAsserts() as Record<string, Record<string, unknown>>,
+    key,
+  )
 
 const emit = defineEmits(['update:entity'])
 

+ 7 - 1
components/Form/Parameter/AttendanceBookingReason.vue

@@ -30,5 +30,11 @@ const proxyEntity = computed({
 })
 
 const getAsserts = (key: string) =>
-  getAssertUtils(AttendanceBookingReason.getAsserts() as Record<string, Record<string, unknown>>, key)
+  getAssertUtils(
+    AttendanceBookingReason.getAsserts() as Record<
+      string,
+      Record<string, unknown>
+    >,
+    key,
+  )
 </script>

+ 4 - 1
components/Form/Parameter/EducationTiming.vue

@@ -29,5 +29,8 @@ const proxyEntity = computed({
 })
 
 const getAsserts = (key: string) =>
-  getAssertUtils(EducationTiming.getAsserts() as Record<string, Record<string, unknown>>, key)
+  getAssertUtils(
+    EducationTiming.getAsserts() as Record<string, Record<string, unknown>>,
+    key,
+  )
 </script>

+ 4 - 1
components/Form/Parameter/ResidenceArea.vue

@@ -30,5 +30,8 @@ const proxyEntity = computed({
 })
 
 const getAsserts = (key: string) =>
-  getAssertUtils(ResidenceArea.getAsserts() as Record<string, Record<string, unknown>>, key)
+  getAssertUtils(
+    ResidenceArea.getAsserts() as Record<string, Record<string, unknown>>,
+    key,
+  )
 </script>

+ 3 - 1
components/Layout/SubHeader/ActivityYear.vue

@@ -20,7 +20,9 @@
           />
           <strong>
             {{ inputValue }}
-            <span v-if="yearPlusOne"> / {{ parseInt(String(inputValue)) + 1 }} </span>
+            <span v-if="yearPlusOne">
+              / {{ parseInt(String(inputValue)) + 1 }}
+            </span>
           </strong>
         </div>
       </template>

+ 4 - 1
pages/freemium/organization.vue

@@ -173,7 +173,10 @@ onUnmounted(() => {
 })
 
 const getAsserts = (key: string) =>
-  getAssertUtils(Organization.getAsserts() as Record<string, Record<string, unknown>>, key)
+  getAssertUtils(
+    Organization.getAsserts() as Record<string, Record<string, unknown>>,
+    key,
+  )
 </script>
 
 <style scoped lang="scss">

+ 5 - 1
pages/parameters/attendances.vue

@@ -73,5 +73,9 @@ if (organizationProfile.parametersId === null) {
   throw new Error('Missing organization parameters id')
 }
 
-const getAsserts = (key: string) => getAssertUtils(Parameters.getAsserts() as Record<string, Record<string, unknown>>, key)
+const getAsserts = (key: string) =>
+  getAssertUtils(
+    Parameters.getAsserts() as Record<string, Record<string, unknown>>,
+    key,
+  )
 </script>

+ 5 - 1
pages/parameters/cycles/[id].vue

@@ -22,5 +22,9 @@ definePageMeta({
   name: 'cycle',
 })
 
-const getAsserts = (key: string) => getAssertUtils(Cycle.getAsserts() as Record<string, Record<string, unknown>>, key)
+const getAsserts = (key: string) =>
+  getAssertUtils(
+    Cycle.getAsserts() as Record<string, Record<string, unknown>>,
+    key,
+  )
 </script>

+ 4 - 1
services/asserts/getAssertUtils.ts

@@ -1,6 +1,9 @@
 import { AssertRuleRegistry } from './AssertRuleRegistry'
 
-export function getAssertUtils(asserts: Record<string, Record<string, unknown>>, key: string) {
+export function getAssertUtils(
+  asserts: Record<string, Record<string, unknown>>,
+  key: string,
+) {
   if (!asserts || !(key in asserts)) return []
 
   const registry = new AssertRuleRegistry()

+ 4 - 1
services/rights/abilityBuilder.ts

@@ -76,7 +76,10 @@ class AbilityBuilder {
     _.each(
       abilitiesConfig,
       // @ts-expect-error false error
-      (ability: { action: ABILITIES; conditions: Array<Condition> }, subject: string) => {
+      (
+        ability: { action: ABILITIES; conditions: Array<Condition> },
+        subject: string,
+      ) => {
         // eslint-disable-next-line prefer-const
         let { action, conditions } = ability