|
|
@@ -1,180 +1,220 @@
|
|
|
<!--
|
|
|
-
|
|
|
+ Contenu de la boite de dialogue "Assistant de création"
|
|
|
-->
|
|
|
|
|
|
<template>
|
|
|
- <v-stepper v-model="step">
|
|
|
- <v-stepper-items>
|
|
|
- <v-stepper-content step="1">
|
|
|
- <div class="row">
|
|
|
+ <v-container v-if="step === 1">
|
|
|
+ <v-row>
|
|
|
+ <v-col cols="6" v-if="ability.can('manage', 'users')">
|
|
|
<LayoutHeaderUniversalCreationTypeCard
|
|
|
- v-if="can('manage', 'users')"
|
|
|
title="a_person"
|
|
|
text-content="add_new_person_student"
|
|
|
icon="fa fa-user"
|
|
|
type="access"
|
|
|
@typeClick="onTypeClick"
|
|
|
/>
|
|
|
-
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- v-if="can('display', 'agenda_page')
|
|
|
- && (can('display', 'course_page')
|
|
|
- || can('display', 'exam_page')
|
|
|
- || can('display', 'pedagogics_project_page'))"
|
|
|
- title="an_event"
|
|
|
- text-content="add_an_event_course"
|
|
|
- icon="fa fa-calendar-alt"
|
|
|
- type="event"
|
|
|
- @typeClick="onTypeClick"
|
|
|
- />
|
|
|
-
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- v-else-if="can('display', 'agenda_page') && can('manage', 'events')"
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-if="ability.can('display', 'agenda_page')
|
|
|
+ && (
|
|
|
+ ability.can('display', 'course_page') ||
|
|
|
+ ability.can('display', 'exam_page') ||
|
|
|
+ ability.can('display', 'pedagogics_project_page')
|
|
|
+ )">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="an_event"
|
|
|
+ text-content="add_an_event_course"
|
|
|
+ icon="fa fa-calendar-alt"
|
|
|
+ type="event"
|
|
|
+ @typeClick="onTypeClick"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-else-if="ability.can('display', 'agenda_page') && ability.can('manage', 'events')">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="other_event"
|
|
|
+ text-content="other_event_text_creation_card"
|
|
|
+ icon="far fa-calendar"
|
|
|
+ :link="makeAdminUrl('/calendar/create/events')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-if="ability.can('display', 'message_send_page')
|
|
|
+ && (
|
|
|
+ ability.can('manage', 'emails') ||
|
|
|
+ ability.can('manage', 'mails') ||
|
|
|
+ ability.can('manage', 'texto')
|
|
|
+ )">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_correspondence"
|
|
|
+ text-content="sen_email_letter"
|
|
|
+ icon="fa fa-comment"
|
|
|
+ type="message"
|
|
|
+ @typeClick="onTypeClick"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-if="ability.can('manage', 'equipments')">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_materiel"
|
|
|
+ text-content="add_any_type_material"
|
|
|
+ icon="fa fa-cube"
|
|
|
+ :link="makeAdminUrl('/list/create/equipment')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+ </v-container>
|
|
|
+
|
|
|
+ <v-container v-if="step === 2">
|
|
|
+ <v-row v-if="type === 'access'">
|
|
|
+ <v-col cols="6" v-if="isLaw1901">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="an_adherent"
|
|
|
+ text-content="adherent_text_creation_card"
|
|
|
+ icon="fa fa-user"
|
|
|
+ :link="makeAdminUrl('/universal_creation_person/adherent')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-if="isLaw1901">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_ca_member"
|
|
|
+ text-content="ca_member_text_creation_card"
|
|
|
+ icon="fa fa-users"
|
|
|
+ :link="makeAdminUrl('/universal_creation_person/ca_member')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_student"
|
|
|
+ text-content="student_text_creation_card"
|
|
|
+ icon="fa fa-user"
|
|
|
+ :link="makeAdminUrl('/universal_creation_person/student')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_guardian"
|
|
|
+ text-content="guardian_text_creation_card"
|
|
|
+ icon="fa fa-female"
|
|
|
+ :link="makeAdminUrl('/universal_creation_person/guardian')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_teacher"
|
|
|
+ text-content="teacher_text_creation_card"
|
|
|
+ icon="fa fa-graduation-cap"
|
|
|
+ :link="makeAdminUrl('/universal_creation_person/teacher')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_member_of_staff"
|
|
|
+ text-content="personnel_text_creation_card"
|
|
|
+ icon="fa fa-suitcase"
|
|
|
+ :link="makeAdminUrl('/universal_creation_person/personnel')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_legal_entity"
|
|
|
+ text-content="moral_text_creation_card"
|
|
|
+ icon="fa fa-building"
|
|
|
+ :link="makeAdminUrl('/universal_creation_person/company')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="another_type_of_contact"
|
|
|
+ text-content="other_contact_text_creation_card"
|
|
|
+ icon="fa fa-plus"
|
|
|
+ :link="makeAdminUrl('/universal_creation_person/other_contact')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+
|
|
|
+ <v-row v-if="type === 'event'">
|
|
|
+ <v-col cols="6" v-if="ability.can('display', 'course_page')">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="course"
|
|
|
+ text-content="course_text_creation_card"
|
|
|
+ icon="fa fa-users"
|
|
|
+ :link="makeAdminUrl('/calendar/create/courses')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-if="ability.can('display', 'exam_page')">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="exam"
|
|
|
+ text-content="exam_text_creation_card"
|
|
|
+ icon="fa fa-graduation-cap"
|
|
|
+ :link="makeAdminUrl('/calendar/create/examens')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-if="ability.can('display', 'pedagogics_project_page')">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="educational_services"
|
|
|
+ text-content="educational_services_text_creation_card"
|
|
|
+ icon="fa fa-suitcase"
|
|
|
+ :link="makeAdminUrl('/calendar/create/educational_projects')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-if="ability.can('manage', 'events')">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
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')
|
|
|
- && (can('manage', 'emails')
|
|
|
- || can('manage', 'mails')
|
|
|
- || can('manage', 'texto'))"
|
|
|
- title="a_correspondence"
|
|
|
- text-content="sen_email_letter"
|
|
|
- icon="fa fa-comment"
|
|
|
- type="message"
|
|
|
- @typeClick="onTypeClick"
|
|
|
- />
|
|
|
-
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- v-if="can('manage', 'equipments')"
|
|
|
- title="a_materiel"
|
|
|
- text-content="add_any_type_material"
|
|
|
- icon="fa fa-cube"
|
|
|
- :link="adminLegacy + '/list/create/equipment'"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </v-stepper-content>
|
|
|
-
|
|
|
- <v-stepper-content step="2">
|
|
|
- <div class="row">
|
|
|
- <div v-if="type === 'access'" class="row">
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- v-if="isLaw1901"
|
|
|
- title="an_adherent"
|
|
|
- text-content="adherent_text_creation_card"
|
|
|
- icon="fa fa-user"
|
|
|
- :link="adminLegacy + '/universal_creation_person/adherent'" />
|
|
|
-
|
|
|
- <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
|
|
|
- title="a_student"
|
|
|
- text-content="student_text_creation_card"
|
|
|
- icon="fa fa-user"
|
|
|
- :link="adminLegacy + '/universal_creation_person/student'" />
|
|
|
-
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- title="a_guardian"
|
|
|
- text-content="guardian_text_creation_card"
|
|
|
- icon="fa fa-female"
|
|
|
- :link="adminLegacy + '/universal_creation_person/guardian'" />
|
|
|
-
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- title="a_teacher"
|
|
|
- text-content="teacher_text_creation_card"
|
|
|
- icon="fa fa-graduation-cap"
|
|
|
- :link="adminLegacy + '/universal_creation_person/teacher'" />
|
|
|
-
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- title="a_member_of_staff"
|
|
|
- text-content="personnel_text_creation_card"
|
|
|
- icon="fa fa-suitcase"
|
|
|
- :link="adminLegacy + '/universal_creation_person/personnel'" />
|
|
|
-
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- title="a_legal_entity"
|
|
|
- text-content="moral_text_creation_card"
|
|
|
- icon="fa fa-building"
|
|
|
- :link="adminLegacy + '/universal_creation_person/company'" />
|
|
|
-
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- title="another_type_of_contact"
|
|
|
- text-content="other_contact_text_creation_card"
|
|
|
- icon="fa fa-plus"
|
|
|
- :link="adminLegacy + '/universal_creation_person/other_contact'" />
|
|
|
- </div>
|
|
|
-
|
|
|
- <div v-if="type === 'event'" class="row">
|
|
|
- <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
|
|
|
- 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
|
|
|
- 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
|
|
|
- v-if="can('manage', 'events')"
|
|
|
- title="other_event"
|
|
|
- text-content="other_event_text_creation_card"
|
|
|
- icon="far fa-calendar"
|
|
|
- :link="adminLegacy + '/calendar/create/events'" />
|
|
|
- </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
|
|
|
- v-if="can('manage', 'mails')"
|
|
|
- title="a_letter"
|
|
|
- text-content="letter_text_creation_card"
|
|
|
- icon="far fa-file-alt"
|
|
|
- :link="adminLegacy + '/list/create/mails'" />
|
|
|
-
|
|
|
- <LayoutHeaderUniversalCreationTypeCard
|
|
|
- v-if="can('manage', 'texto')"
|
|
|
- title="an_sms"
|
|
|
- text-content="sms_text_creation_card"
|
|
|
- icon="fa fa-mobile-alt"
|
|
|
- :link="adminLegacy + '/list/create/sms'" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- </v-stepper-content>
|
|
|
- </v-stepper-items>
|
|
|
- </v-stepper>
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+
|
|
|
+ <v-row v-if="type === 'message'">
|
|
|
+ <v-col cols="6" v-if="ability.can('manage', 'emails')">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="an_email"
|
|
|
+ text-content="email_text_creation_card"
|
|
|
+ icon="far fa-envelope"
|
|
|
+ :link="makeAdminUrl('/list/create/emails')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-if="ability.can('manage', 'mails')">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_letter"
|
|
|
+ text-content="letter_text_creation_card"
|
|
|
+ icon="far fa-file-alt"
|
|
|
+ :link="makeAdminUrl('/list/create/mails')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+
|
|
|
+ <v-col cols="6" v-if="ability.can('manage', 'texto')">
|
|
|
+ <LayoutHeaderUniversalCreationTypeCard
|
|
|
+ title="a_sms"
|
|
|
+ text-content="sms_text_creation_card"
|
|
|
+ icon="fa fa-mobile-alt"
|
|
|
+ :link="makeAdminUrl('/list/create/sms')"
|
|
|
+ />
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+ </v-container>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import {Ref, ref} from "@vue/reactivity";
|
|
|
import {useOrganizationProfileStore} from "~/stores/organizationProfile";
|
|
|
import {useAbility} from "@casl/vue";
|
|
|
+ import {ComputedRef} from "vue";
|
|
|
+ import UrlUtils from "~/services/utils/urlUtils";
|
|
|
|
|
|
const props = defineProps({
|
|
|
step: {
|
|
|
@@ -185,50 +225,21 @@
|
|
|
|
|
|
const emit = defineEmits(['updateStep'])
|
|
|
|
|
|
- const { can } = useAbility()
|
|
|
+ const ability = useAbility()
|
|
|
+
|
|
|
+ const type: Ref<String> = ref('');
|
|
|
+ const organizationProfile = useOrganizationProfileStore()
|
|
|
+ const runtimeConfig = useRuntimeConfig()
|
|
|
|
|
|
const onTypeClick = (step: Number, Cardtype: String) => {
|
|
|
type.value = Cardtype;
|
|
|
emit('updateStep', { stepChoice: step, typeChoice: Cardtype });
|
|
|
}
|
|
|
|
|
|
- const type: Ref<String> = ref('');
|
|
|
- const organizationProfile = useOrganizationProfileStore()
|
|
|
+ const adminLegacy: Ref<string> = ref(runtimeConfig.baseUrlAdminLegacy)
|
|
|
+ const isLaw1901: ComputedRef<boolean> = organizationProfile.isAssociation
|
|
|
|
|
|
- const runtimeConfig = useRuntimeConfig()
|
|
|
- const adminLegacy: Ref<string> = ref(runtimeConfig.baseURL_adminLegacy)
|
|
|
- const isLaw1901: Ref<boolean> = ref(organizationProfile.isAssociation())
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
- .creation-type-container{
|
|
|
- border: none!important;
|
|
|
- .icon{
|
|
|
- i{
|
|
|
- font-size: 50px;
|
|
|
- color: var(--v-theme-neutral-strong, #777777);
|
|
|
- }
|
|
|
- }
|
|
|
- .infos-container{
|
|
|
- padding: 15px 0;
|
|
|
- h4{
|
|
|
- font-size: 15px;
|
|
|
- color: var(--v-theme-primary, #00AD8E);
|
|
|
- font-weight: bold;
|
|
|
- margin-bottom: 6px;
|
|
|
- }
|
|
|
- p{
|
|
|
- font-size: 13px;
|
|
|
- padding: 0;
|
|
|
- margin: 0;
|
|
|
- color: var(--v-theme-neutral);
|
|
|
- }
|
|
|
- }
|
|
|
- &>div{
|
|
|
- &:hover{
|
|
|
- cursor: pointer;
|
|
|
- background: var(--v-theme-ot-light_green, #a9e0d6);
|
|
|
- }
|
|
|
- }
|
|
|
+ const makeAdminUrl = (tail: string) => {
|
|
|
+ return UrlUtils.join(runtimeConfig.baseUrlAdminLegacy, tail)
|
|
|
}
|
|
|
-</style>
|
|
|
+</script>
|