Fix All Text Input User & Admin, fix deskripsi detail break word
This commit is contained in:
@@ -10,8 +10,7 @@ import {
|
||||
Stack,
|
||||
TextInput,
|
||||
Title,
|
||||
Tooltip,
|
||||
Text,
|
||||
Tooltip
|
||||
} from '@mantine/core';
|
||||
import { IconArrowBack } from '@tabler/icons-react';
|
||||
import { useParams, useRouter } from 'next/navigation';
|
||||
@@ -95,11 +94,7 @@ function EditKategoriPengumuman() {
|
||||
>
|
||||
<Stack gap="md">
|
||||
<TextInput
|
||||
label={
|
||||
<Text fz="sm" fw="bold">
|
||||
Nama Kategori Pengumuman
|
||||
</Text>
|
||||
}
|
||||
label="Nama Kategori Pengumuman"
|
||||
placeholder="Masukkan nama kategori Pengumuman"
|
||||
value={formData.name}
|
||||
onChange={(e) =>
|
||||
|
||||
@@ -7,10 +7,9 @@ import {
|
||||
Group,
|
||||
Paper,
|
||||
Stack,
|
||||
Text,
|
||||
TextInput,
|
||||
Title,
|
||||
Tooltip,
|
||||
Tooltip
|
||||
} from '@mantine/core';
|
||||
import { IconArrowBack } from '@tabler/icons-react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
@@ -62,9 +61,9 @@ function CreateKategoriPengumuman() {
|
||||
>
|
||||
<Stack gap="md">
|
||||
<TextInput
|
||||
label={<Text fw="bold" fz="sm">Nama Kategori Pengumuman</Text>}
|
||||
label="Nama Kategori Pengumuman"
|
||||
placeholder="Masukkan nama kategori pengumuman"
|
||||
value={createState.create.form.name || ''}
|
||||
defaultValue={createState.create.form.name || ''}
|
||||
onChange={(e) => (createState.create.form.name = e.target.value)}
|
||||
required
|
||||
/>
|
||||
|
||||
@@ -108,7 +108,7 @@ function EditPengumuman() {
|
||||
<TextInput
|
||||
label="Judul Pengumuman"
|
||||
placeholder="Masukkan judul"
|
||||
value={formData.judul}
|
||||
defaultValue={formData.judul}
|
||||
onChange={(e) => setFormData({ ...formData, judul: e.target.value })}
|
||||
required
|
||||
/>
|
||||
@@ -116,7 +116,7 @@ function EditPengumuman() {
|
||||
<TextInput
|
||||
label="Deskripsi Singkat"
|
||||
placeholder="Masukkan deskripsi"
|
||||
value={formData.deskripsi}
|
||||
defaultValue={formData.deskripsi}
|
||||
onChange={(e) =>
|
||||
setFormData({ ...formData, deskripsi: e.target.value })
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ export default function DetailPengumuman() {
|
||||
<Text fz="lg" fw="bold">
|
||||
Deskripsi
|
||||
</Text>
|
||||
<Text fz="md" c="dimmed">
|
||||
<Text fz="md" c="dimmed" style={{ wordBreak: "break-word", whiteSpace: "normal" }}>
|
||||
{data?.deskripsi || '-'}
|
||||
</Text>
|
||||
</Box>
|
||||
@@ -112,6 +112,7 @@ export default function DetailPengumuman() {
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: data?.content || '-',
|
||||
}}
|
||||
style={{ wordBreak: "break-word", whiteSpace: "normal" }}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
|
||||
@@ -68,16 +68,16 @@ function CreatePengumuman() {
|
||||
<Stack gap="md">
|
||||
{/* Judul */}
|
||||
<TextInput
|
||||
value={pengumumanState.pengumuman.create.form.judul}
|
||||
defaultValue={pengumumanState.pengumuman.create.form.judul}
|
||||
onChange={(val) => (pengumumanState.pengumuman.create.form.judul = val.target.value)}
|
||||
label={<Text fz="sm" fw="bold">Judul</Text>}
|
||||
label="Judul"
|
||||
placeholder="Masukkan judul pengumuman"
|
||||
required
|
||||
/>
|
||||
|
||||
{/* Kategori */}
|
||||
<Select
|
||||
label={<Text fz="sm" fw="bold">Kategori</Text>}
|
||||
label="Kategori"
|
||||
placeholder="Pilih kategori"
|
||||
value={pengumumanState.pengumuman.create.form.categoryPengumumanId || ""}
|
||||
onChange={(val) => {
|
||||
@@ -93,9 +93,9 @@ function CreatePengumuman() {
|
||||
|
||||
{/* Deskripsi Singkat */}
|
||||
<TextInput
|
||||
value={pengumumanState.pengumuman.create.form.deskripsi}
|
||||
defaultValue={pengumumanState.pengumuman.create.form.deskripsi}
|
||||
onChange={(val) => (pengumumanState.pengumuman.create.form.deskripsi = val.target.value)}
|
||||
label={<Text fz="sm" fw="bold">Deskripsi Singkat</Text>}
|
||||
label="Deskripsi Singkat"
|
||||
placeholder="Masukkan deskripsi singkat"
|
||||
required
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user