feat: implement events and testimonials base pages
This commit is contained in:
@@ -1,3 +1,194 @@
|
||||
export default function Page() {
|
||||
return <></>;
|
||||
'use client';
|
||||
|
||||
import events from '@/data/events.json';
|
||||
import { buttonVariants } from '@components/atoms';
|
||||
import { cn } from '@utils/ui';
|
||||
import Image from 'next/image';
|
||||
import { HiCalendar, HiClock, HiLocationMarker } from 'react-icons/hi';
|
||||
|
||||
const formatDate = (dateString: string) => {
|
||||
const date = new Date(dateString);
|
||||
return date.toLocaleDateString('id-ID', {
|
||||
day: 'numeric',
|
||||
month: 'long',
|
||||
year: 'numeric',
|
||||
});
|
||||
};
|
||||
|
||||
const formatTime = (dateString: string) => {
|
||||
const date = new Date(dateString);
|
||||
return date.toLocaleTimeString('id-ID', {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
timeZone: 'Asia/Jakarta',
|
||||
});
|
||||
};
|
||||
|
||||
const getEventStatus = (endDate: string) => {
|
||||
const now = new Date();
|
||||
const end = new Date(endDate);
|
||||
return end > now ? 'upcoming' : 'past';
|
||||
};
|
||||
|
||||
export default function EventsPage() {
|
||||
const sortedEvents = [...events].sort(
|
||||
(a, b) =>
|
||||
new Date(b.start_date).getTime() - new Date(a.start_date).getTime()
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-background">
|
||||
<div className="max-w-7xl mx-auto px-4 py-12">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
{/* Featured Card */}
|
||||
<div className="col-span-full">
|
||||
<div className="rounded-xl shadow-sm hover:shadow-md transition-shadow duration-200 overflow-hidden bg-card">
|
||||
<div className="grid md:grid-cols-2">
|
||||
<div className="min-h-96 bg-muted relative">
|
||||
<Image
|
||||
src={sortedEvents[0].thumbnail}
|
||||
alt={sortedEvents[0].name}
|
||||
fill
|
||||
className="object-cover object-top"
|
||||
sizes="(max-width: 768px) 100vw, 50vw"
|
||||
priority
|
||||
unoptimized
|
||||
/>
|
||||
</div>
|
||||
<div className="p-8 flex flex-col">
|
||||
<div className="flex items-center gap-2 mb-4">
|
||||
<span className="bg-primary/20 text-primary text-xs px-2.5 py-1 rounded-full">
|
||||
Event Terbaru
|
||||
</span>
|
||||
<span
|
||||
className={cn(
|
||||
'px-2 py-1 rounded-full text-xs',
|
||||
getEventStatus(sortedEvents[0].end_date) === 'upcoming'
|
||||
? 'bg-primary/20 text-primary'
|
||||
: 'bg-muted text-muted-foreground'
|
||||
)}
|
||||
>
|
||||
{getEventStatus(sortedEvents[0].end_date) === 'upcoming'
|
||||
? 'Upcoming'
|
||||
: 'Selesai'}
|
||||
</span>
|
||||
</div>
|
||||
<h2 className="text-2xl font-bold mb-4 text-foreground">
|
||||
{sortedEvents[0].name}
|
||||
</h2>
|
||||
<div className="space-y-3 mb-6 text-sm text-muted-foreground">
|
||||
<div className="flex items-center gap-2">
|
||||
<HiCalendar className="w-4 h-4" />
|
||||
<span>{formatDate(sortedEvents[0].start_date)}</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<HiClock className="w-4 h-4" />
|
||||
<span>
|
||||
{formatTime(sortedEvents[0].start_date)} -{' '}
|
||||
{formatTime(sortedEvents[0].end_date)} WIB
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<HiLocationMarker className="w-4 h-4" />
|
||||
<span>
|
||||
{sortedEvents[0].type === 'online'
|
||||
? 'Online'
|
||||
: sortedEvents[0].location}
|
||||
</span>
|
||||
</div>
|
||||
{sortedEvents[0].price > 0 && (
|
||||
<div className="mt-1 font-medium">
|
||||
Rp {sortedEvents[0].price.toLocaleString('id-ID')}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-muted-foreground mb-6 line-clamp-4">
|
||||
{sortedEvents[0].description}
|
||||
</p>
|
||||
<a
|
||||
href={sortedEvents[0].detail_link}
|
||||
target="_blank"
|
||||
className={cn(
|
||||
buttonVariants({ variant: 'default' }),
|
||||
'mt-auto w-full md:w-fit'
|
||||
)}
|
||||
>
|
||||
Lihat Detail
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Regular Cards */}
|
||||
{sortedEvents.slice(1).map((event) => (
|
||||
<div
|
||||
key={event.name}
|
||||
className="rounded-xl shadow-sm hover:shadow-md transition-shadow duration-200 bg-card"
|
||||
>
|
||||
<div className="h-48 bg-muted relative">
|
||||
<Image
|
||||
src={event.thumbnail}
|
||||
alt={event.name}
|
||||
fill
|
||||
className="object-cover object-top rounded-t-xl"
|
||||
sizes="(max-width: 768px) 100vw, 33vw"
|
||||
unoptimized
|
||||
/>
|
||||
</div>
|
||||
<div className="p-6">
|
||||
<div className="flex justify-between items-start mb-4">
|
||||
<span
|
||||
className={cn(
|
||||
'px-2 py-1 rounded-full text-xs',
|
||||
getEventStatus(event.end_date) === 'upcoming'
|
||||
? 'bg-primary/20 text-primary'
|
||||
: 'bg-muted text-muted-foreground'
|
||||
)}
|
||||
>
|
||||
{getEventStatus(event.end_date) === 'upcoming'
|
||||
? 'Upcoming'
|
||||
: 'Selesai'}
|
||||
</span>
|
||||
</div>
|
||||
<h3 className="text-lg font-semibold mb-3 text-foreground">
|
||||
{event.name}
|
||||
</h3>
|
||||
<div className="space-y-2 mb-4 text-sm text-muted-foreground">
|
||||
<div className="flex items-center gap-2">
|
||||
<HiCalendar className="w-4 h-4" />
|
||||
<span>{formatDate(event.start_date)}</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<HiLocationMarker className="w-4 h-4" />
|
||||
<span>
|
||||
{event.type === 'online' ? 'Online' : event.location}
|
||||
</span>
|
||||
</div>
|
||||
{event.price > 0 && (
|
||||
<div className="font-medium">
|
||||
Rp {event.price.toLocaleString('id-ID')}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-muted-foreground text-sm mb-4 line-clamp-3">
|
||||
{event.description}
|
||||
</p>
|
||||
<a
|
||||
href={event.detail_link}
|
||||
target="_blank"
|
||||
className={cn(
|
||||
buttonVariants({ variant: 'outline' }),
|
||||
'w-full text-sm'
|
||||
)}
|
||||
>
|
||||
Lihat Detail
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,114 @@
|
||||
export default function Page() {
|
||||
return <></>;
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@components/atoms';
|
||||
import Link from 'next/link';
|
||||
import { BsChatLeftQuote } from 'react-icons/bs';
|
||||
|
||||
const testimonials = [
|
||||
{
|
||||
id: 1,
|
||||
name: 'User 1',
|
||||
date: 'April 2025',
|
||||
text: 'Bergabung dengan komunitas ini memberikan saya banyak inspirasi. Saya belajar banyak hal baru dan bertemu dengan orang-orang yang luar biasa.',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'User 2',
|
||||
date: 'Maret 2025',
|
||||
text: 'Pengalaman yang sangat berharga. Saya mendapatkan banyak wawasan baru dan dapat mengembangkan keterampilan menulis saya dengan lebih baik.',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'User 3',
|
||||
date: 'Maret 2025',
|
||||
text: 'Komunitas ini sangat mendukung dan memotivasi. Saya senang bisa menjadi bagian dari perjalanan ini dan berbagi pengalaman dengan sesama anggota.',
|
||||
},
|
||||
];
|
||||
|
||||
export default function TestimonialPage() {
|
||||
return (
|
||||
<div className="min-h-screen">
|
||||
{/* Hero Section */}
|
||||
<div className="py-16 px-4 text-center border-b border-border">
|
||||
<BsChatLeftQuote className="size-14 mx-auto my-4 text-foreground" />
|
||||
<h1 className="text-4xl font-bold mb-4 text-foreground">Testimonial</h1>
|
||||
<p className="max-w-2xl mx-auto text-lg mb-8 text-balance text-muted-foreground">
|
||||
Menampilkan pengalaman dan cerita para member yang telah join ke dalam
|
||||
komunitas kami
|
||||
</p>
|
||||
<Link href="/testimonial/submit">
|
||||
<Button>Tulis Testimonialmu</Button>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{/* Search and Filter */}
|
||||
<div className="max-w-7xl mx-auto px-4 py-6 border-b border-border">
|
||||
<div className="flex flex-col md:flex-row gap-4 justify-between">
|
||||
<div className="relative w-full md:w-96">
|
||||
<Input
|
||||
type="text"
|
||||
placeholder="Cari berdasarkan topik..."
|
||||
className="w-full bg-background"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex gap-4">
|
||||
<Select defaultValue="all-time">
|
||||
<SelectTrigger className="w-[180px] bg-background">
|
||||
<SelectValue placeholder="Semua Periode" />
|
||||
</SelectTrigger>
|
||||
<SelectContent className="bg-popover text-popover-foreground">
|
||||
<SelectItem value="all-time">Semua Periode</SelectItem>
|
||||
<SelectItem value="this-month">Bulan Ini</SelectItem>
|
||||
<SelectItem value="last-month">Bulan Lalu</SelectItem>
|
||||
<SelectItem value="this-year">Tahun Ini</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Select defaultValue="all-topics">
|
||||
<SelectTrigger className="w-[180px] bg-background">
|
||||
<SelectValue placeholder="Semua Topik" />
|
||||
</SelectTrigger>
|
||||
<SelectContent className="bg-popover text-popover-foreground">
|
||||
<SelectItem value="all-topics">Semua Topik</SelectItem>
|
||||
<SelectItem value="writing">Menulis</SelectItem>
|
||||
<SelectItem value="community">Komunitas</SelectItem>
|
||||
<SelectItem value="learning">Pembelajaran</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Testimonial Cards */}
|
||||
<div className="max-w-7xl mx-auto px-4 py-12">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
{testimonials.map((testimonial) => (
|
||||
<div
|
||||
key={testimonial.id}
|
||||
className="border rounded-lg p-6 shadow-sm bg-card border-border"
|
||||
>
|
||||
<div className="flex items-center mb-4">
|
||||
<div>
|
||||
<h3 className="font-semibold text-foreground">
|
||||
{testimonial.name}
|
||||
</h3>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Lulus: {testimonial.date}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-foreground/80 italic">
|
||||
"{testimonial.text}"
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
[
|
||||
{
|
||||
"name": "IMPHNEN X GDG Medan",
|
||||
"description": "Join us for the Google Cloud Roadshow: Build with AI in Medan! This is your chance to dive deep into the latest advancements in cloud technology and AI, guided by industry experts.",
|
||||
"start_date": "2025-04-26T13:00:00+07:00",
|
||||
"end_date": "2025-04-26T17:00:00+07:00",
|
||||
"thumbnail": "https://scontent.fsoc1-2.fna.fbcdn.net/v/t39.30808-6/492363939_2132158393873766_2304913620264481070_n.jpg?_nc_cat=105&ccb=1-7&_nc_sid=127cfc&_nc_eui2=AeFe43oCdy2FOIVI6pr_grkO_q5XyVVxt5v-rlfJVXG3m9KgINIp9lo_vzXP4CtAAFJviDNJdDPaPyGnz7B8-gfE&_nc_ohc=bv3GExoL4pUQ7kNvwEpV7xQ&_nc_oc=Adk45dIpzgFxCHgtQKDTo99Sewj0ZMO4LX1cNEI2Dj7VeQDp8jd1RzYnG_UwsKkaTug&_nc_zt=23&_nc_ht=scontent.fsoc1-2.fna&_nc_gid=ZPKg-Y9FLRXcDiSak5WcLA&oh=00_AfL7BFg5g-q6MALMRFUlgaUWK8jHxQVTHdZ_1ezxBthXfw&oe=68354615",
|
||||
"type": "onsite",
|
||||
"price": 0,
|
||||
"location": "Magnificient, Medan",
|
||||
"detail_link": "https://n8n.gdgmedan.com/form/8466f60d-94b0-42a6-93aa-8738ae4ab5df?fbclid=IwY2xjawKcQoNleHRuA2FlbQIxMABicmlkETFnQ1RvSU5aWVhpWldaOXBjAR7LUWa_npCLb-QSfk1QFTl12tyw_eBhNO8oI8N2LvhwweeE5_41uQsARsEQGw_aem_1IP2vqrQcvjsvLCBy2C6Hg"
|
||||
},
|
||||
{
|
||||
"name": "IMPHNEN X Connect Citcom",
|
||||
"description": "Unleash the Future with AI: Decode the potential of artificial intelligence to revolutionize your strategies, unchain innovation, and gain a powerful competitive edge in today's fast-evolving business landscape. Harness the transformative capabilities of AI to outsmart competitors, optimize operations, and drive sustainable growth.",
|
||||
"start_date": "2025-04-22T13:00:00+07:00",
|
||||
"end_date": "2025-04-22T17:00:00+07:00",
|
||||
"thumbnail": "https://scontent.fsoc1-2.fna.fbcdn.net/v/t39.30808-6/490432625_2122941998128739_5372979458124718061_n.jpg?stp=dst-jpg_p526x296_tt6&_nc_cat=105&ccb=1-7&_nc_sid=aa7b47&_nc_eui2=AeGc_W_0Gd3XY9X9ImKz1h1HpYKlinPYX-qlgqWKc9hf6k75HObQiJ8A8m6BZOIe2OrVQjjyXnHq08Rc4JuQWeCQ&_nc_ohc=uoSae0n37k0Q7kNvwHch8E5&_nc_oc=AdngSKtrCdZ4H3hlHh-9cttOnaKyrwiFEcm88kjp0gaflvQ65LUp4OT45-XVGDAoIo8&_nc_zt=23&_nc_ht=scontent.fsoc1-2.fna&_nc_gid=YGkoLGAxNuB0uF3C9hSYGQ&oh=00_AfLRkrzG7DRYa3HRuy9aXfUfG6zLkRBDj9LxqXKOfF9x7Q&oe=683546E0",
|
||||
"type": "onsite",
|
||||
"price": 0,
|
||||
"location": "El Hotel, Bandung",
|
||||
"detail_link": "/events/1"
|
||||
},
|
||||
{
|
||||
"name": "JVM Meetup #64",
|
||||
"description": "Join us for an insightful talk where we’ll explore how AI is reshaping the payment industry. Whether you’re into tech, AI, or just curious about the future of transactions, this is a must-attend event!",
|
||||
"start_date": "2025-04-30T13:00:00+07:00",
|
||||
"end_date": "2025-04-30T17:00:00+07:00",
|
||||
"thumbnail": "https://scontent.fsoc1-1.fna.fbcdn.net/v/t39.30808-6/494158983_2136830150073257_5259003432367969457_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=833d8c&_nc_eui2=AeGcneO8ihnXyQ_7WV93z7Onz0UPVTr-bf_PRQ9VOv5t_wI-el8xouZ-Z4TKGMMlBPi21d9AA55SP54MHkzO4rx1&_nc_ohc=3Q9NKGIkpT4Q7kNvwHKzwXr&_nc_oc=AdkRJ--zwRGcfX_F2eIgx0qhK-N3OkhwqRwujFhgSRWy5mH_SdIyBmwW8PHHXp71ZUM&_nc_zt=23&_nc_ht=scontent.fsoc1-1.fna&_nc_gid=Xi30SjzSBAU1XN9rRxp0VA&oh=00_AfKvjd9LTMfOwfPLD43U8lKYEr4KABecj336J8hAY8ekMg&oe=68353105",
|
||||
"type": "onsite",
|
||||
"price": 0,
|
||||
"location": "El Hotel, Bandung",
|
||||
"detail_link": "https://lu.ma/422jkgz0?utm_campaign=jvmmeetup&utm_medium=social%2C%20event%2C%20meetup&utm_source=google%2C%20facebook%2C%20linkedin%2C%20instagram"
|
||||
},
|
||||
{
|
||||
"name": "JVM Meetup #65",
|
||||
"description": "Di era digital yang terus berkembang, Artificial Intelligence (AI) bukan lagi teknologi masa depantapi alat bantu masa kini yang siap mendongkrak efisiensi, kreativitas, dan produktivitas kita semua, terutama para penggiat IT dan pelaku usaha!",
|
||||
"start_date": "2025-05-15T13:00:00+07:00",
|
||||
"end_date": "2025-05-15T17:00:00+07:00",
|
||||
"thumbnail": "https://scontent.fsoc1-1.fna.fbcdn.net/v/t39.30808-6/495382435_2144684952621110_8304851620615091109_n.jpg?_nc_cat=104&ccb=1-7&_nc_sid=833d8c&_nc_eui2=AeHwnU4KixfUsslo3M90ahT8GwMEI7zWSnQbAwQjvNZKdP3RHiUjdDZtuF1dIMvorL0nW0rDGOD6tPDi0i9ERK96&_nc_ohc=R1NyXnu-FKEQ7kNvwGbO-iN&_nc_oc=Adluf-uw1tmzkNME9vNhwkTv5-x_GHMfsLj1bzGyYds_ODq3UnWMq2DthyUisF9e3gU&_nc_zt=23&_nc_ht=scontent.fsoc1-1.fna&_nc_gid=kykMk9nPtcrtk-InL6tF6w&oh=00_AfLZSrEPpV83lVFRMz19n9RzfnsM4o7K7TijpdAjWYViiA&oe=6835231B",
|
||||
"type": "onsite",
|
||||
"price": 0,
|
||||
"location": "Telkom Landmark Tower (Lt.31)",
|
||||
"detail_link": "s.id/jvm65"
|
||||
}
|
||||
]
|
||||
@@ -116,6 +116,166 @@ export interface paths {
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/claims/create": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post: operations["post_create_gacha_claim"];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/claims/detail/{id}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: operations["get_detail_gacha_claim"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/items": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: operations["get_gacha_item_list"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/items/create": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post: operations["post_create_gacha_item"];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/items/delete/{id}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete: operations["delete_gacha_item"];
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/items/detail/{id}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: operations["get_gacha_item_by_id"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/items/update/{id}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put: operations["put_update_gacha_item"];
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/rolls/create": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post: operations["post_create_gacha_roll"];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/rolls/detail/{id}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get: operations["get_detail_gacha_roll"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/gacha/rolls/execute": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
post: operations["post_execute_gacha_roll"];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/v1/permissions": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
@@ -414,7 +574,7 @@ export interface components {
|
||||
};
|
||||
AuthLoginResponsetDto: {
|
||||
token: components["schemas"]["TokenDto"];
|
||||
user: components["schemas"]["AuthUserItemDto"];
|
||||
user: components["schemas"]["UsersDetailItemDto"];
|
||||
};
|
||||
AuthNewPasswordRequestDto: {
|
||||
password: string;
|
||||
@@ -428,29 +588,56 @@ export interface components {
|
||||
fullname: string;
|
||||
password: string;
|
||||
phone_number: string;
|
||||
referral_code?: string | null;
|
||||
referred_by?: string | null;
|
||||
student_type: string;
|
||||
};
|
||||
AuthResendOtpRequestDto: {
|
||||
email: string;
|
||||
};
|
||||
AuthUserItemDto: {
|
||||
avatar?: string | null;
|
||||
birthdate?: string | null;
|
||||
email: string;
|
||||
fullname: string;
|
||||
gender?: string | null;
|
||||
id: string;
|
||||
is_active: boolean;
|
||||
phone_number: string;
|
||||
role: components["schemas"]["RolesItemDto"];
|
||||
};
|
||||
AuthVerifyEmailRequestDto: {
|
||||
email: string;
|
||||
/** Format: int32 */
|
||||
otp: number;
|
||||
};
|
||||
GachaClaimItemDto: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
is_deleted: boolean;
|
||||
item: components["schemas"]["GachaItemDto"];
|
||||
updated_at?: string | null;
|
||||
user: components["schemas"]["UsersDetailItemDto"];
|
||||
};
|
||||
GachaClaimRequestDto: {
|
||||
item_id: string;
|
||||
user_id: string;
|
||||
};
|
||||
GachaItemDto: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
is_deleted: boolean;
|
||||
name: string;
|
||||
updated_at?: string | null;
|
||||
};
|
||||
GachaItemRequestDto: {
|
||||
image_url: string;
|
||||
name: string;
|
||||
};
|
||||
GachaRollItemDto: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
is_deleted: boolean;
|
||||
item: components["schemas"]["GachaItemDto"];
|
||||
/** Format: int32 */
|
||||
quantity: number;
|
||||
updated_at?: string | null;
|
||||
/** Format: float */
|
||||
weight: number;
|
||||
};
|
||||
GachaRollRequestDto: {
|
||||
item_id: string;
|
||||
/** Format: int32 */
|
||||
quantity: number;
|
||||
/** Format: float */
|
||||
weight: number;
|
||||
};
|
||||
MessageResponseDto: {
|
||||
message: string;
|
||||
version: string;
|
||||
@@ -483,6 +670,16 @@ export interface components {
|
||||
PermissionsRequestDto: {
|
||||
name: string;
|
||||
};
|
||||
ResponseListSuccessDto_Vec_GachaItemDto: {
|
||||
data: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
is_deleted: boolean;
|
||||
name: string;
|
||||
updated_at?: string | null;
|
||||
}[];
|
||||
meta?: null | components["schemas"]["MetaResponseDto"];
|
||||
};
|
||||
ResponseListSuccessDto_Vec_PermissionsItemDto: {
|
||||
data: {
|
||||
created_at?: string | null;
|
||||
@@ -492,12 +689,12 @@ export interface components {
|
||||
}[];
|
||||
meta?: null | components["schemas"]["MetaResponseDto"];
|
||||
};
|
||||
ResponseListSuccessDto_Vec_RolesItemDto: {
|
||||
ResponseListSuccessDto_Vec_RolesListItemDto: {
|
||||
data: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
name: string;
|
||||
permissions: components["schemas"]["PermissionsItemDto"][];
|
||||
permissions_count: number;
|
||||
updated_at?: string | null;
|
||||
}[];
|
||||
meta?: null | components["schemas"]["MetaResponseDto"];
|
||||
@@ -519,7 +716,39 @@ export interface components {
|
||||
ResponseSuccessDto_AuthLoginResponsetDto: {
|
||||
data: {
|
||||
token: components["schemas"]["TokenDto"];
|
||||
user: components["schemas"]["AuthUserItemDto"];
|
||||
user: components["schemas"]["UsersDetailItemDto"];
|
||||
};
|
||||
};
|
||||
ResponseSuccessDto_GachaClaimItemDto: {
|
||||
data: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
is_deleted: boolean;
|
||||
item: components["schemas"]["GachaItemDto"];
|
||||
updated_at?: string | null;
|
||||
user: components["schemas"]["UsersDetailItemDto"];
|
||||
};
|
||||
};
|
||||
ResponseSuccessDto_GachaItemDto: {
|
||||
data: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
is_deleted: boolean;
|
||||
name: string;
|
||||
updated_at?: string | null;
|
||||
};
|
||||
};
|
||||
ResponseSuccessDto_GachaRollItemDto: {
|
||||
data: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
is_deleted: boolean;
|
||||
item: components["schemas"]["GachaItemDto"];
|
||||
/** Format: int32 */
|
||||
quantity: number;
|
||||
updated_at?: string | null;
|
||||
/** Format: float */
|
||||
weight: number;
|
||||
};
|
||||
};
|
||||
ResponseSuccessDto_PermissionsItemDto: {
|
||||
@@ -530,10 +759,11 @@ export interface components {
|
||||
updated_at?: string | null;
|
||||
};
|
||||
};
|
||||
ResponseSuccessDto_RolesItemDto: {
|
||||
ResponseSuccessDto_RolesDetailItemDto: {
|
||||
data: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
is_deleted: boolean;
|
||||
name: string;
|
||||
permissions: components["schemas"]["PermissionsItemDto"][];
|
||||
updated_at?: string | null;
|
||||
@@ -549,20 +779,30 @@ export interface components {
|
||||
data: {
|
||||
avatar?: string | null;
|
||||
birthdate?: string | null;
|
||||
created_at: string;
|
||||
email: string;
|
||||
fullname: string;
|
||||
gender?: string | null;
|
||||
id: string;
|
||||
is_active: boolean;
|
||||
phone_number: string;
|
||||
role: components["schemas"]["RolesItemDto"];
|
||||
role: components["schemas"]["RolesDetailItemDto"];
|
||||
updated_at: string;
|
||||
};
|
||||
};
|
||||
RolesItemDto: {
|
||||
RolesDetailItemDto: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
is_deleted: boolean;
|
||||
name: string;
|
||||
permissions: components["schemas"]["PermissionsItemDto"][];
|
||||
updated_at?: string | null;
|
||||
};
|
||||
RolesListItemDto: {
|
||||
created_at?: string | null;
|
||||
id: string;
|
||||
name: string;
|
||||
permissions: components["schemas"]["PermissionsItemDto"][];
|
||||
permissions_count: number;
|
||||
updated_at?: string | null;
|
||||
};
|
||||
RolesRequestCreateDto: {
|
||||
@@ -571,6 +811,7 @@ export interface components {
|
||||
};
|
||||
RolesRequestUpdateDto: {
|
||||
name?: string | null;
|
||||
overwrite?: boolean | null;
|
||||
permissions?: string[] | null;
|
||||
};
|
||||
TokenDto: {
|
||||
@@ -589,17 +830,6 @@ export interface components {
|
||||
role_id: string;
|
||||
};
|
||||
UsersDetailItemDto: {
|
||||
avatar?: string | null;
|
||||
birthdate?: string | null;
|
||||
email: string;
|
||||
fullname: string;
|
||||
gender?: string | null;
|
||||
id: string;
|
||||
is_active: boolean;
|
||||
phone_number: string;
|
||||
role: components["schemas"]["RolesItemDto"];
|
||||
};
|
||||
UsersItemDto: {
|
||||
avatar?: string | null;
|
||||
birthdate?: string | null;
|
||||
created_at: string;
|
||||
@@ -608,10 +838,8 @@ export interface components {
|
||||
gender?: string | null;
|
||||
id: string;
|
||||
is_active: boolean;
|
||||
is_deleted: boolean;
|
||||
password: string;
|
||||
phone_number: string;
|
||||
role: components["schemas"]["RolesItemDto"];
|
||||
role: components["schemas"]["RolesDetailItemDto"];
|
||||
updated_at: string;
|
||||
};
|
||||
UsersListItemDto: {
|
||||
@@ -875,6 +1103,250 @@ export interface operations {
|
||||
};
|
||||
};
|
||||
};
|
||||
post_create_gacha_claim: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["GachaClaimRequestDto"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Create new gacha claim */
|
||||
201: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["MessageResponseDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
get_detail_gacha_claim: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
/** @description Gacha Claim ID */
|
||||
id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Get Gacha Claim by ID */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["ResponseSuccessDto_GachaClaimItemDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
get_gacha_item_list: {
|
||||
parameters: {
|
||||
query?: {
|
||||
/** @description Page number */
|
||||
page?: number;
|
||||
/** @description Items per page */
|
||||
per_page?: number;
|
||||
/** @description Search keyword */
|
||||
search?: string;
|
||||
/** @description Sort by field */
|
||||
sort_by?: string;
|
||||
/** @description Order ASC or DESC */
|
||||
order?: string;
|
||||
/** @description Filter value */
|
||||
filter?: string;
|
||||
/** @description Field to filter by */
|
||||
filter_by?: string;
|
||||
};
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Get gacha item list */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["ResponseListSuccessDto_Vec_GachaItemDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post_create_gacha_item: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["GachaItemRequestDto"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Create gacha item */
|
||||
201: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["MessageResponseDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
delete_gacha_item: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Delete gacha item */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["MessageResponseDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
get_gacha_item_by_id: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
/** @description Gacha Item ID */
|
||||
id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Get gacha item by ID */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["ResponseSuccessDto_GachaItemDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
put_update_gacha_item: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["GachaItemRequestDto"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Update gacha item */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["MessageResponseDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post_create_gacha_roll: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["GachaRollRequestDto"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Create new gacha roll */
|
||||
201: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["MessageResponseDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
get_detail_gacha_roll: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
/** @description Gacha Roll ID */
|
||||
id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Get Gacha Roll by ID */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["ResponseSuccessDto_GachaRollItemDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
post_execute_gacha_roll: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Execute and get 1 gacha result */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["ResponseSuccessDto_GachaRollItemDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
get_permission_list: {
|
||||
parameters: {
|
||||
query?: {
|
||||
@@ -1035,7 +1507,7 @@ export interface operations {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["ResponseListSuccessDto_Vec_RolesItemDto"];
|
||||
"application/json": components["schemas"]["ResponseListSuccessDto_Vec_RolesListItemDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1104,7 +1576,7 @@ export interface operations {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["ResponseSuccessDto_RolesItemDto"];
|
||||
"application/json": components["schemas"]["ResponseSuccessDto_RolesDetailItemDto"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user