Skip to content

Commit

Permalink
Merge pull request #1680 from frappe/version-15-hotfix
Browse files Browse the repository at this point in the history
chore: release v15
  • Loading branch information
ruchamahabal authored Apr 18, 2024
2 parents 12fe87b + 8afc06a commit 8282ff2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 43 deletions.
72 changes: 29 additions & 43 deletions frontend/src/components/CheckInPanel.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<template>
<div class="flex flex-col bg-white rounded w-full py-6 px-4 border-none">
<h2 class="text-lg font-bold text-gray-900">
Hey, {{ employee?.data?.first_name }} 👋
</h2>
<h2 class="text-lg font-bold text-gray-900">Hey, {{ employee?.data?.first_name }} 👋</h2>

<template v-if="allowCheckinFromMobile.data">
<div class="font-medium text-sm text-gray-500 mt-1.5" v-if="lastLog">
Expand All @@ -15,48 +13,43 @@
>
<template #prefix>
<FeatherIcon
:name="
nextAction.action === 'IN'
? 'arrow-right-circle'
: 'arrow-left-circle'
"
:name="nextAction.action === 'IN' ? 'arrow-right-circle' : 'arrow-left-circle'"
class="w-4"
/>
</template>
{{ nextAction.label }}
</Button>

<ion-modal
ref="modal"
trigger="open-checkin-modal"
:initial-breakpoint="1"
:breakpoints="[0, 1]"
>
<div class="h-40 w-full flex flex-col items-center justify-center gap-5 p-4 mb-5">
<div class="flex flex-col gap-1.5 items-center justify-center">
<div class="font-bold text-xl">
{{ dayjs(checkinTimestamp).format("hh:mm:ss a") }}
</div>
<div class="font-medium text-gray-500 text-sm">
{{ dayjs().format("D MMM, YYYY") }}
</div>
</div>
<Button
variant="solid"
class="w-full py-5 text-sm"
@click="submitLog(nextAction.action)"
>
Confirm {{ nextAction.label }}
</Button>
</div>
</ion-modal>
</template>

<div v-else class="font-medium text-sm text-gray-500 mt-1.5">
{{ dayjs().format("ddd, D MMMM, YYYY") }}
</div>
</div>

<ion-modal
ref="modal"
trigger="open-checkin-modal"
:initial-breakpoint="1"
:breakpoints="[0, 1]"
>
<div
class="h-40 w-full flex flex-col items-center justify-center gap-5 p-4 mb-5"
>
<div class="flex flex-col gap-1.5 items-center justify-center">
<div class="font-bold text-xl">
{{ dayjs(checkinTimestamp).format("hh:mm:ss a") }}
</div>
<div class="font-medium text-gray-500 text-sm">
{{ dayjs().format("D MMM, YYYY") }}
</div>
</div>
<Button
variant="solid"
class="w-full py-5 text-sm"
@click="submitLog(nextAction.action)"
>
Confirm {{ nextAction.label }}
</Button>
</div>
</ion-modal>
</template>

<script setup>
Expand All @@ -74,14 +67,7 @@ const checkinTimestamp = ref(null)
const checkins = createListResource({
doctype: DOCTYPE,
fields: [
"name",
"employee",
"employee_name",
"log_type",
"time",
"device_id",
],
fields: ["name", "employee", "employee_name", "log_type", "time", "device_id"],
filters: {
employee: employee.data.name,
},
Expand Down
3 changes: 3 additions & 0 deletions hrms/hr/doctype/leave_application/leave_application.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ frappe.ui.form.on("Leave Application", {
}

frm.trigger("set_employee");
if (frm.doc.docstatus === 0) {
frm.trigger("make_dashboard");
}
},

async set_employee(frm) {
Expand Down

0 comments on commit 8282ff2

Please sign in to comment.