Skip to content

Commit

Permalink
Merge pull request #80 from filips123/frontend-additions
Browse files Browse the repository at this point in the history
Frontend additions
  • Loading branch information
PetJer authored Aug 29, 2023
2 parents b327321 + 9da9feb commit d66df33
Show file tree
Hide file tree
Showing 8 changed files with 198 additions and 8 deletions.
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/data_error.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Napaka v podatkih
description: Napišite poročilo o napaki v podatkih.
body:
- type: markdown
attributes:
value: |
Hvala, ker ste si vzeli čas za izpolnitev tega poročila!
- type: dropdown
id: datatype
attributes:
label: Vrsta podatka
description: Pri katerem podatku, se je pojavila napaka?
options:
- Urnik
- Jedilniki
- Okrožnice
- Nadomeščanja
- Razporedi kosil
validations:
required: true
- type: dropdown
id: viewtype
attributes:
label: Vrsta pogleda
description: Pri katerem pogledu, se je pojavila napaka?
options:
- Razred
- Profesor
- Učilnica
validations:
required: true
- type: textarea
id: error
attributes:
label: Opis napake
description: Kolikor vam je mogoče podrobno opisati napako.
placeholder: npr. Namesto geografije 3. uro je bila napisana 4. uro
validations:
required: true
- type: input
id: date
attributes:
label: Datum
description: Vpišite datum, ko se je zgodila napaka (dd. mm. yyyy)
placeholder: npr. 29. 12. 2023
validations:
required: false
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Prošnja za funkcijo
description: Napišite izboljšavo obstoječih funkcij ali novo funkcijo
body:
- type: markdown
attributes:
value: |
Hvala, ker ste si vzeli čas za izpolnitev tega poročila!
- type: textarea
id: idea
attributes:
label: Vaša zamisel
description: V nekaj stavkih opišite svojo zamisel.
validations:
required: true
- type: textarea
id: whatfor
attributes:
label: Problem, ki ga reši
description: Kakšen problem bi rešila vaša zamisel?
validations:
required: true
- type: textarea
id: other
attributes:
label: Slike vaše zamisli
description: Kako bi izgledala vaša zamisel? Kako rešijo to druge aplikacije?
validations:
required: false
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/malfunction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Napaka v delovanju
description: Napišite poročilo o napaki v delovanju.
body:
- type: markdown
attributes:
value: |
Hvala, ker ste si vzeli čas za izpolnitev tega poročila!
- type: textarea
id: description
attributes:
label: Opis napake
description: Kolikor vam je mogoče podrobno opisati napako.
validations:
required: true
- type: input
id: os
attributes:
label: Operacijski sistem
description: V katerem operacijskem sistemu se pojavlja ta napaka (po možnosti z verzijo)?
placeholder: Android 13, iOS 16, Windows 11 itd.
validations:
required: true
- type: input
id: browser
attributes:
label: Brskalnik
description: V katerem brskalniku se pojavlja ta napaka?
placeholder: Chrome, Safari, Firefox itd.
validations:
required: true
- type: textarea
id: screenshot
attributes:
label: Posnetek zaslona telefona/računalnika
description: V primeru, če imate vizualne napake, lahko tu prilepite svoj posnetek zaslona.
placeholder: Kliknite v to besedilno polje in prilepite svoj posnetek zaslona.
validations:
required: false
6 changes: 3 additions & 3 deletions API/gimvicurnik/updaters/eclassroom.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


class ParserType(enum.Enum):
SUBSTITUTUONS = "substitutions"
SUBSTITUTIONS = "substitutions"
LESSON_CHANGE = "lesson-change"
SUBJECT_CHANGE = "subject-change"
CLASSROOM_CHANGE = "classroom-change"
Expand Down Expand Up @@ -421,7 +421,7 @@ def _parse_substitutions(self, tables: Tables, effective: date) -> None:

# Get parser type
if row == header_substitutions:
parser_type = ParserType.SUBSTITUTUONS
parser_type = ParserType.SUBSTITUTIONS
continue
elif row == header_lesson_change:
parser_type = ParserType.LESSON_CHANGE
Expand All @@ -447,7 +447,7 @@ def _parse_substitutions(self, tables: Tables, effective: date) -> None:
continue

# Parse substitutions
if parser_type == ParserType.SUBSTITUTUONS:
if parser_type == ParserType.SUBSTITUTIONS:
# Get basic substitution properties
time = int(row[1][:-1]) if row[1] != "PU" else 0
subject = self._normalize_subject_name(row[5])
Expand Down
10 changes: 6 additions & 4 deletions website/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
<v-app>
<v-app-bar app clipped-left color="#009300" dark extension-height="35">
<div class="d-flex align-center overflow-x-hidden pr-1">
<v-img alt="GimVičUrnik Logo"
class="mr-2"
src="./assets/logo.svg"
width="40" />
<router-link title="Domov" :to="{ name: 'home' }">
<v-img alt="GimVičUrnik Logo"
class="mr-2"
src="./assets/logo.svg"
width="40" />
</router-link>
<v-toolbar-title>{{ pageTitle }}</v-toolbar-title>
</div>

Expand Down
52 changes: 52 additions & 0 deletions website/src/components/settings/About.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<template>
<v-card width="35rem">
<v-toolbar class="text-uppercase" color="#009300" dark>
O aplikaciji
</v-toolbar>

<v-card-text class="text--primary">
<p>
Aplikacija GimVič prikazuje urnik, nadomeščanja, jedilnik ter razpored kosila za dijake in profesorje Gimnazije Vič.
</p>
<p>
Aplikacija je neuradna in lahko vsebuje nepopolne ali napačne podatke. Za ogled uradnih podatkov uporabite
<a class="text-decoration-none" href="https://ucilnica.gimvic.org/">Spletno učilnico Gimnazije Vič</a>.
</p>
<p>
V <a class="text-decoration-none" href="https://github.com/filips123/GimVicUrnik/wiki">dokumentaciji projekta</a>
so dostopna navodila za namestitev in uporabo.
</p>
<p>
Aplikacija zbira omejene podatke o brskalniku in uporabi za namene odpravljanja napak in izboljšanja učinkovitosti.
Podatki se ne uporabljajo za identfikacijo uporabnikov, oglaševanje ali druge namene.
</p>
<p>
Razvijalci:
<ul>
<li>Filip Štamcar</li>
<li>Jakob Kralj</li>
<li>Peter Jereb</li>
</ul>
</p>
<p>
Če ste odkrili napako v aplikaciji ali morda želite ponuditi povratne informacije, lahko to naredite na
<a class="text-decoration-none" href="https://github.com/filips123/GimVicUrnik/issues/new/choose">uradnem repozitoriju</a>.
</p>
</v-card-text>

<v-card-actions class="justify-end">
<v-btn color="green" text v-on:click=closeDialog>V redu</v-btn>
</v-card-actions>
</v-card>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
@Component
export default class About extends Vue {
closeDialog (): void {
this.$emit('closeDialog')
}
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
Aplikacija je neuradna in lahko vsebuje nepopolne ali napačne podatke. Za ogled uradnih podatkov uporabite
<a class="text-decoration-none" href="https://ucilnica.gimvic.org/">Spletno učilnico Gimnazije Vič</a>.
</p>
<p>
V <a class="text-decoration-none" href="https://github.com/filips123/GimVicUrnik/wiki">dokumentaciji projekta</a>
so dostopna navodila za namestitev in uporabo.
</p>
<p>
Aplikacija zbira omejene podatke o brskalniku in uporabi za namene odpravljanja napak in izboljšanja učinkovitosti.
Podatki se ne uporabljajo za identfikacijo uporabnikov, oglaševanje ali druge namene.
Expand Down
21 changes: 20 additions & 1 deletion website/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
label="Posodobi podatke"
@click.native="updateData" />

<v-divider class="my-6" />

<settings-action v-model="aboutDialog"
:icon="mdiInformationOutline"
:message="`Trenutna različica: ${appVersion}`"
label="O aplikaciji" />

<v-dialog v-model="entitySelectionDialog"
v-bind:persistent="entitySelectionPersistent"
content-class="settings-dialog"
Expand Down Expand Up @@ -83,6 +90,10 @@
<v-dialog v-model="moodleTokenDialog" content-class="settings-dialog" width="35rem">
<moodle-token v-if="moodleTokenDialog" @closeDialog=closeMoodleTokenDialog />
</v-dialog>

<v-dialog v-model="aboutDialog" content-class="settings-dialog" width="35rem">
<about v-if="aboutDialog" @closeDialog=closeAboutDialog />
</v-dialog>
</div>
</template>

Expand All @@ -100,9 +111,10 @@
</style>

<script lang="ts">
import { mdiDatabaseImportOutline, mdiKey, mdiTuneVariant, mdiUpdate, mdiWeatherNight } from '@mdi/js'
import { mdiDatabaseImportOutline, mdiInformationOutline, mdiKey, mdiTuneVariant, mdiUpdate, mdiWeatherNight } from '@mdi/js'
import { Component, Vue } from 'vue-property-decorator'
import About from '@/components/settings/About.vue'
import DataCollectionSelection from '@/components/settings/DataCollectionSelection.vue'
import EntitySelection from '@/components/settings/EntitySelection.vue'
import LunchSelection from '@/components/settings/LunchSelection.vue'
Expand All @@ -116,6 +128,7 @@ import { StorageModule, updateAllData } from '@/store/modules/storage'
@Component({
components: {
About,
MoodleToken,
DataCollectionSelection,
ThemeSelection,
Expand All @@ -132,6 +145,7 @@ export default class Settings extends Vue {
mdiWeatherNight = mdiWeatherNight
mdiUpdate = mdiUpdate
mdiKey = mdiKey
mdiInformationOutline = mdiInformationOutline
// Get app version
get appVersion (): string {
Expand Down Expand Up @@ -225,6 +239,7 @@ export default class Settings extends Vue {
dataCollectionDialog = false
themeSelectionDialog = false
moodleTokenDialog = false
aboutDialog = false
entitySelectionPersistent = false
Expand Down Expand Up @@ -331,6 +346,10 @@ export default class Settings extends Vue {
this.moodleTokenDialog = false
}
closeAboutDialog (): void {
this.aboutDialog = false
}
persistEntityDialog (persistent: boolean): void {
this.entitySelectionPersistent = persistent
}
Expand Down

0 comments on commit d66df33

Please sign in to comment.