Compare commits
No commits in common. "1758b7837ed37acab832f1137680fdff630d23c5" and "8aeb7a3197d5d20ee5bc7816efb39345c83ed4a6" have entirely different histories.
1758b7837e
...
8aeb7a3197
@ -1,7 +1,7 @@
|
||||
import { z } from 'zod'
|
||||
|
||||
import { HttpServer } from '~/libs/http-server'
|
||||
import type { TLoginSchema } from '~/pages/staff-login'
|
||||
import type { TLoginSchema } from '~/pages/admin-login'
|
||||
|
||||
const loginResponseSchema = z.object({
|
||||
data: z.object({
|
||||
|
||||
@ -96,14 +96,14 @@ export const Combobox = <TFormValues extends Record<string, unknown>>(
|
||||
'bg-white transition duration-100 ease-in data-[leave]:data-[closed]:opacity-0',
|
||||
)}
|
||||
>
|
||||
{filteredOptions?.map((option) => (
|
||||
{filteredOptions?.map((person) => (
|
||||
<ComboboxOption
|
||||
key={option.id}
|
||||
value={option}
|
||||
key={person.id}
|
||||
value={person}
|
||||
className="group flex cursor-default items-center gap-2 rounded-lg px-3 py-1.5 select-none data-[focus]:bg-white/10"
|
||||
>
|
||||
<CheckIcon className="invisible size-4 group-data-[selected]:visible" />
|
||||
<div className="text-sm/6">{option.name}</div>
|
||||
<div className="text-sm/6">{person.name}</div>
|
||||
</ComboboxOption>
|
||||
))}
|
||||
</ComboboxOptions>
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { Field, Input, Label, Select } from '@headlessui/react'
|
||||
import DT from 'datatables.net-dt'
|
||||
import DataTable from 'datatables.net-react'
|
||||
import { Link } from 'react-router'
|
||||
|
||||
import { SearchIcon } from '~/components/icons/search'
|
||||
import { Button } from '~/components/ui/button'
|
||||
@ -58,13 +57,10 @@ export const ContentsPage = () => {
|
||||
return (
|
||||
<div className="relative">
|
||||
<TitleDashboard title="Konten" />
|
||||
<div className="mb-8 flex items-end justify-between">
|
||||
<div className="flex items-center gap-5 rounded-lg bg-gray-50 text-[#363636]">
|
||||
<div className="mb-8 flex items-center gap-5 rounded-lg bg-gray-50 text-[#363636]">
|
||||
<div className="w-[400px]">
|
||||
<Field>
|
||||
<Label className="mb-2 block text-sm font-medium">
|
||||
Cari User
|
||||
</Label>
|
||||
<Label className="mb-2 block text-sm font-medium">Cari User</Label>
|
||||
<div className="relative">
|
||||
<Input
|
||||
type="text"
|
||||
@ -89,15 +85,6 @@ export const ContentsPage = () => {
|
||||
</Field>
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
as={Link}
|
||||
to="/lg-admin/contents/create"
|
||||
className="text-md rounded-md"
|
||||
size="lg"
|
||||
>
|
||||
Create New
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<UiTable
|
||||
data={dataTable}
|
||||
|
||||
@ -52,11 +52,16 @@ export const SubscriptionsPage = () => {
|
||||
return (
|
||||
<div className="relative">
|
||||
<TitleDashboard title="Subscription" />
|
||||
<Button
|
||||
className="float-right mt-7 h-10 w-[160px] rounded-md"
|
||||
onClick={switchView}
|
||||
>
|
||||
{SubscribtionOpen ? 'Subscriptions' : 'Save'}
|
||||
</Button>
|
||||
|
||||
{SubscribtionOpen && (
|
||||
<>
|
||||
<div className="mb-8 flex items-end justify-between">
|
||||
<div className="flex items-center gap-5 rounded-lg bg-gray-50 text-[#363636]">
|
||||
<div className="mb-8 flex items-center gap-5 rounded-lg bg-gray-50 text-[#363636]">
|
||||
<div className="w-[400px]">
|
||||
<Field>
|
||||
<Label className="mb-2 block text-sm font-medium">
|
||||
@ -77,9 +82,7 @@ export const SubscriptionsPage = () => {
|
||||
|
||||
<div className="w-[235px]">
|
||||
<Field>
|
||||
<Label className="mb-2 block text-sm font-medium">
|
||||
Status
|
||||
</Label>
|
||||
<Label className="mb-2 block text-sm font-medium">Status</Label>
|
||||
<Select className="w-full rounded-lg bg-white p-2 shadow focus:ring-1 focus:ring-[#2E2F7C] focus:outline-none">
|
||||
<option>Pilih Status</option>
|
||||
<option>Aktif</option>
|
||||
@ -89,15 +92,6 @@ export const SubscriptionsPage = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
className="rounded-md"
|
||||
size="lg"
|
||||
onClick={switchView}
|
||||
>
|
||||
Subscription Settings
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<UiTable
|
||||
data={SUBSCRIPTIONS}
|
||||
columns={colTableSubscription}
|
||||
@ -114,8 +108,7 @@ export const SubscriptionsPage = () => {
|
||||
|
||||
{!SubscribtionOpen && (
|
||||
<>
|
||||
<div className="mb-8 flex items-end justify-between">
|
||||
<div className="flex items-end gap-5 rounded-lg bg-gray-50 text-[#363636]">
|
||||
<div className="mb-8 flex items-end gap-5 rounded-lg bg-gray-50 text-[#363636]">
|
||||
<div className="w-[300px]">
|
||||
<Field>
|
||||
<Label className="mb-2 block text-sm font-medium">
|
||||
@ -158,14 +151,6 @@ export const SubscriptionsPage = () => {
|
||||
</Field>
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
className="rounded-md"
|
||||
size="lg"
|
||||
onClick={switchView}
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<UiTable
|
||||
data={SUBSETTINGS}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { AdminLoginPage } from '~/pages/staff-login'
|
||||
import { AdminLoginPage } from '~/pages/admin-login'
|
||||
|
||||
const AuthLayout = () => <AdminLoginPage />
|
||||
export default AuthLayout
|
||||
|
||||
@ -5,7 +5,7 @@ import { XiorError } from 'xior'
|
||||
|
||||
import { getStaff } from '~/apis/admin/get-staff'
|
||||
import { staffLoginRequest } from '~/apis/admin/login-staff'
|
||||
import { loginSchema, type TLoginSchema } from '~/pages/staff-login'
|
||||
import { loginSchema, type TLoginSchema } from '~/pages/admin-login'
|
||||
import { generateStaffTokenCookie } from '~/utils/token'
|
||||
|
||||
import type { Route } from './+types/actions.login'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user