Skip to content

Commit

Permalink
Add numbers to days of the week for easier mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamalera committed Mar 24, 2023
1 parent 32658dd commit abf9ca1
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions bin-buddy/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
<v-select
v-model="row.value"
:items="days"
item-text="name"
item-value="number"
attach
chips
label="Wann?"
Expand All @@ -72,10 +74,10 @@
:rules="[numberRule]"
></v-text-field>
<v-radio-group v-model="row.radioGroup">
<v-radio label="Tag(e)" value="days"></v-radio>
<v-radio label="Woche(n)" value="weeks"></v-radio>
<v-radio label="Monat(e)" value="months"></v-radio>
<v-radio label="Jahr(e)" value="years"></v-radio>
<v-radio label="Tag(e)" value="daily"></v-radio>
<v-radio label="Woche(n)" value="weekly"></v-radio>
<v-radio label="Monat(e)" value="monthly"></v-radio>
<v-radio label="Jahr(e)" value="yearly"></v-radio>
</v-radio-group>
</v-col>
</v-row>
Expand Down Expand Up @@ -150,13 +152,13 @@ export default {
.toISOString()
.substr(0, 10),
days: [
"Montag",
"Dienstag",
"Mittwoch",
"Donnerstag",
"Freitag",
"Samstag",
"Sonntag",
{ name: "Montag", number: 1 },
{ name: "Dienstag", number: 2 },
{ name: "Mittwoch", number: 3 },
{ name: "Donnerstag", number: 4 },
{ name: "Freitag", number: 5 },
{ name: "Samstag", number: 6 },
{ name: "Sonntag", number: 7 },
],
numberRule: (v) => {
if (!v.trim()) return true;
Expand Down

0 comments on commit abf9ca1

Please sign in to comment.