Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • AlekSIS/onboarding/AlekSIS-App-Maka
1 result
Show changes
Commits on Source (2)
......@@ -6,104 +6,107 @@ import SecondaryActionButton from "aleksis.core/components/generic/buttons/Secon
</script>
<template>
<shared-secret-wrapper>
<v-container>
<inline-c-r-u-d-list
:headers="headers"
:i18n-key="i18nKey"
create-item-i18n-key="maka.efforts.create"
:gql-query="gqlQuery"
:gql-create-mutation="gqlCreateMutation"
:gql-patch-mutation="gqlPatchMutation"
:gql-delete-mutation="gqlDeleteMutation"
:default-item="defaultItem"
>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #name.field="{ attrs, on }">
<div aria-required="true">
<v-text-field
v-bind="attrs"
v-on="on"
:rules="$rules().required.build()"
/>
</div>
</template>
<template #effortType="{ item }">
<effort-type-chip
:effort-type="item.effortType"
v-if="item.effortType"
<v-container>
<inline-c-r-u-d-list
:headers="headers"
:i18n-key="i18nKey"
create-item-i18n-key="maka.efforts.create"
:gql-query="gqlQuery"
:gql-create-mutation="gqlCreateMutation"
:gql-patch-mutation="gqlPatchMutation"
:gql-delete-mutation="gqlDeleteMutation"
:default-item="defaultItem"
>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #name.field="{ attrs, on }">
<div aria-required="true">
<v-text-field
v-bind="attrs"
v-on="on"
:rules="$rules().required.build()"
/>
<span v-else></span>
</template>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #effortType.field="{ attrs, on }">
<div aria-required="true">
<v-autocomplete
v-bind="attrs"
v-on="on"
:items="effortTypes"
item-text="name"
item-value="id"
:rules="$rules().required.build()"
/>
</div>
</template>
</div>
</template>
<template #group="{ item }">
<group-chip :group="item.group" />
</template>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #group.field="{ attrs, on }">
<div aria-required="true">
<v-autocomplete
v-bind="attrs"
v-on="on"
:items="groups"
item-text="name"
item-value="id"
:rules="$rules().required.build()"
/>
</div>
</template>
<template #effortType="{ item }">
<effort-type-chip
:effort-type="item.effortType"
v-if="item.effortType"
/>
<span v-else></span>
</template>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #effortType.field="{ attrs, on }">
<div aria-required="true">
<v-autocomplete
v-bind="attrs"
v-on="on"
:items="effortTypes"
item-text="name"
item-value="id"
:rules="$rules().required.build()"
/>
</div>
</template>
<template #gradeSet="{ item }">
{{ item.gradeSet.name }}
</template>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #gradeSet.field="{ attrs, on }">
<div aria-required="true">
<v-autocomplete
v-bind="attrs"
v-on="on"
:items="gradeSets"
item-text="name"
item-value="id"
:rules="$rules().required.build()"
/>
</div>
</template>
<template #group="{ item }">
<group-chip :group="item.group" />
</template>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #group.field="{ attrs, on }">
<div aria-required="true">
<v-autocomplete
v-bind="attrs"
v-on="on"
:items="groups"
item-text="name"
item-value="id"
:rules="$rules().required.build()"
/>
</div>
</template>
<template #actions="{ item }">
<secondary-action-button
i18n-key="actions.open_grade_book"
icon-text="mdi-open-in-new"
:to="{
name: 'core.groupWithTab',
params: {
id: item.group.id,
tabSlug: slug,
},
}"
<template #gradeSet="{ item }">
{{ item.gradeSet.name }}
</template>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #gradeSet.field="{ attrs, on }">
<div aria-required="true">
<v-autocomplete
v-bind="attrs"
v-on="on"
:items="gradeSets"
item-text="name"
item-value="id"
:rules="$rules().required.build()"
/>
</template>
</inline-c-r-u-d-list>
</v-container>
</shared-secret-wrapper>
</div>
</template>
<template #actions="{ item }">
<secondary-action-button
i18n-key="actions.open_grade_book"
icon-text="mdi-open-in-new"
:to="{
name: 'core.groupWithTab',
params: {
id: item.group.id,
tabSlug: slug,
},
}"
/>
</template>
<template #createComponent="{ attrs, on }">
<CreateEffort style="width: fit-content" v-bind="attrs" v-on="on" />
</template>
</inline-c-r-u-d-list>
</v-container>
</template>
<script>
import formRulesMixin from "aleksis.core/mixins/formRulesMixin.js";
import CreateEffort from "./CreateEffort.vue";
import {
helperGroups,
helperGradeSets,
......@@ -120,6 +123,9 @@ import { GRADE_BOOK_TAB_SLUG } from "../../index";
export default {
name: "Efforts",
mixins: [formRulesMixin],
components: {
CreateEffort,
},
apollo: {
groups: {
query: helperGroups,
......