Compare commits
No commits in common. "380ede5ca8b32ac5fa3727aaaa0ecaeaa14b3acc" and "f5d0441cd7456927421cf7575db0c1b3ed57a5a8" have entirely different histories.
380ede5ca8
...
f5d0441cd7
@ -97,8 +97,7 @@
|
|||||||
class="w-full h-full object-cover"
|
class="w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
@click.prevent="removeImage(image.id)"
|
@click="removeImage(image.id)"
|
||||||
type="button"
|
|
||||||
:disabled="uploadLoading"
|
:disabled="uploadLoading"
|
||||||
class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full w-6 h-6 flex items-center justify-center text-sm font-bold shadow-lg hover:bg-red-600 transition-colors disabled:bg-gray-400"
|
class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full w-6 h-6 flex items-center justify-center text-sm font-bold shadow-lg hover:bg-red-600 transition-colors disabled:bg-gray-400"
|
||||||
>
|
>
|
||||||
@ -346,7 +345,7 @@ const uploadFiles = async (files) => {
|
|||||||
|
|
||||||
const removeImage = async (id) => {
|
const removeImage = async (id) => {
|
||||||
try {
|
try {
|
||||||
await axios.delete(`http://127.0.0.1:8000/api/foto/hapus/${id}`, {
|
await axios.delete(`/api/foto/hapus/${id}`, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<mainLayout>
|
<mainLayout>
|
||||||
<!-- Modal Buat Item - Sekarang menggunakan komponen terpisah -->
|
<!-- Modal Buat Item - Sekarang menggunakan komponen terpisah -->
|
||||||
<CreateItemModal
|
<CreateItemModal
|
||||||
:isOpen="openItemModal"
|
:isOpen="openItemModal"
|
||||||
:product="createdProduct"
|
:product="createdProduct"
|
||||||
@close="closeItemModal"
|
@close="closeItemModal"
|
||||||
@ -326,15 +326,12 @@ const submitForm = async (addItem) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await axios.post('/api/produk', {
|
const response = await axios.post('/api/produk', {
|
||||||
...form.value,
|
...form.value,
|
||||||
id_user: userId.value,
|
id_user: userId.value,
|
||||||
},
|
headers: {
|
||||||
{
|
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
||||||
headers: {
|
},
|
||||||
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
});
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const createdProductData = response.data.data;
|
const createdProductData = response.data.data;
|
||||||
|
|
||||||
@ -383,7 +380,7 @@ const resetForm = async () => {
|
|||||||
harga_per_gram: 0,
|
harga_per_gram: 0,
|
||||||
harga_jual: 0,
|
harga_jual: 0,
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
await axios.delete(`/api/foto/reset/${userId.value}`, {
|
await axios.delete(`/api/foto/reset/${userId.value}`, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user