2 커밋 281ea3da04 ... ab7dff742a

작성자 SHA1 메시지 날짜
  yusuf ab7dff742a feat: change client collection's category 1 개월 전
  yusuf 14af7d0c42 chore: update cors to allow vercel frontend to access 1 개월 전
5개의 변경된 파일20개의 추가작업 그리고 18개의 파일을 삭제
  1. 3 3
      API_DOCUMENTATION.md
  2. 4 4
      src/collections/Clients.ts
  3. 1 1
      src/payload-types.ts
  4. 2 0
      src/payload.config.ts
  5. 10 10
      src/scripts/seed.ts

+ 3 - 3
API_DOCUMENTATION.md

@@ -90,8 +90,8 @@ Mengambil daftar clients dengan pagination dan filtering.
 - `limit` - Jumlah item per halaman (default: 10)
 - `sort` - Sorting field (contoh: `name` untuk ascending, `-name` untuk descending)
 - `where[category][equals]` - Filter berdasarkan category:
-  - `"Banking & Finance"`
-  - `"Enterprise & Industrial"`
+  - `"Banking"`
+  - `"Insurance"`
   - `"Government"`
 - `where[name][contains]` - Search berdasarkan nama client (case-insensitive)
 - `depth` - Depth untuk populate logo relationship (default: 0, gunakan 1 untuk populate logo object)
@@ -110,7 +110,7 @@ Mengambil daftar clients dengan pagination dan filtering.
 - `name` - Client name (string)
 - `href` - Website URL (string)
 - `logo` - Media object atau ID (relationship ke `media`)
-- `category` - Category (string, salah satu dari tiga opsi di atas)
+- `category` - Category (string, salah satu dari tiga opsi di atas: `Banking`, `Insurance`, `Government`)
 - `imageHeight` - Optional image height in pixels (number)
 - `createdAt` - Creation timestamp (ISO date string)
 - `updatedAt` - Last update timestamp (ISO date string)

+ 4 - 4
src/collections/Clients.ts

@@ -39,12 +39,12 @@ export const Clients: CollectionConfig = {
       required: true,
       options: [
         {
-          label: 'Banking & Finance',
-          value: 'Banking & Finance',
+          label: 'Banking',
+          value: 'Banking',
         },
         {
-          label: 'Enterprise & Industrial',
-          value: 'Enterprise & Industrial',
+          label: 'Insurance',
+          value: 'Insurance',
         },
         {
           label: 'Government',

+ 1 - 1
src/payload-types.ts

@@ -228,7 +228,7 @@ export interface Client {
   name: string;
   href: string;
   logo: number | Media;
-  category: 'Banking & Finance' | 'Enterprise & Industrial' | 'Government';
+  category: 'Banking' | 'Insurance' | 'Government';
   imageHeight?: number | null;
   updatedAt: string;
   createdAt: string;

+ 2 - 0
src/payload.config.ts

@@ -31,6 +31,8 @@ const trustedBrowserOrigins: string[] = [
   'https://hanoman.co.id',
   'https://www.hanoman.co.id',
   'https://api.hanoman.co.id',
+  'https://hanoman-website-mirror.vercel.app',
+  'https://hanoman-website-be.vercel.app',
 ]
 
 /** URL publik backend (mis. https://api.hanoman.co.id). Kosongkan di lokal jika akses lewat localhost:3000. */

+ 10 - 10
src/scripts/seed.ts

@@ -88,49 +88,49 @@ const clients = [
         href: 'http://www.btn.co.id',
         imageFile: 'btn.png',
         imageHeight: 42,
-        category: 'Banking & Finance',
+        category: 'Banking',
     },
     {
         name: 'Bank Internasional Indonesia',
         href: 'http://www.bii.co.id',
         imageFile: 'bii.png',
         imageHeight: 50,
-        category: 'Banking & Finance',
+        category: 'Banking',
     },
     {
         name: 'Bank Sinarmas',
         href: 'http://www.banksinarmas.com',
         imageFile: 'bsim.png',
         imageHeight: 42,
-        category: 'Banking & Finance',
+        category: 'Banking',
     },
     {
         name: 'Telkomsel',
         href: 'http://telkomsel.com/',
         imageFile: 'tsel.png',
         imageHeight: 56,
-        category: 'Enterprise & Industrial',
+        category: 'Insurance',
     },
     {
         name: 'Honda Prospect Motor',
         href: 'http://www.hpm.co.id',
         imageFile: 'hpm.jpg',
         imageHeight: 56,
-        category: 'Enterprise & Industrial',
+        category: 'Insurance',
     },
     {
         name: 'Bank Tabungan Negara - Syariah',
         href: 'http://www.btn.co.id/Syariah/Home.aspx',
         imageFile: 'btns1.png',
         imageHeight: 44,
-        category: 'Banking & Finance',
+        category: 'Banking',
     },
     {
         name: 'Bank Negara Indonesia',
         href: 'http://www.bni.co.id',
         imageFile: 'bni.png',
         imageHeight: 24,
-        category: 'Banking & Finance',
+        category: 'Banking',
     },
     {
         name: 'Direktorat Jenderal Bea dan Cukai',
@@ -144,7 +144,7 @@ const clients = [
         href: 'http://www.sinarmasforestry.com/Default.asp',
         imageFile: 'smf2.png',
         imageHeight: 48,
-        category: 'Enterprise & Industrial',
+        category: 'Insurance',
     },
 ]
 
@@ -441,8 +441,8 @@ async function seed() {
                         href: clientData.href,
                         logo: mediaId,
                         category: clientData.category as
-                            | 'Banking & Finance'
-                            | 'Enterprise & Industrial'
+                            | 'Banking'
+                            | 'Insurance'
                             | 'Government',
                         imageHeight: clientData.imageHeight,
                     },