Skip to content
Snippets Groups Projects
Verified Commit 64395760 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Reformat

parent add5e024
No related branches found
No related tags found
1 merge request!2Resolve "Frontend for Models"
...@@ -755,7 +755,7 @@ export default defineComponent({ ...@@ -755,7 +755,7 @@ export default defineComponent({
const result = []; const result = [];
// Convert the input array into an array of numbers // Convert the input array into an array of numbers
const numbers = arr.map(item => parseInt(item.slice(2), 10)); const numbers = arr.map((item) => parseInt(item.slice(2), 10));
let startIndex = 0; let startIndex = 0;
...@@ -769,20 +769,26 @@ export default defineComponent({ ...@@ -769,20 +769,26 @@ export default defineComponent({
// Push the last subarray // Push the last subarray
result.push(arr.slice(startIndex)); result.push(arr.slice(startIndex));
return result.map(array => (array.length < 3 ? array : [array[0], array[array.length - 1]])); return result.map((array) =>
array.length < 3 ? array : [array[0], array[array.length - 1]]
);
}, },
getTimeRangesByWeekdaysString(timeRange) { getTimeRangesByWeekdaysString(timeRange) {
return (timeRange.weekdays.length === this.weekdays.length return (
? "" (timeRange.weekdays.length === this.weekdays.length
: this.getOutermostItems(timeRange.weekdays) ? ""
.map(weekdays => weekdays : this.getOutermostItems(timeRange.weekdays)
.map((weekday) => this.$t("weekdays_short." + weekday)) .map(
.join("") // Non-breaking hyphen (U+02011) (weekdays) =>
weekdays
.map((weekday) => this.$t("weekdays_short." + weekday))
.join("") // Non-breaking hyphen (U+02011)
) )
.join(", ") + ": ") .join(", ") + ": ") +
+ this.$d(new Date("1970-01-01T" + timeRange.timeStart), "shortTime") this.$d(new Date("1970-01-01T" + timeRange.timeStart), "shortTime") +
+ " " " " +
+ this.$d(new Date("1970-01-01T" + timeRange.timeEnd), "shortTime"); this.$d(new Date("1970-01-01T" + timeRange.timeEnd), "shortTime")
);
}, },
}, },
}); });
...@@ -856,7 +862,8 @@ export default defineComponent({ ...@@ -856,7 +862,8 @@ export default defineComponent({
> >
<v-card-title>{{ period }}</v-card-title> <v-card-title>{{ period }}</v-card-title>
<v-card-subtitle class="ma-0 pa-4"> <v-card-subtitle class="ma-0 pa-4">
<div v-for="timeRange in timeRangesByWeekdays( <div
v-for="timeRange in timeRangesByWeekdays(
slotsByPeriods.find( slotsByPeriods.find(
(periodWithSlots) => periodWithSlots.period === period (periodWithSlots) => periodWithSlots.period === period
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment