Merge branch 'production' of https://git.abbauf.com/Magang-2025/Kasir into production
This commit is contained in:
commit
d58368389e
@ -26,7 +26,7 @@ class UserController extends Controller
|
|||||||
|
|
||||||
User::create([
|
User::create([
|
||||||
'nama' => $request->nama,
|
'nama' => $request->nama,
|
||||||
'password' => bcrypt($request->password),
|
'password' => $request->password,
|
||||||
'role' => $request->role,
|
'role' => $request->role,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class UserController extends Controller
|
|||||||
$request->validate([
|
$request->validate([
|
||||||
'nama' => 'required|nama|unique:users,nama,' . $id,
|
'nama' => 'required|nama|unique:users,nama,' . $id,
|
||||||
'password' => 'required|min:6',
|
'password' => 'required|min:6',
|
||||||
'role' => 'required|in:owner, kasir',
|
'role' => 'required|in:owner,kasir',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user->update([
|
$user->update([
|
||||||
|
@ -1,103 +1,93 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50">
|
<div
|
||||||
<div class="bg-white rounded-lg p-6 w-96 shadow-lg">
|
class="fixed inset-0 flex items-center justify-center bg-black/65 z-50"
|
||||||
<h2 class="text-lg font-bold mb-4">Tambah Akun</h2>
|
>
|
||||||
|
<div class="bg-white rounded-lg p-6 w-96 shadow-lg">
|
||||||
|
<h2 class="text-lg font-bold mb-4">Tambah Akun</h2>
|
||||||
|
|
||||||
<form @submit.prevent="createAkun">
|
<form @submit.prevent="createAkun" class="space-y-3">
|
||||||
<!-- Nama -->
|
<!-- Nama -->
|
||||||
<div class="mb-3">
|
<label for="nama">Nama</label>
|
||||||
<label class="block font-medium mb-1">Nama</label>
|
<InputField
|
||||||
<input
|
v-model="form.nama"
|
||||||
v-model.trim="form.nama"
|
id="nama"
|
||||||
type="text"
|
type="text"
|
||||||
class="border rounded w-full p-2 focus:ring focus:ring-blue-300"
|
:required="true"
|
||||||
required
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Password -->
|
<div>
|
||||||
<div class="mb-3">
|
<label for="password">Password</label>
|
||||||
<label class="block font-medium mb-1">Password</label>
|
<InputField
|
||||||
<input
|
v-model="form.password"
|
||||||
v-model="form.password"
|
id="password"
|
||||||
type="password"
|
type="password"
|
||||||
class="border rounded w-full p-2 focus:ring focus:ring-blue-300"
|
:required="true"
|
||||||
required
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Peran -->
|
<label for="peran">Peran</label>
|
||||||
<div class="mb-3">
|
<InputSelect
|
||||||
<label class="block font-medium mb-1">Peran</label>
|
v-model="form.role"
|
||||||
<select
|
:options="[
|
||||||
v-model="form.role"
|
{ value: 'owner', label: 'Owner' },
|
||||||
class="border rounded w-full p-2 focus:ring focus:ring-blue-300"
|
{ value: 'kasir', label: 'Kasir' },
|
||||||
required
|
]"
|
||||||
>
|
placeholder="-- Pilih Peran --"
|
||||||
<option disabled value="">-- Pilih Peran --</option>
|
/>
|
||||||
<option value="owner">Owner</option>
|
|
||||||
<option value="kasir">Kasir</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Tombol -->
|
<!-- Tombol -->
|
||||||
<div class="flex justify-end gap-2 mt-4">
|
<div class="flex justify-end gap-2 mt-4">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="$emit('close')"
|
@click="$emit('close')"
|
||||||
class="bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded"
|
class="bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded"
|
||||||
>
|
>
|
||||||
Batal
|
Batal
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded"
|
class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded"
|
||||||
>
|
>
|
||||||
Simpan
|
Simpan
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- Error -->
|
<!-- Error -->
|
||||||
<p v-if="errorMessage" class="text-red-500 text-sm mt-3">
|
<p v-if="errorMessage" class="text-red-500 text-sm mt-3">
|
||||||
{{ errorMessage }}
|
{{ errorMessage }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import InputField from "@/components/InputField.vue";
|
||||||
|
import InputSelect from "@/components/InputSelect.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CreateAkun",
|
name: "CreateAkun",
|
||||||
|
components: { InputField, InputSelect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: { nama: "", password: "", role: "" },
|
||||||
nama: "",
|
errorMessage: "",
|
||||||
password: "",
|
};
|
||||||
role: "",
|
|
||||||
},
|
|
||||||
errorMessage: "",
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async createAkun() {
|
async createAkun() {
|
||||||
try {
|
try {
|
||||||
await axios.post("api/user", this.form);
|
await axios.post("api/user", this.form);
|
||||||
|
this.form = { nama: "", password: "", role: "" };
|
||||||
// reset form
|
this.$emit("refresh");
|
||||||
this.form = { nama: "", password: "", role: "" };
|
this.$emit("close");
|
||||||
|
} catch (err) {
|
||||||
// tutup modal dan refresh data
|
this.errorMessage =
|
||||||
this.$emit("refresh");
|
err.response?.data?.message || "Gagal menambah akun.";
|
||||||
this.$emit("close");
|
console.error("Gagal tambah akun:", err);
|
||||||
} catch (err) {
|
}
|
||||||
this.errorMessage =
|
},
|
||||||
err.response?.data?.message || "Gagal menambah akun.";
|
|
||||||
console.error("Gagal tambah akun:", err);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -11,18 +11,17 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Form -->
|
<!-- Form -->
|
||||||
<div class="mb-4">
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700">Nama Kategori</label>
|
<label class="block text-sm font-medium text-gray-700">Nama Kategori</label>
|
||||||
<input
|
<InputField
|
||||||
v-model="form.nama"
|
v-model="form.nama"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Masukkan nama kategori"
|
placeholder="Masukkan nama kategori"
|
||||||
class="mt-1 block w-full border border-gray-300 rounded-md px-3 py-2 focus:ring focus:ring-C"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Buttons -->
|
<!-- Buttons -->
|
||||||
<div class="flex justify-end gap-2">
|
<div class="flex justify-end gap-2 mt-4">
|
||||||
<button
|
<button
|
||||||
@click="emit('close')"
|
@click="emit('close')"
|
||||||
class="px-4 py-2 bg-gray-200 text-gray-700 rounded hover:bg-gray-300"
|
class="px-4 py-2 bg-gray-200 text-gray-700 rounded hover:bg-gray-300"
|
||||||
@ -44,6 +43,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import InputField from './InputField.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isOpen: Boolean,
|
isOpen: Boolean,
|
||||||
|
@ -7,24 +7,41 @@
|
|||||||
<h2 class="text-xl font-bold mb-4">Tambah Sales</h2>
|
<h2 class="text-xl font-bold mb-4">Tambah Sales</h2>
|
||||||
|
|
||||||
<form @submit.prevent="handleSubmit" class="space-y-4">
|
<form @submit.prevent="handleSubmit" class="space-y-4">
|
||||||
|
<!-- Nama -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700">Nama Sales</label>
|
<label class="block text-sm font-medium text-gray-700">Nama Sales</label>
|
||||||
<input v-model="form.nama" type="text" class="w-full px-3 py-2 border rounded-md focus:ring-2 focus:ring-[#c6a77d] focus:outline-none" required />
|
<InputField v-model="form.nama" type="text" placeholder="Masukkan nama sales" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700">No HP</label>
|
<label class="block text-sm font-medium text-gray-700">No HP</label>
|
||||||
<input v-model="form.no_hp" type="text" class="w-full px-3 py-2 border rounded-md focus:ring-2 focus:ring-[#c6a77d] focus:outline-none" required />
|
<InputField v-model="form.no_hp" type="text" placeholder="Masukkan nomor HP" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700">Alamat</label>
|
<label class="block text-sm font-medium text-gray-700">Alamat</label>
|
||||||
<textarea v-model="form.alamat" class="w-full px-3 py-2 border rounded-md focus:ring-2 focus:ring-[#c6a77d] focus:outline-none" required></textarea>
|
<textarea
|
||||||
|
v-model="form.alamat"
|
||||||
|
placeholder="Masukkan alamat"
|
||||||
|
class="mt-1 block w-full rounded-md shadow-sm sm:text-sm bg-A text-D border-B focus:border-C focus:ring focus:ring-D focus:ring-opacity-50 p-2"
|
||||||
|
required
|
||||||
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end gap-2 mt-6">
|
<div class="flex justify-end gap-2 mt-6">
|
||||||
<button type="button" @click="$emit('close')" class="px-4 py-2 bg-gray-300 rounded hover:bg-gray-400">Batal</button>
|
<button
|
||||||
<button type="submit" class="px-4 py-2 bg-C text-D rounded hover:bg-C/80">Simpan</button>
|
type="button"
|
||||||
|
@click="$emit('close')"
|
||||||
|
class="px-4 py-2 bg-gray-300 rounded hover:bg-gray-400"
|
||||||
|
>
|
||||||
|
Batal
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="px-4 py-2 bg-C text-D rounded hover:bg-C/80"
|
||||||
|
>
|
||||||
|
Simpan
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -32,27 +49,34 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue"
|
||||||
import axios from "axios";
|
import axios from "axios"
|
||||||
|
import InputField from "./InputField.vue"
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isOpen: Boolean,
|
isOpen: Boolean,
|
||||||
});
|
})
|
||||||
|
|
||||||
const emit = defineEmits(["close"]);
|
const emit = defineEmits(["close", "saved"])
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
nama: "",
|
nama: "",
|
||||||
no_hp: "",
|
no_hp: "",
|
||||||
alamat: "",
|
alamat: "",
|
||||||
});
|
})
|
||||||
|
|
||||||
|
const resetForm = () => {
|
||||||
|
form.value = { nama: "", no_hp: "", alamat: "" }
|
||||||
|
}
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
try {
|
try {
|
||||||
await axios.post("/api/sales", form.value);
|
await axios.post("/api/sales", form.value)
|
||||||
emit("close");
|
resetForm()
|
||||||
|
emit("saved")
|
||||||
|
emit("close")
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error creating sales:", error);
|
console.error("Error creating sales:", error)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,38 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50">
|
<div class="fixed inset-0 flex items-center justify-center bg-black/65">
|
||||||
<div class="bg-white rounded-lg p-6 w-96">
|
<div class="bg-white rounded-lg p-6 w-96">
|
||||||
<h2 class="text-lg font-bold mb-4">Edit Akun</h2>
|
<h2 class="text-lg font-bold mb-4">Edit Akun</h2>
|
||||||
|
|
||||||
<form @submit.prevent="updateAkun">
|
<form @submit.prevent="updateAkun" class="space-y-3">
|
||||||
<!-- Nama -->
|
<label for="nama">Nama</label>
|
||||||
<div class="mb-3">
|
<InputField
|
||||||
<label class="block font-medium">Nama</label>
|
v-model="form.nama"
|
||||||
<input v-model="form.nama" type="text" class="border rounded w-full p-2" required />
|
label="nama"
|
||||||
</div>
|
type="text"
|
||||||
|
:required="true"
|
||||||
|
class="mb-3"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- Password -->
|
<div>
|
||||||
<div class="mb-3">
|
<label for="password">Password</label>
|
||||||
<label class="block font-medium">Password</label>
|
<InputField
|
||||||
<input v-model="form.password" type="password" class="border rounded w-full p-2" />
|
v-model="form.password"
|
||||||
<small class="text-gray-500">Kosongkan jika tidak ingin mengubah password</small>
|
label="password"
|
||||||
</div>
|
type="password"
|
||||||
|
:required="false"
|
||||||
|
class="mb-1"
|
||||||
|
/>
|
||||||
|
<p class="text-sm">Kosongkan jika tidak ingin ubah password</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Peran -->
|
<label for="peran">Peran</label>
|
||||||
<div class="mb-3">
|
<InputSelect
|
||||||
<label class="block font-medium">Peran</label>
|
v-model="form.role"
|
||||||
<select v-model="form.role" class="border rounded w-full p-2" required>
|
label="peran"
|
||||||
<option value="">-- Pilih Peran --</option>
|
:options="[
|
||||||
<option value="owner">Owner</option>
|
{ value: 'owner', label: 'Owner' },
|
||||||
<option value="kasir">Kasir</option>
|
{ value: 'kasir', label: 'Kasir' }
|
||||||
</select>
|
]"
|
||||||
</div>
|
:required="true"
|
||||||
|
class="mb-3"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- Tombol -->
|
|
||||||
<div class="flex justify-end gap-2 mt-4">
|
<div class="flex justify-end gap-2 mt-4">
|
||||||
<button type="button" @click="$emit('close')" class="bg-gray-300 px-4 py-2 rounded">
|
<button
|
||||||
|
type="button"
|
||||||
|
@click="$emit('close')"
|
||||||
|
class="bg-gray-300 px-4 py-2 rounded"
|
||||||
|
>
|
||||||
Batal
|
Batal
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" class="bg-blue-500 text-white px-4 py-2 rounded">
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="bg-blue-500 text-white px-4 py-2 rounded"
|
||||||
|
>
|
||||||
Ubah
|
Ubah
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -43,6 +59,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import InputField from "@/components/InputField.vue";
|
||||||
|
import InputSelect from "@/components/InputSelect.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@ -51,12 +69,14 @@
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
components: { InputField, InputSelect },
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
nama: this.akun.nama || "",
|
nama: this.akun.nama || "",
|
||||||
password: "",
|
password: "",
|
||||||
role: this.akun.role || "", // gunakan "role" bukan "peran"
|
role: this.akun.role || "",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -87,7 +107,6 @@
|
|||||||
this.$emit("close");
|
this.$emit("close");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Gagal update akun:", err.response?.data || err.message);
|
console.error("Gagal update akun:", err.response?.data || err.message);
|
||||||
alert("Update akun gagal. Silakan cek kembali inputan.");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -11,14 +11,13 @@
|
|||||||
<h2 class="text-xl font-bold text-center text-D mb-4">Edit Kategori</h2>
|
<h2 class="text-xl font-bold text-center text-D mb-4">Edit Kategori</h2>
|
||||||
|
|
||||||
<!-- Input Nama Kategori -->
|
<!-- Input Nama Kategori -->
|
||||||
<div class="mb-4">
|
<div>
|
||||||
<label for="editKategori" class="block text-sm font-medium text-D mb-1">Nama Kategori</label>
|
<label for="editKategori" class="block text-sm font-medium text-D mb-1">Nama Kategori</label>
|
||||||
<input
|
<InputField
|
||||||
v-model="editNamaKategori"
|
v-model="editNamaKategori"
|
||||||
type="text"
|
type="text"
|
||||||
id="editKategori"
|
id="editKategori"
|
||||||
placeholder="Masukkan nama kategori"
|
placeholder="Masukkan nama kategori"
|
||||||
class="w-full p-2 border rounded-md bg-Focus outline-none"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -37,6 +36,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
|
import InputField from "./InputField.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
kategori: { type: Object, required: true },
|
kategori: { type: Object, required: true },
|
||||||
|
@ -9,17 +9,21 @@
|
|||||||
<form @submit.prevent="handleSubmit" class="space-y-4">
|
<form @submit.prevent="handleSubmit" class="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700">Nama Sales</label>
|
<label class="block text-sm font-medium text-gray-700">Nama Sales</label>
|
||||||
<input v-model="form.nama" type="text" class="w-full px-3 py-2 border rounded-md focus:ring-2 focus:ring-[#c6a77d] focus:outline-none" required />
|
<InputField v-model="form.nama" type="text" class="w-full px-3 py-2 border rounded-md focus:ring-2 focus:ring-[#c6a77d] focus:outline-none" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700">No HP</label>
|
<label class="block text-sm font-medium text-gray-700">No HP</label>
|
||||||
<input v-model="form.no_hp" type="text" class="w-full px-3 py-2 border rounded-md focus:ring-2 focus:ring-[#c6a77d] focus:outline-none" required />
|
<InputField v-model="form.no_hp" type="text" class="w-full px-3 py-2 border rounded-md focus:ring-2 focus:ring-[#c6a77d] focus:outline-none" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700">Alamat</label>
|
<label class="block text-sm font-medium text-gray-700">Alamat</label>
|
||||||
<textarea v-model="form.alamat" class="w-full px-3 py-2 border rounded-md focus:ring-2 focus:ring-[#c6a77d] focus:outline-none" required></textarea>
|
<textarea
|
||||||
|
v-model="form.alamat"
|
||||||
|
class="mt-1 block w-full rounded-md shadow-sm sm:text-sm bg-A text-D border-B focus:border-C focus:ring focus:ring-D focus:ring-opacity-50 p-2"
|
||||||
|
required
|
||||||
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end gap-2 mt-6">
|
<div class="flex justify-end gap-2 mt-6">
|
||||||
@ -34,6 +38,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import InputField from "./InputField.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isOpen: Boolean,
|
isOpen: Boolean,
|
||||||
|
@ -51,14 +51,14 @@
|
|||||||
|
|
||||||
<!-- Table Section -->
|
<!-- Table Section -->
|
||||||
<div
|
<div
|
||||||
class="bg-white rounded-lg shadow-md border border-gray-200 overflow-hidden"
|
class="bg-white rounded-lg shadow-md border border-C overflow-hidden"
|
||||||
>
|
>
|
||||||
<table class="w-full">
|
<table class="w-full">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-C text-white">
|
<tr class="bg-C text-white">
|
||||||
<th class="px-6 py-4 text-center text-D border-r border-[#b09065]">No</th>
|
<th class="px-6 py-4 text-center text-D border-r border-C">No</th>
|
||||||
<th class="px-6 py-4 text-center text-D border-r border-[#b09065]">Nama</th>
|
<th class="px-6 py-4 text-center text-D border-r border-C">Nama</th>
|
||||||
<th class="px-6 py-4 text-center text-D border-r border-[#b09065]">Role</th>
|
<th class="px-6 py-4 text-center text-D border-r border-C">Peran</th>
|
||||||
<th class="px-6 py-4 text-center text-D">Aksi</th>
|
<th class="px-6 py-4 text-center text-D">Aksi</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -66,16 +66,16 @@
|
|||||||
<tr
|
<tr
|
||||||
v-for="(item, index) in akun"
|
v-for="(item, index) in akun"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
class="border-b border-gray-200 hover:bg-gray-50 transition duration-150"
|
class="border-b border-C hover:bg-gray-50 transition duration-150"
|
||||||
:class="{ 'bg-gray-50': index % 2 === 1 }"
|
:class="{ 'bg-gray-50': index % 2 === 1 }"
|
||||||
>
|
>
|
||||||
<td class="px-6 py-4 border-r border-gray-200 text-center font-medium text-gray-900">
|
<td class="px-6 py-4 border-r border-C text-center font-medium text-gray-900">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 border-r border-gray-200 text-D">
|
<td class="px-6 py-4 border-r border-C text-D">
|
||||||
{{ item.nama }}
|
{{ item.nama }}
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 border-r border-gray-200 text-gray-800">
|
<td class="px-6 py-4 border-r border-C text-gray-800">
|
||||||
{{ item.role }}
|
{{ item.role }}
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 text-center">
|
<td class="px-6 py-4 text-center">
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Table Section -->
|
<!-- Table Section -->
|
||||||
<div class="bg-white rounded-lg shadow-md border border-gray-200 overflow-hidden">
|
<div class="bg-white rounded-lg shadow-md border border-C overflow-hidden">
|
||||||
<table class="w-full">
|
<table class="w-full">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-C text-black">
|
<tr class="bg-C text-black">
|
||||||
@ -35,12 +35,12 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(item, index) in kategori" :key="item.id"
|
<tr v-for="(item, index) in kategori" :key="item.id"
|
||||||
class="border-b border-gray-200 hover:bg-A transition duration-150"
|
class="border-b border-C hover:bg-A transition duration-150"
|
||||||
:class="{ 'bg-gray-50': index % 2 === 1 }">
|
:class="{ 'bg-gray-50': index % 2 === 1 }">
|
||||||
<td class="px-6 py-4 border-r border-gray-200 font-medium text-center text-gray-900">
|
<td class="px-6 py-4 border-r border-C font-medium text-center text-gray-900">
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 border-r border-gray-200 text-center text-gray-800">
|
<td class="px-6 py-4 border-r border-C text-center text-gray-800">
|
||||||
{{ item.nama }}
|
{{ item.nama }}
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 text-center">
|
<td class="px-6 py-4 text-center">
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
<!-- Table Section -->
|
<!-- Table Section -->
|
||||||
<div
|
<div
|
||||||
class="bg-white rounded-lg shadow-md border border-gray-200 overflow-hidden"
|
class="bg-white rounded-lg shadow-md border border-C overflow-hidden"
|
||||||
>
|
>
|
||||||
<table class="w-full">
|
<table class="w-full">
|
||||||
<thead class="">
|
<thead class="">
|
||||||
@ -85,26 +85,26 @@
|
|||||||
<tr
|
<tr
|
||||||
v-for="(item, index) in sales"
|
v-for="(item, index) in sales"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
class="border-b border-gray-200 hover:bg-gray-50 transition duration-150"
|
class="border-b border-C hover:bg-gray-50 transition duration-150"
|
||||||
:class="{ 'bg-gray-50': index % 2 === 1 }"
|
:class="{ 'bg-gray-50': index % 2 === 1 }"
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
class="px-6 py-4 border-r border-gray-200 text-center font-medium text-gray-900"
|
class="px-6 py-4 border-r border-C text-center font-medium text-gray-900"
|
||||||
>
|
>
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
class="px-6 py-4 border-r border-gray-200 text-D"
|
class="px-6 py-4 border-r border-C text-D"
|
||||||
>
|
>
|
||||||
{{ item.nama }}
|
{{ item.nama }}
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
class="px-6 py-4 border-r border-gray-200 text-gray-800"
|
class="px-6 py-4 border-r border-C text-gray-800"
|
||||||
>
|
>
|
||||||
{{ item.no_hp }}
|
{{ item.no_hp }}
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
class="px-6 py-4 border-r border-gray-200 text-gray-800"
|
class="px-6 py-4 border-r border-C text-gray-800"
|
||||||
>
|
>
|
||||||
{{ item.alamat }}
|
{{ item.alamat }}
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user