fix:enable button create article, category
This commit is contained in:
parent
b6d4b2a59a
commit
2112cfabd9
|
|
@ -11,12 +11,10 @@ export default function BasicPage() {
|
|||
<div className="overflow-x-hidden overflow-y-scroll">
|
||||
<div className="px-2 md:px-4 md:py-4 w-full">
|
||||
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
|
||||
<Link href="#">
|
||||
{/* <Link href="/admin/article/create"> */}
|
||||
<Link href="/admin/article/create">
|
||||
<Button
|
||||
size="md"
|
||||
className="bg-[#F07C00] text-white w-full lg:w-fit"
|
||||
isDisabled
|
||||
>
|
||||
Tambah Artikel
|
||||
<AddIcon />
|
||||
|
|
|
|||
|
|
@ -135,8 +135,12 @@ export default function MasterCategoryTable() {
|
|||
const response = await createCategory(formData);
|
||||
console.log(response);
|
||||
if (response?.error) {
|
||||
console.log()
|
||||
if (response.message?.messages[0]?.includes("article_categories_title_unique")) {
|
||||
console.log();
|
||||
if (
|
||||
response.message?.messages[0]?.includes(
|
||||
"article_categories_title_unique"
|
||||
)
|
||||
) {
|
||||
error("Judul sudah tersedia, silahkan buat dengan judul berbeda");
|
||||
} else {
|
||||
error(response.message?.messages);
|
||||
|
|
@ -179,7 +183,6 @@ export default function MasterCategoryTable() {
|
|||
size="md"
|
||||
className="bg-[#F07C00] text-white w-full lg:w-fit"
|
||||
onPress={onOpen}
|
||||
isDisabled
|
||||
>
|
||||
Tambah Kategori
|
||||
<AddIcon />
|
||||
|
|
@ -262,7 +265,9 @@ export default function MasterCategoryTable() {
|
|||
)}
|
||||
</div>
|
||||
<div className="flex flex-col gap-1">
|
||||
<p className="text-sm mt-3">Parent Kategori <span>(Optional)</span></p>
|
||||
<p className="text-sm mt-3">
|
||||
Parent Kategori <span>(Optional)</span>
|
||||
</p>
|
||||
|
||||
<ReactSelect
|
||||
className="basic-single text-black z-50"
|
||||
|
|
|
|||
|
|
@ -351,8 +351,7 @@ export default function DashboardContainer() {
|
|||
<div className="flex flex-col w-full lg:w-[45%] gap-6 shadow-md bg-white dark:bg-[#18181b] rounded-lg p-8 text-sm">
|
||||
<div className="flex justify-between font-semibold">
|
||||
<p>Recent Article</p>
|
||||
<Link href="#">
|
||||
{/* <Link href="/admin/article/create"> */}
|
||||
<Link href="/admin/article/create">
|
||||
<Button color="primary" variant="bordered">
|
||||
Buat Article
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ export default function ArticleTable() {
|
|||
<DotsYIcon className="text-default-300" />
|
||||
</Button>
|
||||
</DropdownTrigger>
|
||||
<DropdownMenu disabledKeys={["edit", "delete"]}>
|
||||
<DropdownMenu>
|
||||
<DropdownItem
|
||||
key="copy-article"
|
||||
onPress={() => copyUrlArticle(article.id, article.slug)}
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ export default function CategoriesTable(props: { triggerRefresh: boolean }) {
|
|||
<DotsYIcon className="text-default-300" />
|
||||
</Button>
|
||||
</DropdownTrigger>
|
||||
<DropdownMenu disabledKeys={["Edit", "Delete"]}>
|
||||
<DropdownMenu>
|
||||
<DropdownItem
|
||||
key="Detail"
|
||||
onPress={() => openModal(category.id, true)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue