Merge branch 'production' of https://git.abbauf.com/Magang-2025/Kasir into production
This commit is contained in:
commit
10e666a9ce
@ -20,22 +20,22 @@ class DatabaseSeeder extends Seeder
|
||||
public function run(): void
|
||||
{
|
||||
User::factory()->create([
|
||||
'nama' => 'Owner',
|
||||
'nama' => 'iwan',
|
||||
'role' => 'owner',
|
||||
'password' => bcrypt('123123'),
|
||||
]);
|
||||
User::factory()->create([
|
||||
'nama' => 'Kasir',
|
||||
'nama' => 'luis',
|
||||
'role' => 'kasir',
|
||||
'password' => bcrypt('123123'),
|
||||
]);
|
||||
|
||||
|
||||
User::factory(2)->create();
|
||||
Sales::factory(5)->create();
|
||||
|
||||
$kodeNampan = ['A', 'B'];
|
||||
foreach ($kodeNampan as $kode) {
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
for ($i=0; $i < 4; $i++) {
|
||||
Nampan::factory()->create([
|
||||
'nama' => $kode . ($i + 1) // A1, A2, ... B4
|
||||
]);
|
||||
@ -48,7 +48,7 @@ class DatabaseSeeder extends Seeder
|
||||
'nama' => $kategori
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Produk::factory(10)->create()->each(function ($produk) {
|
||||
// setiap produk punya 1-3 foto
|
||||
$jumlah_foto = rand(1, 3);
|
||||
@ -60,7 +60,7 @@ class DatabaseSeeder extends Seeder
|
||||
];
|
||||
}
|
||||
$produk->foto()->createMany($fotoData);
|
||||
|
||||
|
||||
$jumlah_item = rand(1, 20);
|
||||
Item::factory($jumlah_item)->create([
|
||||
'id_produk' => $produk->id,
|
||||
|
@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<mainLayout>
|
||||
<p style="font-family: 'IM FELL Great Primer', serif; font-style: italic;font-size: 25px;">BRANKAS</p>
|
||||
<searchbar v-model:search="searchQuery" />
|
||||
<BrankasList :search="searchQuery" />
|
||||
<div class="p-6">
|
||||
<p class="font-serif italic text-[25px] text-D">BRANKAS</p>
|
||||
<searchbar v-model:search="searchQuery" />
|
||||
<BrankasList :search="searchQuery" />
|
||||
</div>
|
||||
</mainLayout>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
@ -13,4 +15,4 @@ import mainLayout from '../layouts/mainLayout.vue'
|
||||
import searchbar from '../components/searchbar.vue';
|
||||
import BrankasList from '../components/BrankasList.vue';
|
||||
const searchQuery = ref("");
|
||||
</script>
|
||||
</script>
|
||||
|
@ -5,9 +5,9 @@
|
||||
<ConfirmDeleteModal :isOpen="confirmDeleteOpen" :item="kategoriToDelete" title="Hapus Kategori"
|
||||
message="Apakah Anda yakin ingin menghapus kategori ini?" @confirm="confirmDelete" @cancel="closeDeleteModal" />
|
||||
<div class="p-6 min-h-[75vh]" >
|
||||
<!-- Header Section -->
|
||||
<p class="font-serif italic text-[25px] text-D">KATEGORI</p>
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold text-gray-800">Kategori</h1>
|
||||
|
||||
<button @click="tambahKategori"
|
||||
class="px-4 py-2 bg-C text-black rounded-md hover:bg-B transition duration-200 flex items-center gap-2">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
|
@ -25,9 +25,9 @@
|
||||
/>
|
||||
|
||||
<div class="p-6 min-h-[75vh]">
|
||||
<!-- Header Section -->
|
||||
<p class="font-serif italic text-[25px] text-D">SALES</p>
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold text-D">Sales</h1>
|
||||
|
||||
<button
|
||||
@click="tambahSales"
|
||||
class="px-4 py-2 bg-C text-D rounded-md hover:bg-C/80 transition duration-200 flex items-center gap-2"
|
||||
|
@ -1,17 +1,9 @@
|
||||
<template>
|
||||
<mainLayout>
|
||||
<!-- Header -->
|
||||
<div class="mb-4">
|
||||
<div class="p-6">
|
||||
<!-- Judul -->
|
||||
<p
|
||||
style="
|
||||
font-family: 'IM FELL Great Primer', serif;
|
||||
font-style: italic;
|
||||
font-size: 25px;
|
||||
"
|
||||
>
|
||||
NAMPAN
|
||||
</p>
|
||||
<p class="font-serif italic text-[25px] text-D">NAMPAN</p>
|
||||
|
||||
<!-- Searchbar -->
|
||||
<div class="flex justify-end mt-2">
|
||||
|
@ -16,6 +16,7 @@ import Home from "../pages/Home.vue";
|
||||
import auth from "../middlewares/auth";
|
||||
import guest from "../middlewares/guest";
|
||||
import owner from "../middlewares/owner";
|
||||
import StrukOverlay from "../components/StrukOverlay.vue";
|
||||
|
||||
const middlewareMap = { auth, guest, owner };
|
||||
|
||||
@ -56,6 +57,11 @@ const routes = [
|
||||
component: Brankas,
|
||||
meta: { middleware: "auth" },
|
||||
},
|
||||
{
|
||||
path: "/home",
|
||||
name: "Home",
|
||||
meta: { middleware: "auth" },
|
||||
},
|
||||
{
|
||||
path: "/nampan",
|
||||
name: "Nampan",
|
||||
@ -114,7 +120,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (!mw) return next();
|
||||
|
||||
mw(to, from, (redirect) => {
|
||||
if (redirect) return next(redirect);
|
||||
if (redirect) return next(redirect);
|
||||
index++;
|
||||
if (index < middlewares.length) {
|
||||
run();
|
||||
|
Loading…
Reference in New Issue
Block a user