Fix All Text Input User & Admin, fix deskripsi detail break word
This commit is contained in:
@@ -97,7 +97,7 @@ function EditDaftarInformasiPublik() {
|
||||
<TextInput
|
||||
label="Jenis Informasi"
|
||||
placeholder="Masukkan jenis informasi"
|
||||
value={formData.jenisInformasi}
|
||||
defaultValue={formData.jenisInformasi}
|
||||
onChange={(val) => {
|
||||
setFormData({
|
||||
...formData,
|
||||
@@ -124,7 +124,7 @@ function EditDaftarInformasiPublik() {
|
||||
type="date"
|
||||
label="Tanggal Publikasi"
|
||||
placeholder="Pilih tanggal publikasi"
|
||||
value={formatDateForInput(formData.tanggal)}
|
||||
defaultValue={formatDateForInput(formData.tanggal)}
|
||||
onChange={(val) => {
|
||||
setFormData({
|
||||
...formData,
|
||||
|
||||
@@ -88,6 +88,7 @@ function DetailDaftarInformasiPublik() {
|
||||
c="dimmed"
|
||||
dangerouslySetInnerHTML={{ __html: data.deskripsi || '-' }}
|
||||
className="prose max-w-none"
|
||||
style={{ wordBreak: "break-word", whiteSpace: "normal" }}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ export default function CreateDaftarInformasi() {
|
||||
</Text>
|
||||
<TextInput
|
||||
placeholder="Contoh: Profil Desa, Laporan Keuangan, dll"
|
||||
value={daftarInformasi.create.form.jenisInformasi}
|
||||
defaultValue={daftarInformasi.create.form.jenisInformasi}
|
||||
onChange={(e) => {
|
||||
daftarInformasi.create.form.jenisInformasi = e.target.value;
|
||||
}}
|
||||
@@ -96,7 +96,7 @@ export default function CreateDaftarInformasi() {
|
||||
</Text>
|
||||
<TextInput
|
||||
type="date"
|
||||
value={daftarInformasi.create.form.tanggal}
|
||||
defaultValue={daftarInformasi.create.form.tanggal}
|
||||
onChange={(e) => {
|
||||
daftarInformasi.create.form.tanggal = e.target.value;
|
||||
}}
|
||||
|
||||
@@ -69,6 +69,7 @@ function Page() {
|
||||
fw="bold"
|
||||
c={colors['blue-button']}
|
||||
dangerouslySetInnerHTML={{ __html: listDasarHukum.findById.data.judul }}
|
||||
style={{ wordBreak: "break-word", whiteSpace: "normal" }}
|
||||
/>
|
||||
</GridCol>
|
||||
</Grid>
|
||||
@@ -78,11 +79,7 @@ function Page() {
|
||||
<Box
|
||||
className="prose max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: listDasarHukum.findById.data.content }}
|
||||
style={{
|
||||
fontSize: '1.1rem',
|
||||
lineHeight: 1.7,
|
||||
textAlign: 'justify'
|
||||
}}
|
||||
style={{ wordBreak: "break-word", whiteSpace: "normal", fontSize: '1.1rem', lineHeight: 1.7, textAlign: 'justify' }}
|
||||
/>
|
||||
</Box>
|
||||
</Paper>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
'use client'
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useRouter, useParams } from 'next/navigation';
|
||||
import { useProxy } from 'valtio/utils';
|
||||
import colors from '@/con/colors';
|
||||
import { Box, Button, Group, Paper, Stack, Title, TextInput, Text, Select, Tooltip } from '@mantine/core';
|
||||
import { IconArrowBack, IconDeviceFloppy } from '@tabler/icons-react';
|
||||
import indeksKepuasanState from '@/app/admin/(dashboard)/_state/landing-page/indeks-kepuasan';
|
||||
import colors from '@/con/colors';
|
||||
import { Box, Button, Group, Paper, Select, Stack, TextInput, Title, Tooltip } from '@mantine/core';
|
||||
import { IconArrowBack, IconDeviceFloppy } from '@tabler/icons-react';
|
||||
import { useParams, useRouter } from 'next/navigation';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { toast } from 'react-toastify';
|
||||
import { useProxy } from 'valtio/utils';
|
||||
|
||||
interface FormResponden {
|
||||
name: string;
|
||||
@@ -100,14 +100,10 @@ function EditResponden() {
|
||||
>
|
||||
<Stack gap="md">
|
||||
<TextInput
|
||||
label={
|
||||
<Text fw="bold" fz="sm" mb={4}>
|
||||
Nama Responden
|
||||
</Text>
|
||||
}
|
||||
label="Nama Responden"
|
||||
type='text'
|
||||
placeholder="Masukkan nama responden"
|
||||
value={formData.name}
|
||||
defaultValue={formData.name}
|
||||
onChange={(val) => {
|
||||
setFormData({
|
||||
...formData,
|
||||
@@ -118,14 +114,10 @@ function EditResponden() {
|
||||
required
|
||||
/>
|
||||
<TextInput
|
||||
label={
|
||||
<Text fw="bold" fz="sm" mb={4}>
|
||||
Tanggal
|
||||
</Text>
|
||||
}
|
||||
label="Tanggal"
|
||||
type="date"
|
||||
placeholder='Pilih tanggal'
|
||||
value={formData.tanggal ? new Date(formData.tanggal).toISOString().split('T')[0] : ''}
|
||||
defaultValue={formData.tanggal ? new Date(formData.tanggal).toISOString().split('T')[0] : ''}
|
||||
onChange={(e) => {
|
||||
const selectedDate = e.currentTarget.value;
|
||||
setFormData({
|
||||
@@ -138,11 +130,7 @@ function EditResponden() {
|
||||
/>
|
||||
<Select
|
||||
key="jenisKelamin"
|
||||
label={
|
||||
<Text fw="bold" fz="sm" mb={4}>
|
||||
Jenis Kelamin
|
||||
</Text>
|
||||
}
|
||||
label="Jenis Kelamin"
|
||||
placeholder="Pilih jenis kelamin"
|
||||
value={formData.jenisKelaminId}
|
||||
onChange={(val) => setFormData({ ...formData, jenisKelaminId: val || "" })}
|
||||
@@ -165,11 +153,7 @@ function EditResponden() {
|
||||
key="rating"
|
||||
value={formData.ratingId}
|
||||
onChange={(val) => setFormData({ ...formData, ratingId: val || "" })}
|
||||
label={
|
||||
<Text fw="bold" fz="sm" mb={4}>
|
||||
Rating
|
||||
</Text>
|
||||
}
|
||||
label="Rating"
|
||||
placeholder='Pilih rating'
|
||||
data={
|
||||
(indeksKepuasanState.pilihanRatingResponden.findMany.data || [])
|
||||
@@ -191,7 +175,7 @@ function EditResponden() {
|
||||
key={"kelompokUmur"}
|
||||
value={formData.kelompokUmurId}
|
||||
onChange={(val) => setFormData({ ...formData, kelompokUmurId: val || "" })}
|
||||
label={<Text fw={"bold"} fz={"sm"}>Kelompok Umur</Text>}
|
||||
label="Kelompok Umur"
|
||||
placeholder='Pilih kelompok umur'
|
||||
data={
|
||||
(indeksKepuasanState.kelompokUmurResponden.findMany.data || [])
|
||||
|
||||
@@ -64,7 +64,7 @@ function RespondenCreate() {
|
||||
label="Nama"
|
||||
type='text'
|
||||
placeholder="masukkan nama"
|
||||
value={stategrafikBerdasarkanResponden.create.form.name}
|
||||
defaultValue={stategrafikBerdasarkanResponden.create.form.name}
|
||||
onChange={(val) => {
|
||||
stategrafikBerdasarkanResponden.create.form.name = val.currentTarget.value;
|
||||
}}
|
||||
@@ -73,7 +73,7 @@ function RespondenCreate() {
|
||||
label="Tanggal"
|
||||
type="date"
|
||||
placeholder="masukkan tanggal"
|
||||
value={stategrafikBerdasarkanResponden.create.form.tanggal}
|
||||
defaultValue={stategrafikBerdasarkanResponden.create.form.tanggal}
|
||||
onChange={(val) => {
|
||||
stategrafikBerdasarkanResponden.create.form.tanggal = val.currentTarget.value;
|
||||
}}
|
||||
|
||||
@@ -78,15 +78,17 @@ function Page() {
|
||||
<div
|
||||
style={{
|
||||
maxWidth: '300px',
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis'
|
||||
textOverflow: 'ellipsis',
|
||||
wordBreak: "break-word",
|
||||
whiteSpace: "normal"
|
||||
}}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: item.alasan ?
|
||||
item.alasan.replace(/<[^>]*>?/gm, '').substring(0, 50) + '...' :
|
||||
'-'
|
||||
}}
|
||||
|
||||
/>
|
||||
</Tooltip>
|
||||
</TableTd>
|
||||
|
||||
@@ -175,7 +175,7 @@ function EditProfilePPID() {
|
||||
<TextInput
|
||||
label={<Text fw="bold">Nama Perbekel</Text>}
|
||||
placeholder="Masukkan nama perbekel"
|
||||
value={allState.editForm.form.name}
|
||||
defaultValue={allState.editForm.form.name}
|
||||
onChange={(e) => handleFieldChange('name', e.currentTarget.value)}
|
||||
error={!allState.editForm.form.name && "Nama wajib diisi"}
|
||||
/>
|
||||
|
||||
@@ -97,25 +97,25 @@ function Page() {
|
||||
|
||||
<Box mt="lg">
|
||||
<Text fz={{ base: "1.125rem", md: "1.5rem" }} fw="bold" mb={4}>Biodata</Text>
|
||||
<Text fz={{ base: "1rem", md: "1.4rem" }} ta="justify" c={colors['blue-button']} dangerouslySetInnerHTML={{ __html: item.biodata }} />
|
||||
<Text fz={{ base: "1rem", md: "1.4rem" }} ta="justify" c={colors['blue-button']} style={{wordBreak: "break-word", whiteSpace: "normal"}} dangerouslySetInnerHTML={{ __html: item.biodata }} />
|
||||
</Box>
|
||||
|
||||
<Box mt="xl">
|
||||
<Text fz={{ base: "1.125rem", md: "1.5rem" }} fw="bold" mb={4}>Riwayat Karir</Text>
|
||||
<Text fz={{ base: "1rem", md: "1.4rem" }} ta="justify" c={colors['blue-button']} dangerouslySetInnerHTML={{ __html: item.riwayat }} />
|
||||
<Text fz={{ base: "1rem", md: "1.4rem" }} ta="justify" c={colors['blue-button']} style={{wordBreak: "break-word", whiteSpace: "normal"}} dangerouslySetInnerHTML={{ __html: item.riwayat }} />
|
||||
</Box>
|
||||
|
||||
<Box mt="xl">
|
||||
<Text fz={{ base: "1.125rem", md: "1.5rem" }} fw="bold" mb={4}>Pengalaman Organisasi</Text>
|
||||
<Box px={20}>
|
||||
<Text fz={{ base: "1rem", md: "1.4rem" }} ta="justify" c={colors['blue-button']} dangerouslySetInnerHTML={{ __html: item.pengalaman }} />
|
||||
<Text fz={{ base: "1rem", md: "1.4rem" }} ta="justify" c={colors['blue-button']} style={{wordBreak: "break-word", whiteSpace: "normal"}} dangerouslySetInnerHTML={{ __html: item.pengalaman }} />
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box mt="xl" mb="lg">
|
||||
<Text fz={{ base: "1.125rem", md: "1.5rem" }} fw="bold" mb={4}>Program Kerja Unggulan</Text>
|
||||
<Box px={20}>
|
||||
<Text fz={{ base: "1rem", md: "1.4rem" }} ta="justify" c={colors['blue-button']} dangerouslySetInnerHTML={{ __html: item.unggulan }} />
|
||||
<Text fz={{ base: "1rem", md: "1.4rem" }} ta="justify" c={colors['blue-button']} style={{wordBreak: "break-word", whiteSpace: "normal"}} dangerouslySetInnerHTML={{ __html: item.unggulan }} />
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@@ -159,23 +159,19 @@ export default function EditPegawaiPPID() {
|
||||
>
|
||||
<Stack gap="md">
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Nama Lengkap
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Nama Lengkap"
|
||||
placeholder="Masukkan nama lengkap"
|
||||
value={formData.namaLengkap}
|
||||
defaultValue={formData.namaLengkap}
|
||||
onChange={(e) => setFormData({ ...formData, namaLengkap: e.target.value })}
|
||||
required
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Gelar Akademik
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Gelar Akademik"
|
||||
placeholder="Contoh: S.Kom"
|
||||
value={formData.gelarAkademik}
|
||||
defaultValue={formData.gelarAkademik}
|
||||
onChange={(e) => setFormData({ ...formData, gelarAkademik: e.target.value })}
|
||||
/>
|
||||
</Box>
|
||||
@@ -231,44 +227,36 @@ export default function EditPegawaiPPID() {
|
||||
)}
|
||||
</Box>
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Tanggal Masuk
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Tanggal Masuk"
|
||||
type="date"
|
||||
placeholder="Contoh: 2022-01-01"
|
||||
value={formatDateForInput(formData.tanggalMasuk)}
|
||||
defaultValue={formatDateForInput(formData.tanggalMasuk)}
|
||||
onChange={(e) => setFormData({ ...formData, tanggalMasuk: e.target.value })}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Email
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Email"
|
||||
type="email"
|
||||
placeholder="contoh@email.com"
|
||||
value={formData.email}
|
||||
defaultValue={formData.email}
|
||||
onChange={(e) => setFormData({ ...formData, email: e.target.value })}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Telepon
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Telepon"
|
||||
placeholder="08123456789"
|
||||
value={formData.telepon}
|
||||
defaultValue={formData.telepon}
|
||||
onChange={(e) => setFormData({ ...formData, telepon: e.target.value })}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Alamat
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Alamat"
|
||||
placeholder="Jl. Contoh No. 123"
|
||||
value={formData.alamat}
|
||||
defaultValue={formData.alamat}
|
||||
onChange={(e) => setFormData({ ...formData, alamat: e.target.value })}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
@@ -64,7 +64,7 @@ function DetailPegawai() {
|
||||
<Stack gap="md">
|
||||
<Box>
|
||||
<Text fz="lg" fw="bold">Nama Lengkap</Text>
|
||||
<Text fz="md" c="dimmed">
|
||||
<Text fz="md" c="dimmed" style={{wordBreak: "break-word", whiteSpace: "normal"}}>
|
||||
{data.namaLengkap || '-'} {data.gelarAkademik || ''}
|
||||
</Text>
|
||||
</Box>
|
||||
@@ -86,7 +86,7 @@ function DetailPegawai() {
|
||||
|
||||
<Box>
|
||||
<Text fz="lg" fw="bold">Alamat</Text>
|
||||
<Text fz="md" c="dimmed">{data.alamat || '-'}</Text>
|
||||
<Text fz="md" c="dimmed" style={{wordBreak: "break-word", whiteSpace: "normal"}}>{data.alamat || '-'}</Text>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
|
||||
@@ -94,23 +94,19 @@ function CreatePegawaiPPID() {
|
||||
>
|
||||
<Stack gap="md">
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Nama Lengkap
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Nama Lengkap"
|
||||
placeholder="Masukkan nama lengkap"
|
||||
value={stateOrganisasi.create.form.namaLengkap}
|
||||
defaultValue={stateOrganisasi.create.form.namaLengkap}
|
||||
onChange={(e) => (stateOrganisasi.create.form.namaLengkap = e.currentTarget.value)}
|
||||
required
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Gelar Akademik
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Gelar Akademik"
|
||||
placeholder="Contoh: S.Kom"
|
||||
value={stateOrganisasi.create.form.gelarAkademik}
|
||||
defaultValue={stateOrganisasi.create.form.gelarAkademik}
|
||||
onChange={(e) => (stateOrganisasi.create.form.gelarAkademik = e.currentTarget.value)}
|
||||
/>
|
||||
</Box>
|
||||
@@ -189,47 +185,39 @@ function CreatePegawaiPPID() {
|
||||
)}
|
||||
</Box>
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Tanggal Masuk
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Tanggal Masuk"
|
||||
type="date"
|
||||
placeholder="Contoh: 2022-01-01"
|
||||
value={stateOrganisasi.create.form.tanggalMasuk}
|
||||
defaultValue={stateOrganisasi.create.form.tanggalMasuk}
|
||||
onChange={(e) => (stateOrganisasi.create.form.tanggalMasuk = e.currentTarget.value)}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Email
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Email"
|
||||
type="email"
|
||||
placeholder="Contoh: email@example.com"
|
||||
value={stateOrganisasi.create.form.email}
|
||||
defaultValue={stateOrganisasi.create.form.email}
|
||||
onChange={(e) => (stateOrganisasi.create.form.email = e.currentTarget.value)}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Nomor Telepon
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Nomor Telepon"
|
||||
placeholder="Contoh: 08123456789"
|
||||
value={stateOrganisasi.create.form.telepon}
|
||||
defaultValue={stateOrganisasi.create.form.telepon}
|
||||
onChange={(e) => (stateOrganisasi.create.form.telepon = e.currentTarget.value)}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<Text fw="bold" fz="sm" mb={6}>
|
||||
Alamat
|
||||
</Text>
|
||||
<TextInput
|
||||
label="Alamat"
|
||||
placeholder="Contoh: Jl. Contoh No. 1"
|
||||
value={stateOrganisasi.create.form.alamat}
|
||||
defaultValue={stateOrganisasi.create.form.alamat}
|
||||
onChange={(e) => (stateOrganisasi.create.form.alamat = e.currentTarget.value)}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
@@ -101,7 +101,7 @@ function EditPosisiOrganisasiPPID() {
|
||||
<TextInput
|
||||
label="Nama Posisi Organisasi"
|
||||
placeholder="Masukkan nama posisi organisasi"
|
||||
value={formData.nama}
|
||||
defaultValue={formData.nama}
|
||||
onChange={(e) => setFormData({ ...formData, nama: e.target.value })}
|
||||
required
|
||||
/>
|
||||
@@ -123,7 +123,7 @@ function EditPosisiOrganisasiPPID() {
|
||||
type="number"
|
||||
min={0}
|
||||
placeholder="Contoh: 1 (Angka semakin kecil, posisi semakin tinggi)"
|
||||
value={formData.hierarki}
|
||||
defaultValue={formData.hierarki}
|
||||
onChange={(e) => {
|
||||
const value = parseInt(e.target.value, 10);
|
||||
setFormData({ ...formData, hierarki: isNaN(value) ? 0 : value });
|
||||
|
||||
@@ -73,7 +73,7 @@ function CreatePosisiOrganisasiPPID() {
|
||||
<TextInput
|
||||
label="Nama Posisi"
|
||||
placeholder="Contoh: Kepala Desa"
|
||||
value={stateOrganisasi.create.form.nama}
|
||||
defaultValue={stateOrganisasi.create.form.nama}
|
||||
onChange={(e) => (stateOrganisasi.create.form.nama = e.target.value)}
|
||||
required
|
||||
/>
|
||||
@@ -95,7 +95,7 @@ function CreatePosisiOrganisasiPPID() {
|
||||
type="number"
|
||||
min={0}
|
||||
placeholder="Contoh: 1 (Angka semakin kecil, posisi semakin tinggi)"
|
||||
value={stateOrganisasi.create.form.hierarki || ''}
|
||||
defaultValue={stateOrganisasi.create.form.hierarki || ''}
|
||||
onChange={(e) => {
|
||||
const value = parseInt(e.target.value, 10);
|
||||
stateOrganisasi.create.form.hierarki = isNaN(value) ? 0 : value;
|
||||
|
||||
@@ -82,11 +82,7 @@ function VisiMisiPPIDList() {
|
||||
<Box
|
||||
className="prose max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: listVisiMisi.findById.data.visi }}
|
||||
style={{
|
||||
fontSize: '1.1rem',
|
||||
lineHeight: 1.7,
|
||||
textAlign: 'justify'
|
||||
}}
|
||||
style={{wordBreak: "break-word", whiteSpace: "normal", textAlign: "justify"}}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
@@ -99,11 +95,7 @@ function VisiMisiPPIDList() {
|
||||
<Box
|
||||
className="prose max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: listVisiMisi.findById.data.misi }}
|
||||
style={{
|
||||
fontSize: '1.1rem',
|
||||
lineHeight: 1.7,
|
||||
textAlign: 'justify'
|
||||
}}
|
||||
style={{wordBreak: "break-word", whiteSpace: "normal", textAlign: "justify"}}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user