Skip to content

Commit

Permalink
Correct frontend errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hunter-richardson committed Jun 23, 2024
1 parent 1d63fae commit 3cc27a5
Showing 1 changed file with 27 additions and 39 deletions.
66 changes: 27 additions & 39 deletions src/facies/inflectere.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
defineProps<{
eventus: {
referendum: Faciendum<Hoc>,
referendum: Faciendum<Hoc> | null,
categoria: string
}
}>();
Expand All @@ -15,11 +15,11 @@
filter: (verbum: Hoc, colamen: string) => boolean
}[];
const agendum: Faciendum<Hoc> = eventus?.referendum;
const agendum: Faciendum<Hoc> = eventus.referendum;

Check failure on line 18 in src/facies/inflectere.vue

View workflow job for this annotation

GitHub Actions / aedificare

Cannot find name 'eventus'. Did you mean 'event'?
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const tabula: Tabula<Hoc> | null = agendum?.putetur() ?? null;
const categoria: string = eventus?.categoria ?? '';
const categoria: string = eventus.categoria ?? '';

Check failure on line 22 in src/facies/inflectere.vue

View workflow job for this annotation

GitHub Actions / aedificare

Cannot find name 'eventus'. Did you mean 'event'?
const anglica: boolean = Cocutor.se.ipse().edatur('lingua') === 'anglica';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand Down Expand Up @@ -70,14 +70,10 @@
import { genera, gradi, anglicum } from '../miscella/enumerationes';
import type { Referendum } from '../praebeunda/interfecta'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const verbum: ModelRef<Verbum | undefined, string> = defineModel<Verbum>('verbum');
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const HorizontalScroll = require('vue-horizontal-scroll');
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const seligenda: string[] = [];
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const selecta: string[] = [];
type Et = {
Expand Down Expand Up @@ -113,7 +109,7 @@
figura: figura,
seligenda: seligenda,
selecta: selecta,
haec: tabula?.tabulentur() ?? [],
haec: (tabula?.tabulentur() ?? []) as Hoc[],
verbum: verbum.value,
onerans: true,
columnae: columnae,
Expand All @@ -136,77 +132,69 @@
if (this.figura === 'numeramenAgendum' &&
agendum instanceof Agenda.NumeramenAgendum &&
numeramen instanceof Numeramen) {
const referendum: Referendum = (agendum as Agenda.NumeramenAgendum).referatur(numeramen.referendum);
const referendum: Referendum | null = await (agendum as Agenda.NumeramenAgendum).referatur(numeramen.referendum);
if (referendum instanceof Numerus) {
this.verbum = referendum as Numerus;
} else if (referendum instanceof Agenda.NomenAgendum) {
this.eventus = {
referendum: referendum as Agenda.NomenAgendum,
categoria: 'nomen'
};
this.eventus.referendum = referendum as Agenda.NomenAgendum;

Check failure on line 139 in src/facies/inflectere.vue

View workflow job for this annotation

GitHub Actions / aedificare

Type 'NomenAgendum' is not assignable to type 'Faciendum<Hoc>'.
this.eventus.categoria = 'nomen';
} else if (referendum instanceof Agenda.AdiectivumAgendum) {
this.eventus = {
referendum: referendum as Agenda.AdiectivumAgendum,
categoria: 'adiectivum'
};
this.eventus.referendum = referendum as Agenda.AdiectivumAgendum;

Check failure on line 142 in src/facies/inflectere.vue

View workflow job for this annotation

GitHub Actions / aedificare

Type 'AdiectivumAgendum' is not assignable to type 'Faciendum<Hoc>'.
this.eventus.categoria = 'adiectivum';
} else if (referendum instanceof Agenda.Incomparabile) {
this.eventus = {
referendum: referendum as Agenda.Incomparabile,
categoria: 'adiectivum'
};
this.eventus.referendum = referendum as Agenda.Incomparabile;

Check failure on line 145 in src/facies/inflectere.vue

View workflow job for this annotation

GitHub Actions / aedificare

Type 'Incomparabile' is not assignable to type 'Faciendum<Hoc>'.
this.eventus.categoria = 'adiectivum';
}
}
}, selige (hoc: Hoc): void {
this.verbum = hoc;
}, refer (eventus: {
}, async refer (eventus: {
categoria: string,
referendum?: string,
gradus?: string,
genus?: string;
}): void {
let referendum: Referendum | null = null;
}): Promise<void> {
switch (this.figura) {
case 'actusAgendus':
if (agendum instanceof Agenda.ActusAgendus) {
switch (eventus.referendum) {
case 'frequentativus':
referendum = (agendum as Agenda.ActusAgendus).frequentativus();
this.eventus.categoria = eventus.categoria;
this.eventus.referendum = (agendum as Agenda.ActusAgendus).frequentativus();

Check failure on line 163 in src/facies/inflectere.vue

View workflow job for this annotation

GitHub Actions / aedificare

Type 'ActusAgendus | null' is not assignable to type 'Faciendum<Hoc> | null'.
break;
case 'nomen':
referendum = (agendum as Agenda.ActusAgendus).nomen();
this.eventus.categoria = eventus.categoria;
this.eventus.referendum = await (agendum as Agenda.ActusAgendus).nomen();
break;
case 'actor':
referendum = (agendum as Agenda.ActusAgendus).actor(eventus.genus ?? '');
this.eventus.categoria = eventus.categoria;
this.eventus.referendum = (agendum as Agenda.ActusAgendus).actor(eventus.genus ?? '');
break;
}
}
break;
case 'nomenActum':
if (agendum instanceof Agenda.NomenActum) {
referendum = (agendum as Agenda.NomenActum).actus();
this.eventus.categoria = eventus.categoria;
this.eventus.referendum = await (agendum as Agenda.NomenActum).actus();
}
break;
case 'adiectivumAgendum':
if (agendum instanceof Agenda.AdiectivumAgendum) {
referendum = (agendum as Agenda.AdiectivumAgendum).probetur({
this.eventus.categoria = eventus.categoria;
this.eventus.referendum = await (agendum as Agenda.AdiectivumAgendum).probetur({
gradus: eventus.gradus ?? '',
genus: eventus.genus ?? ''
});
}
break;
case 'incomparabile':
if (agendum instanceof Agenda.Incomparabile) {
referendum = (agendum as Agenda.Incomparabile).probetur(eventus.genus ?? '');
this.eventus.categoria = eventus.categoria;
this.eventus.referendum = (agendum as Agenda.Incomparabile).probetur(eventus.genus ?? '');
}
break;
}
if (referendum) {
this.eventus = {
referendum: referendum,
categoria: eventus.categoria
};
}
}
}, async mounted (): Promise<void> {
this.haec = await this.omnes();
Expand Down Expand Up @@ -238,7 +226,7 @@
<template v-if='verbum'>
<specere :verbum='verbum' @blur='verbum = undefined;' />
</template>
<template v-else-if='eventus'>
<template v-else-if='eventus && eventus.referendum'>
<div id='colamina'>
<horizontal-scroll>
<v-chip-group v-for='seligendum in seligenda' :key='seligendum'
Expand All @@ -252,7 +240,7 @@
<v-btn-toggle>
<v-btn append-icon='sprint' id='frequentativus'
:text="anglica ? 'Frequentative' : 'Frequentativus'"
@click="refer({ categoria: 'nomen', referendum: 'frequentativus' });" />
@click="refer({ categoria: 'actus', referendum: 'frequentativus' });" />
<v-btn append-icon='subject' id='nomen' :text="anglica ? 'Noun' : 'Nomen'"
@click="refer({ categoria: 'nomen', referendum: 'nomen' });" />
<v-btn append-icon='person' id='actor' :text="anglica ? 'Agent (masculine)' : 'Actor'"
Expand Down

0 comments on commit 3cc27a5

Please sign in to comment.