Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the location toggle as we don't use it. #354

Merged
merged 3 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 0 additions & 1 deletion frontend/src/elements/AppointmentListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<div class="truncate">{{ appointment.title }}</div>
<div class="text-sm">
<span v-if="appointment.duration">{{ hDuration(appointment.duration) }},</span>
MelissaAutumn marked this conversation as resolved.
Show resolved Hide resolved
{{ t('label.' + keyByValue(locationTypes, appointment.location_type)) }}
</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/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
"myLink": "My link",
"name": "Name",
"next": "Next",
"notProvided": "Not Provided",
"notConnected": "Not connected",
"notes": "Notes",
"off": "Off",
Expand Down