Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
57249ffb
Commit
57249ffb
authored
7 months ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Display error if statistics are empty (should never occur)
parent
2e511a6c
No related branches found
No related tags found
1 merge request
!361
Resolve "Add statistics page for absences"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue
+16
-2
16 additions, 2 deletions
...ponents/coursebook/statistics/StatisticsForPersonCard.vue
aleksis/apps/alsijil/frontend/errorCodes.js
+17
-0
17 additions, 0 deletions
aleksis/apps/alsijil/frontend/errorCodes.js
with
33 additions
and
2 deletions
aleksis/apps/alsijil/frontend/components/coursebook/statistics/StatisticsForPersonCard.vue
+
16
−
2
View file @
57249ffb
...
...
@@ -24,12 +24,22 @@
{{
$t
(
"
alsijil.coursebook.statistics.title_plural
"
)
}}
</v-card-title>
<v-card-text>
<v-card-text
v-if=
"!$apollo.queries.statistics.loading && statistics == null"
>
<message-box
type=
"error"
>
<div>
{{
$t
(
"
generic_messages.error
"
)
}}
</div>
<small>
{{
$t
(
"
error_code
"
,
{
errorCode
}
)
}}
<
/small
>
<
/message-box
>
<
/v-card-text
>
<
v
-
card
-
text
v
-
else
>
<
div
class
=
"
grid
"
>
<
statistics
-
absences
-
card
style
=
"
grid-area: absences
"
:
absence
-
reasons
=
"
statistics.absenceReasons
"
:loading=
"$apollo.loading"
:
loading
=
"
$apollo.
queries.statistics.
loading
"
/>
<
statistics
-
tardiness
-
card
style
=
"
grid-area: tardinesses
"
...
...
@@ -50,17 +60,20 @@
<
script
>
import
personOverviewCardMixin
from
"
aleksis.core/mixins/personOverviewCardMixin.js
"
;
import
BaseButton
from
"
aleksis.core/components/generic/buttons/BaseButton.vue
"
;
import
MessageBox
from
"
aleksis.core/components/generic/MessageBox.vue
"
;
import
StatisticsAbsencesCard
from
"
./StatisticsAbsencesCard.vue
"
;
import
StatisticsTardinessCard
from
"
./StatisticsTardinessCard.vue
"
;
import
StatisticsExtraMarksCard
from
"
./StatisticsExtraMarksCard.vue
"
;
import
{
statisticsByPerson
}
from
"
./statistics.graphql
"
;
import
errorCodes
from
"
../../../errorCodes
"
;
export
default
{
name
:
"
StatisticsForPersonCard
"
,
mixins
:
[
personOverviewCardMixin
],
components
:
{
BaseButton
,
MessageBox
,
StatisticsAbsencesCard
,
StatisticsTardinessCard
,
StatisticsExtraMarksCard
,
...
...
@@ -80,6 +93,7 @@ export default {
tardinessCount
:
0
,
extraMarks
:
[],
}
,
errorCode
:
errorCodes
.
statisticsEmpty
,
}
;
}
,
apollo
:
{
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/frontend/errorCodes.js
0 → 100644
+
17
−
0
View file @
57249ffb
/**
* Alsijil Error Codes.
*
* Schema:
* abb.
* a: A|C|D|P|S:
* Component inside Alsijil
* - Absences
* - Coursebook
* - Documentation
* - Personal Notes
* - Statistics
* bb: incrementing number
*/
export
default
{
statisticsEmpty
:
"
ALSIJIL_S01
"
,
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment