Tambahan Fix Form Di Menu Landing Page & PPID IKM
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
|
experimental: {},
|
||||||
|
allowedDevOrigins: [
|
||||||
|
"http://192.168.1.82:3000", // buat akses dari HP/device lain
|
||||||
|
"http://localhost:3000", // akses lokal
|
||||||
|
],
|
||||||
async headers() {
|
async headers() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"version": "0.1.5",
|
"version": "0.1.5",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "bun --bun next dev",
|
"dev": "bun --bun next dev --hostname 0.0.0.0",
|
||||||
"build": "bun --bun next build",
|
"build": "bun --bun next build",
|
||||||
"start": "bun --bun next start"
|
"start": "bun --bun next start"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -121,39 +121,34 @@ function CreateSDGsDesa() {
|
|||||||
{previewImage && (
|
{previewImage && (
|
||||||
<Box mt="md">
|
<Box mt="md">
|
||||||
<Text fw={500} fz="sm" mb={4}>
|
<Text fw={500} fz="sm" mb={4}>
|
||||||
Pratinjau Gambar
|
Pratinjau Gambar
|
||||||
</Text>
|
</Text>
|
||||||
<Box
|
<Box
|
||||||
style={{
|
style={{
|
||||||
border: '1px solid #e0e0e0',
|
border: '1px solid #e0e0e0',
|
||||||
borderRadius: '8px',
|
borderRadius: '8px',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
maxWidth: '300px'
|
maxWidth: '300px'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src={previewImage}
|
src={previewImage}
|
||||||
alt="Preview"
|
alt="Preview"
|
||||||
style={{ width: '100%', height: 'auto' }}
|
style={{ width: '100%', height: 'auto' }}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<TextInput
|
<TextInput
|
||||||
label={
|
label="Nama Sdgs Desa"
|
||||||
<Text fw="bold" fz="sm" mb={4}>
|
|
||||||
Nama Sdgs Desa
|
|
||||||
</Text>
|
|
||||||
}
|
|
||||||
placeholder="Masukkan nama Sdgs Desa"
|
placeholder="Masukkan nama Sdgs Desa"
|
||||||
value={stateSDGSDesa.create.form.name}
|
defaultValue={stateSDGSDesa.create.form.name}
|
||||||
onChange={(val) => {
|
onChange={(e) => {
|
||||||
stateSDGSDesa.create.form.name = val.target.value;
|
stateSDGSDesa.create.form.name = e.currentTarget.value;
|
||||||
}}
|
}}
|
||||||
required
|
required
|
||||||
radius="md"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextInput
|
<TextInput
|
||||||
@@ -172,6 +167,13 @@ function CreateSDGsDesa() {
|
|||||||
min={0}
|
min={0}
|
||||||
radius="md"
|
radius="md"
|
||||||
/>
|
/>
|
||||||
|
<TextInput
|
||||||
|
label="Test"
|
||||||
|
onChange={(val) => {
|
||||||
|
console.log(val.target.value)
|
||||||
|
}}
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
<Group justify="flex-end" mt="md">
|
<Group justify="flex-end" mt="md">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ function Kepuasan() {
|
|||||||
label="Nama"
|
label="Nama"
|
||||||
type='text'
|
type='text'
|
||||||
placeholder="masukkan nama"
|
placeholder="masukkan nama"
|
||||||
value={state.create.form.name}
|
defaultValue={state.create.form.name}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.name = val.currentTarget.value;
|
state.create.form.name = val.currentTarget.value;
|
||||||
}}
|
}}
|
||||||
@@ -340,7 +340,7 @@ function Kepuasan() {
|
|||||||
label="Tanggal"
|
label="Tanggal"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="masukkan tanggal"
|
placeholder="masukkan tanggal"
|
||||||
value={state.create.form.tanggal}
|
defaultValue={state.create.form.tanggal}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.tanggal = val.currentTarget.value;
|
state.create.form.tanggal = val.currentTarget.value;
|
||||||
}}
|
}}
|
||||||
@@ -349,7 +349,7 @@ function Kepuasan() {
|
|||||||
key={"jenisKelamin"}
|
key={"jenisKelamin"}
|
||||||
label={"Jenis Kelamin"}
|
label={"Jenis Kelamin"}
|
||||||
placeholder={indeksKepuasanState.jenisKelaminResponden.findMany.loading ? 'Memuat...' : 'Pilih jenis kelamin'}
|
placeholder={indeksKepuasanState.jenisKelaminResponden.findMany.loading ? 'Memuat...' : 'Pilih jenis kelamin'}
|
||||||
value={state.create.form.jenisKelaminId || ""}
|
defaultValue={state.create.form.jenisKelaminId || ""}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.jenisKelaminId = val ?? "";
|
state.create.form.jenisKelaminId = val ?? "";
|
||||||
}}
|
}}
|
||||||
@@ -367,7 +367,7 @@ function Kepuasan() {
|
|||||||
key={"rating_responden"}
|
key={"rating_responden"}
|
||||||
label={"Rating"}
|
label={"Rating"}
|
||||||
placeholder={indeksKepuasanState.pilihanRatingResponden.findMany.loading ? 'Memuat...' : 'Pilih rating'}
|
placeholder={indeksKepuasanState.pilihanRatingResponden.findMany.loading ? 'Memuat...' : 'Pilih rating'}
|
||||||
value={state.create.form.ratingId || ""}
|
defaultValue={state.create.form.ratingId || ""}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.ratingId = val ?? "";
|
state.create.form.ratingId = val ?? "";
|
||||||
}}
|
}}
|
||||||
@@ -385,7 +385,7 @@ function Kepuasan() {
|
|||||||
key={"kelompokUmur"}
|
key={"kelompokUmur"}
|
||||||
label={"Kelompok Umur"}
|
label={"Kelompok Umur"}
|
||||||
placeholder={indeksKepuasanState.kelompokUmurResponden.findMany.loading ? 'Memuat...' : 'Pilih kelompok umur'}
|
placeholder={indeksKepuasanState.kelompokUmurResponden.findMany.loading ? 'Memuat...' : 'Pilih kelompok umur'}
|
||||||
value={state.create.form.kelompokUmurId || ""}
|
defaultValue={state.create.form.kelompokUmurId || ""}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.kelompokUmurId = val ?? "";
|
state.create.form.kelompokUmurId = val ?? "";
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ function Kepuasan() {
|
|||||||
label="Nama"
|
label="Nama"
|
||||||
type='text'
|
type='text'
|
||||||
placeholder="masukkan nama"
|
placeholder="masukkan nama"
|
||||||
value={state.create.form.name}
|
defaultValue={state.create.form.name}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.name = val.currentTarget.value;
|
state.create.form.name = val.currentTarget.value;
|
||||||
}}
|
}}
|
||||||
@@ -342,7 +342,7 @@ function Kepuasan() {
|
|||||||
label="Tanggal"
|
label="Tanggal"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="masukkan tanggal"
|
placeholder="masukkan tanggal"
|
||||||
value={state.create.form.tanggal}
|
defaultValue={state.create.form.tanggal}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.tanggal = val.currentTarget.value;
|
state.create.form.tanggal = val.currentTarget.value;
|
||||||
}}
|
}}
|
||||||
@@ -351,7 +351,7 @@ function Kepuasan() {
|
|||||||
key={"jenisKelamin"}
|
key={"jenisKelamin"}
|
||||||
label={"Jenis Kelamin"}
|
label={"Jenis Kelamin"}
|
||||||
placeholder={indeksKepuasanState.jenisKelaminResponden.findMany.loading ? 'Memuat...' : 'Pilih jenis kelamin'}
|
placeholder={indeksKepuasanState.jenisKelaminResponden.findMany.loading ? 'Memuat...' : 'Pilih jenis kelamin'}
|
||||||
value={state.create.form.jenisKelaminId || ""}
|
defaultValue={state.create.form.jenisKelaminId || ""}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.jenisKelaminId = val ?? "";
|
state.create.form.jenisKelaminId = val ?? "";
|
||||||
}}
|
}}
|
||||||
@@ -369,7 +369,7 @@ function Kepuasan() {
|
|||||||
key={"rating_responden"}
|
key={"rating_responden"}
|
||||||
label={"Rating"}
|
label={"Rating"}
|
||||||
placeholder={indeksKepuasanState.pilihanRatingResponden.findMany.loading ? 'Memuat...' : 'Pilih rating'}
|
placeholder={indeksKepuasanState.pilihanRatingResponden.findMany.loading ? 'Memuat...' : 'Pilih rating'}
|
||||||
value={state.create.form.ratingId || ""}
|
defaultValue={state.create.form.ratingId || ""}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.ratingId = val ?? "";
|
state.create.form.ratingId = val ?? "";
|
||||||
}}
|
}}
|
||||||
@@ -387,7 +387,7 @@ function Kepuasan() {
|
|||||||
key={"kelompokUmur"}
|
key={"kelompokUmur"}
|
||||||
label={"Kelompok Umur"}
|
label={"Kelompok Umur"}
|
||||||
placeholder={indeksKepuasanState.kelompokUmurResponden.findMany.loading ? 'Memuat...' : 'Pilih kelompok umur'}
|
placeholder={indeksKepuasanState.kelompokUmurResponden.findMany.loading ? 'Memuat...' : 'Pilih kelompok umur'}
|
||||||
value={state.create.form.kelompokUmurId || ""}
|
defaultValue={state.create.form.kelompokUmurId || ""}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
state.create.form.kelompokUmurId = val ?? "";
|
state.create.form.kelompokUmurId = val ?? "";
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import { AppServer } from '@/app/api/[[...slugs]]/route'
|
import { AppServer } from '@/app/api/[[...slugs]]/route'
|
||||||
import { treaty } from '@elysiajs/eden'
|
import { treaty } from '@elysiajs/eden'
|
||||||
|
|
||||||
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || 'localhost:3000'
|
// const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || 'localhost:3000'
|
||||||
|
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000'
|
||||||
|
|
||||||
const ApiFetch = treaty<AppServer>(BASE_URL)
|
const ApiFetch = treaty<AppServer>(BASE_URL)
|
||||||
|
|
||||||
export default ApiFetch
|
export default ApiFetch
|
||||||
Reference in New Issue
Block a user