feat: timezone in batches

This commit is contained in:
Jannat Patel
2024-06-21 13:08:58 +05:30
parent 63f4dc0caa
commit 9c2bebb3d9
11 changed files with 104 additions and 29 deletions

View File

@@ -36,19 +36,25 @@
:endDate="batch.end_date"
class="mb-3"
/>
<div class="flex items-center">
<div class="flex items-center mb-3">
<Clock class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<span>
{{ formatTime(batch.start_time) }} - {{ formatTime(batch.end_time) }}
</span>
</div>
<div v-if="batch.timezone" class="flex items-center">
<Globe class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<span>
{{ batch.timezone }}
</span>
</div>
</div>
</div>
</template>
<script setup>
import { Badge } from 'frappe-ui'
import { formatTime } from '../utils'
import { Clock, BookOpen } from 'lucide-vue-next'
import { Clock, BookOpen, Globe } from 'lucide-vue-next'
import DateRange from '@/components/Common/DateRange.vue'
const props = defineProps({

View File

@@ -26,13 +26,19 @@
:endDate="batch.data.end_date"
class="mb-3"
/>
<div class="flex items-center">
<div class="flex items-center mb-3">
<Clock class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<span>
{{ formatTime(batch.data.start_time) }} -
{{ formatTime(batch.data.end_time) }}
</span>
</div>
<div v-if="batch.data.timezone" class="flex items-center">
<Globe class="h-4 w-4 stroke-1.5 mr-2 text-gray-700" />
<span>
{{ batch.data.timezone }}
</span>
</div>
<router-link
v-if="user?.data?.is_moderator"
:to="{
@@ -91,7 +97,7 @@
<script setup>
import { inject, computed } from 'vue'
import { Badge, Button } from 'frappe-ui'
import { BookOpen, Clock } from 'lucide-vue-next'
import { BookOpen, Clock, Globe } from 'lucide-vue-next'
import { formatNumberIntoCurrency, formatTime } from '@/utils'
import DateRange from '@/components/Common/DateRange.vue'