|
|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<LayoutContainer class="mt-4">
|
|
|
- <v-expansion-panels focusable multiple :value="[0]">
|
|
|
- <!-- Description -->
|
|
|
+ <v-expansion-panels focusable multiple :value="[0, 1]">
|
|
|
+ <!-- Cycle -->
|
|
|
<UiExpansionPanel id="cycle" icon="fa-bars">
|
|
|
<v-container fluid class="container">
|
|
|
<v-row>
|
|
|
<v-col cols="12" sm="12">
|
|
|
<UiCollection
|
|
|
- :query="query()"
|
|
|
- :model="model"
|
|
|
+ :query="queryCycle()"
|
|
|
+ :model="modelCycle"
|
|
|
loaderType="image"
|
|
|
>
|
|
|
<template #list.item="{items}">
|
|
|
@@ -22,7 +22,7 @@
|
|
|
<UiCard
|
|
|
:id="item.id"
|
|
|
:link="`/parameters/education/cycle/${item.id}`"
|
|
|
- :model="model"
|
|
|
+ :model="modelCycle"
|
|
|
:can-delete="false"
|
|
|
>
|
|
|
<template #card.text>
|
|
|
@@ -39,6 +39,45 @@
|
|
|
</v-container>
|
|
|
</UiExpansionPanel>
|
|
|
|
|
|
+ <!-- EducationTiming -->
|
|
|
+ <UiExpansionPanel id="educationTiming" icon="fa-calendar">
|
|
|
+ <v-container fluid class="container">
|
|
|
+ <v-row>
|
|
|
+ <v-col cols="12" sm="12">
|
|
|
+ <UiCollection
|
|
|
+ :query="queryEducationTiming()"
|
|
|
+ :model="modelEducationTiming"
|
|
|
+ loaderType="image"
|
|
|
+ newLink="/parameters/education/education_timing/new"
|
|
|
+ >
|
|
|
+ <template #list.item="{items}">
|
|
|
+ <v-container fluid>
|
|
|
+ <v-row dense>
|
|
|
+ <v-col
|
|
|
+ v-for="item in items"
|
|
|
+ :key="item.id"
|
|
|
+ cols="4"
|
|
|
+ >
|
|
|
+ <UiCard
|
|
|
+ :id="item.id"
|
|
|
+ :link="`/parameters/education/education_timing/${item.id}`"
|
|
|
+ :model="modelEducationTiming"
|
|
|
+ :can-delete="false"
|
|
|
+ >
|
|
|
+ <template #card.text>
|
|
|
+ {{ item.timing }}
|
|
|
+ </template>
|
|
|
+ </UiCard>
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+ </v-container>
|
|
|
+ </template>
|
|
|
+ </UiCollection>
|
|
|
+ </v-col>
|
|
|
+ </v-row>
|
|
|
+ </v-container>
|
|
|
+ </UiExpansionPanel>
|
|
|
+
|
|
|
</v-expansion-panels>
|
|
|
</LayoutContainer>
|
|
|
</template>
|
|
|
@@ -48,16 +87,21 @@ import {computed, ComputedRef, defineComponent} from '@nuxtjs/composition-api'
|
|
|
import { repositoryHelper } from '~/services/store/repository'
|
|
|
import {Query} from "@vuex-orm/core";
|
|
|
import {Cycle} from "~/models/Education/Cycle";
|
|
|
+import {EducationTiming} from "~/models/Education/EducationTiming";
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: 'cycles',
|
|
|
+ name: 'educationTimings',
|
|
|
setup () {
|
|
|
- const repository = repositoryHelper.getRepository(Cycle)
|
|
|
- const query: ComputedRef<Query> = computed(() => repository.query().orderBy('order', 'asc'))
|
|
|
+ const repositoryCycle = repositoryHelper.getRepository(Cycle)
|
|
|
+ const repositoryEducationTiming = repositoryHelper.getRepository(EducationTiming)
|
|
|
+ const queryCycle: ComputedRef<Query> = computed(() => repositoryCycle.query().orderBy('order', 'asc'))
|
|
|
+ const queryEducationTiming: ComputedRef<Query> = computed(() => repositoryEducationTiming.query())
|
|
|
|
|
|
return {
|
|
|
- query: () => query,
|
|
|
- model: Cycle
|
|
|
+ queryCycle: () => queryCycle,
|
|
|
+ queryEducationTiming: () => queryEducationTiming,
|
|
|
+ modelCycle: Cycle,
|
|
|
+ modelEducationTiming: EducationTiming,
|
|
|
}
|
|
|
}
|
|
|
})
|