|
|
@@ -15,21 +15,23 @@
|
|
|
icon="fa fa-user"
|
|
|
type="access"
|
|
|
@typeClick="onTypeClick"
|
|
|
- >
|
|
|
- </LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ />
|
|
|
<LayoutHeaderUniversalCreationTypeCard
|
|
|
v-if="$can('display', 'agenda_page')
|
|
|
- && ($ability.can('manage', 'courses')
|
|
|
- || $ability.can('manage', 'examens')
|
|
|
- || $ability.can('manage', 'educationalprojects')
|
|
|
- || $ability.can('manage', 'events'))"
|
|
|
+ && ($ability.can('display', 'course_page')
|
|
|
+ || $ability.can('display', 'exam_page')
|
|
|
+ || $ability.can('display', 'pedagogics_project_page'))"
|
|
|
title="an_event"
|
|
|
text-content="add_an_event_course"
|
|
|
icon="fa fa-calendar-alt"
|
|
|
type="event"
|
|
|
@typeClick="onTypeClick"
|
|
|
- >
|
|
|
- </LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ />
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ v-else-if="$can('display', 'agenda_page') && $can('manage', 'events')"
|
|
|
+ title="other_event" text-content="other_event_text_creation_card"
|
|
|
+ icon="far fa-calendar" :link="adminLegacy+ '/calendar/create/events'" />
|
|
|
+
|
|
|
<LayoutHeaderUniversalCreationTypeCard
|
|
|
v-if="$can('display', 'message_send_page')
|
|
|
&& ($ability.can('manage', 'emails')
|
|
|
@@ -40,34 +42,34 @@
|
|
|
icon="fa fa-comment"
|
|
|
type="message"
|
|
|
@typeClick="onTypeClick"
|
|
|
- >
|
|
|
- </LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ />
|
|
|
<LayoutHeaderUniversalCreationTypeCard
|
|
|
v-if="$can('manage', 'equipments')"
|
|
|
title="a_materiel"
|
|
|
text-content="add_any_type_material"
|
|
|
icon="fa fa-cube"
|
|
|
:link="adminLegacy+ '/list/create/equipment'"
|
|
|
- >
|
|
|
- </LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ />
|
|
|
</div>
|
|
|
</v-stepper-content>
|
|
|
|
|
|
<v-stepper-content step="2">
|
|
|
<div class="row">
|
|
|
<div v-if="type === 'access'" class="row">
|
|
|
- <LayoutHeaderUniversalCreationTypeCard title="a_student" text-content="student_text_creation_card" icon="fa fa-user" :link="adminLegacy+ '/universal_creation_person/student'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
- <LayoutHeaderUniversalCreationTypeCard title="a_guardian" text-content="guardian_text_creation_card" icon="fa fa-female" :link="adminLegacy+ '/universal_creation_person/guardian'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
- <LayoutHeaderUniversalCreationTypeCard title="a_teacher" text-content="teacher_text_creation_card" icon="fa fa-graduation-cap" :link="adminLegacy+ '/universal_creation_person/teacher'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
- <LayoutHeaderUniversalCreationTypeCard title="a_member_of_staff" text-content="personnel_text_creation_card" icon="fa fa-suitcase" :link="adminLegacy+ '/universal_creation_person/personnel'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
- <LayoutHeaderUniversalCreationTypeCard title="a_legal_entity" text-content="moral_text_creation_card" icon="fa fa-building" :link="adminLegacy+ '/universal_creation_person/company'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
- <LayoutHeaderUniversalCreationTypeCard title="another_type_of_contact" text-content="other_contact_text_creation_card" icon="fa fa-plus" :link="adminLegacy+ '/universal_creation_person/other_contact'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard v-if="isLaw1901" title="an_adherent" text-content="adherent_text_creation_card" icon="fa fa-user" :link="adminLegacy+ '/universal_creation_person/adherent'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard v-if="isLaw1901" title="a_ca_member" text-content="ca_member_text_creation_card" icon="fa fa-users" :link="adminLegacy+ '/universal_creation_person/ca_member'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard title="a_student" text-content="student_text_creation_card" icon="fa fa-user" :link="adminLegacy+ '/universal_creation_person/student'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard title="a_guardian" text-content="guardian_text_creation_card" icon="fa fa-female" :link="adminLegacy+ '/universal_creation_person/guardian'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard title="a_teacher" text-content="teacher_text_creation_card" icon="fa fa-graduation-cap" :link="adminLegacy+ '/universal_creation_person/teacher'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard title="a_member_of_staff" text-content="personnel_text_creation_card" icon="fa fa-suitcase" :link="adminLegacy+ '/universal_creation_person/personnel'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard title="a_legal_entity" text-content="moral_text_creation_card" icon="fa fa-building" :link="adminLegacy+ '/universal_creation_person/company'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard title="another_type_of_contact" text-content="other_contact_text_creation_card" icon="fa fa-plus" :link="adminLegacy+ '/universal_creation_person/other_contact'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
</div>
|
|
|
<div v-if="type === 'event'" class="row">
|
|
|
- <LayoutHeaderUniversalCreationTypeCard v-if="$can('manage', 'courses')" title="course" text-content="course_text_creation_card" icon="fa fa-users" :link="adminLegacy+ '/calendar/create/courses'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
- <LayoutHeaderUniversalCreationTypeCard v-if="$can('manage', 'examens')" title="exam" text-content="exam_text_creation_card" icon="fa fa-graduation-cap" :link="adminLegacy+ '/calendar/create/examens'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
- <LayoutHeaderUniversalCreationTypeCard v-if="$can('manage', 'educationalprojects')" title="educational_services" text-content="educational_services_text_creation_card" icon="fa fa-suitcase" :link="adminLegacy+ '/calendar/create/educational_projects'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
- <LayoutHeaderUniversalCreationTypeCard v-if="$can('manage', 'events')" title="other_event" text-content="other_event_text_creation_card" icon="far fa-calendar" :link="adminLegacy+ '/calendar/create/events'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard v-if="$can('display', 'course_page')" title="course" text-content="course_text_creation_card" icon="fa fa-users" :link="adminLegacy+ '/calendar/create/courses'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard v-if="$can('display', 'exam_page')" title="exam" text-content="exam_text_creation_card" icon="fa fa-graduation-cap" :link="adminLegacy+ '/calendar/create/examens'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard v-if="$can('display', 'pedagogics_project_page')" title="educational_services" text-content="educational_services_text_creation_card" icon="fa fa-suitcase" :link="adminLegacy+ '/calendar/create/educational_projects'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard v-if="$can('manage', 'events')" title="other_event" text-content="other_event_text_creation_card" icon="far fa-calendar" :link="adminLegacy+ '/calendar/create/events'" ></LayoutHeaderUniversalCreationTypeCard>
|
|
|
</div>
|
|
|
<div v-if="type === 'message'" class="row">
|
|
|
<LayoutHeaderUniversalCreationTypeCard v-if="$can('manage', 'emails')" title="an_email" text-content="email_text_creation_card" icon="far fa-envelope" :link="adminLegacy+ '/list/create/emails'"></LayoutHeaderUniversalCreationTypeCard>
|
|
|
@@ -84,6 +86,7 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import {defineComponent, ref, Ref, useContext} from '@nuxtjs/composition-api'
|
|
|
+import { $organizationProfile } from '~/services/profile/organizationProfile'
|
|
|
|
|
|
export default defineComponent({
|
|
|
props: {
|
|
|
@@ -93,16 +96,20 @@ export default defineComponent({
|
|
|
}
|
|
|
},
|
|
|
setup (_,{emit}) {
|
|
|
- const { $config } = useContext()
|
|
|
+ const { $config, store } = useContext()
|
|
|
+
|
|
|
const onTypeClick = (step:Number,Cardtype:String)=>{
|
|
|
type.value = Cardtype;
|
|
|
- emit('updateStep',step);
|
|
|
+ emit('updateStep', {stepChoice: step, typeChoice: Cardtype});
|
|
|
}
|
|
|
const type:Ref<String> = ref('');
|
|
|
+ const organizationProfile = $organizationProfile(store)
|
|
|
+
|
|
|
return {
|
|
|
type,
|
|
|
onTypeClick,
|
|
|
- adminLegacy: $config.baseURL_adminLegacy
|
|
|
+ adminLegacy: $config.baseURL_adminLegacy,
|
|
|
+ isLaw1901: organizationProfile.isAssociation()
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -137,7 +144,5 @@ export default defineComponent({
|
|
|
background: var(--v-ot_light_green-base, #a9e0d6);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
</style>
|