Compare commits

..

2 Commits

Author SHA1 Message Date
timotiabbauftech
b186e7ca23 Merge branch 'development' of https://git.abbauf.com/Magang-2025/Kasir into development 2025-10-21 10:07:27 +07:00
timotiabbauftech
f957cf4e5a fix layout 2025-10-21 10:06:30 +07:00
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<div class="p-6">
<p class="font-serif italic text-[25px] text-D">BRANKAS</p>
<div class="flex justify-end">
<div class="w-full sm:w-64 my-3">
<div class="w-full md:w-64 my-3 mb-9">
<searchbar v-model:search="searchQuery"/>
</div>
</div>

View File

@ -1,9 +1,9 @@
<template>
<mainLayout>
<div class="p-6 flex flex-col sm:flex-row justify-between items-start gap-3">
<div class="p-6">
<p class="font-serif italic text-[25px] text-D">NAMPAN</p>
<div class="flex flex-col gap-3 justify-end w-full sm:w-auto">
<div class="flex flex-col gap-3 justify-end w-full sm:w-auto my-3">
<Searchbar v-model:search="searchQuery" />
<div class="flex w-full gap-2" v-if="isAdmin">
<button @click="openModal" class="px-4 py-2 sm:px-2 sm:py-1 hover:bg-B bg-C rounded-md shadow w-full">
@ -99,9 +99,9 @@ const saveTray = async () => {
}
try {
const token = localStorage.getItem("token");
const headers = {
const headers = {
Accept: 'application/json',
Authorization: `Bearer ${token}`
Authorization: `Bearer ${token}`
};
if (editingTrayId.value) {
await axios.put(`/api/nampan/${editingTrayId.value}`, { nama: trayName.value }, { headers });
@ -119,7 +119,7 @@ const saveTray = async () => {
const errors = error.response?.data?.errors?.nama || [];
console.log(errors);
errorCreate.value = errors[0] || 'Gagal menyimpan nampan.';
clearTimeout(timer.value);
timer.value = setTimeout(() => { errorCreate.value = ""; }, 3000);
}