Skip to content

Commit

Permalink
Remove the location toggle as we don't use it. (#354)
Browse files Browse the repository at this point in the history
* Remove the location toggle as we don't use it.

* 🌐 complete German translation

* Update frontend/src/elements/AppointmentListItem.vue

Co-authored-by: Andreas <[email protected]>

---------

Co-authored-by: Andreas Müller <[email protected]>
  • Loading branch information
MelissaAutumn and devmount authored Apr 8, 2024
1 parent e7628d1 commit 55f957a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 32 deletions.
19 changes: 7 additions & 12 deletions frontend/src/components/AppointmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<transition>
<div
v-if="open"
class=" position-center fixed z-50 w-full max-w-3xl rounded-xl bg-white
class=" position-center fixed z-50 w-full max-w-4xl rounded-xl bg-white
p-12 text-gray-500 dark:bg-gray-700 dark:text-gray-300
"
>
Expand Down Expand Up @@ -51,22 +51,18 @@
{{ appointment.calendar_title }}
</div>
</div>
<div>
<div class="mb-1 flex items-center gap-2 font-semibold">
<icon-map-pin class="size-4 shrink-0 fill-transparent stroke-gray-500 stroke-2"/>
{{ t('label.location') }}
</div>
<div class="pl-6">{{ t('label.' + keyByValue(locationTypes, appointment.location_type)) }}</div>
</div>
<div>
<div class="mb-1 flex items-center gap-2 font-semibold">
<icon-video class="size-4 shrink-0 fill-transparent stroke-gray-500 stroke-2"/>
{{ t('label.videoLink') }}
</div>
<div class="pl-6">
<a :href="appointment.location_url" class="text-teal-500 underline underline-offset-2" target="_blank">
<a v-if="appointment.location_url" :href="appointment.location_url" class="text-teal-500 underline underline-offset-2" target="_blank">
{{ appointment.location_url }}
</a>
<p v-else>
{{ t('label.notProvided') }}
</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -119,8 +115,8 @@
</template>

<script setup>
import { bookingStatus, locationTypes } from '@/definitions';
import { keyByValue, timeFormat } from '@/utils';
import { bookingStatus } from '@/definitions';
import { timeFormat } from '@/utils';
import { computed, inject } from 'vue';
import { useI18n } from 'vue-i18n';
Expand All @@ -129,7 +125,6 @@ import {
IconCalendar,
IconCalendarEvent,
IconClock,
IconMapPin,
IconNotes,
IconUsers,
IconVideo,
Expand Down
21 changes: 3 additions & 18 deletions frontend/src/components/ScheduleCreation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@
</option>
</select>
</label>
<label>
<div class="mb-1 font-medium text-gray-500 dark:text-gray-300">
{{ t("label.location") }}
</div>
<tab-bar
:tab-items="locationTypes"
:active="scheduleInput.location_type"
:disabled="!scheduleInput.active"
@update="updateLocationType"
/>
</label>
<label>
<div class="mb-1 font-medium text-gray-500 dark:text-gray-300">
{{ t("label.videoLink") }}
Expand Down Expand Up @@ -325,7 +314,6 @@ import { useUserStore } from '@/stores/user-store';
import AppointmentCreatedModal from '@/components/AppointmentCreatedModal';
import PrimaryButton from '@/elements/PrimaryButton';
import SecondaryButton from '@/elements/SecondaryButton';
import TabBar from '@/components/TabBar';
// icons
import { IconChevronDown } from '@tabler/icons-vue';
Expand Down Expand Up @@ -364,7 +352,9 @@ const activeStep1 = computed(() => state.value === scheduleCreationState.details
const activeStep2 = computed(() => state.value === scheduleCreationState.availability);
const activeStep3 = computed(() => state.value === scheduleCreationState.settings);
const visitedStep1 = ref(false);
const nextStep = () => state.value++;
const nextStep = () => {
state.value += 1;
};
// calculate calendar titles
const calendarTitles = computed(() => {
Expand Down Expand Up @@ -451,11 +441,6 @@ const getScheduleAppointment = () => ({
type: 'schedule',
});
// tab navigation for location types
const updateLocationType = (type) => {
scheduleInput.value.location_type = locationTypes[type];
};
// handle notes char limit
const charLimit = 250;
const charCount = computed(() => scheduleInput.value.details.length);
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/elements/AppointmentListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
<div class="overflow-x-hidden">
<div class="truncate">{{ appointment.title }}</div>
<div class="text-sm">
<span v-if="appointment.duration">{{ hDuration(appointment.duration) }},</span>
{{ t('label.' + keyByValue(locationTypes, appointment.location_type)) }}
<span v-if="appointment.duration">{{ hDuration(appointment.duration) }}</span>
</div>
</div>
<icon-dots-vertical class="size-6 shrink-0 fill-gray-400 stroke-gray-400 stroke-2" />
Expand Down
1 change: 1 addition & 0 deletions frontend/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"name": "Name",
"next": "Weiter",
"notConnected": "Nicht verbunden",
"notProvided": "Keine Angabe",
"notes": "Details",
"off": "Aus",
"on": "An",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"name": "Name",
"next": "Next",
"notConnected": "Not connected",
"notProvided": "Not Provided",
"notes": "Notes",
"off": "Off",
"on": "On",
Expand Down

0 comments on commit 55f957a

Please sign in to comment.