Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Location and related models #23

Merged
merged 44 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3283273
feat: update schema and seed for location categories
fikrialwan Dec 24, 2023
81d6b34
feat: add iniital card event location
fikrialwan Dec 24, 2023
cde4f74
feat(ui/component): create radio location category
fikrialwan Dec 24, 2023
d9038db
feat: add radio button location category on event page detail
fikrialwan Dec 24, 2023
6ed31a5
style: format document with prettier
fikrialwan Dec 25, 2023
21c191b
feat: update location schema
fikrialwan Dec 25, 2023
62c4fe5
feat: update seed data from offline to in person
fikrialwan Dec 25, 2023
d23ab73
feat: update schema event
babdurrahman78 Dec 25, 2023
cd38081
feat: update schema event and location
fikrialwan Dec 25, 2023
36b8014
feat: map radio from event categories database
fikrialwan Dec 25, 2023
2d10c9e
fix: action event
fikrialwan Dec 25, 2023
59f9858
Merge branch 'event-location-bilal' into event-location
babdurrahman78 Dec 26, 2023
23e442f
fix: action category change
fikrialwan Dec 26, 2023
04a4da0
chore: merge conflict
fikrialwan Dec 26, 2023
fc98069
feat: update schemEvent
babdurrahman78 Dec 27, 2023
7a14a84
feat: update schema.prisma, add event detail fields
babdurrahman78 Dec 27, 2023
12b4849
style: update prettier
fikrialwan Dec 27, 2023
d713f4f
style: remove unnused space
fikrialwan Dec 27, 2023
fb6a96d
feat: update schema zod, show mapsUrl on getById, add function to get…
babdurrahman78 Dec 28, 2023
f17fab3
Merge branch 'event-location' of https://github.com/bandungdevcom/ban…
babdurrahman78 Dec 28, 2023
1db46a0
feat: use select component for Event Media, update payload for update…
babdurrahman78 Dec 28, 2023
dfff0d1
feat: merge staging
fikrialwan Dec 29, 2023
2e762a4
feat: add intent save event
fikrialwan Dec 29, 2023
5f9c40f
feat: add event format field
fikrialwan Dec 29, 2023
dcc4559
feat: add save event format
fikrialwan Dec 29, 2023
e5f5244
feat: update address field to textarea
fikrialwan Dec 29, 2023
5640991
feat: add label location
fikrialwan Dec 29, 2023
d3d8d32
feat: show location on event page
fikrialwan Dec 29, 2023
55c8b1c
fix: issue select radix on remix
fikrialwan Dec 29, 2023
71fd7ce
refactor: move event detail form to component
fikrialwan Dec 30, 2023
d1265e8
fix: intent value for admin events
mhaidarhanif Dec 30, 2023
11b6576
fix: admin event model remove organizerId requirement
mhaidarhanif Dec 30, 2023
41dd8e9
fix: import component using tilde
fikrialwan Dec 30, 2023
825cfe7
refactor: move event detail form to component shared
fikrialwan Dec 30, 2023
9af66ed
fix: remove organizationId requirement
fikrialwan Dec 30, 2023
81f6ef8
fix: layout event detail form
fikrialwan Dec 30, 2023
9658643
feat: move category to below format
fikrialwan Dec 30, 2023
c54ee41
feat: change offline to in person
fikrialwan Dec 30, 2023
35aea5d
feat: show maps url and update basis for hybrid event category
fikrialwan Dec 30, 2023
ae004eb
fix: handle render location when event location null
fikrialwan Dec 30, 2023
04dd87c
fix: show format and category when data not null
fikrialwan Dec 30, 2023
32d9773
feat: radio button background color
fikrialwan Dec 30, 2023
71a1dcb
fix: tidy up isHybrid conditions
mhaidarhanif Dec 30, 2023
c89bd48
fix: icons and html elements
mhaidarhanif Dec 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: format document with prettier
  • Loading branch information
fikrialwan committed Dec 25, 2023
commit 6ed31a587af32506a1c1f961da408ebf2af8920a
5 changes: 3 additions & 2 deletions app/components/ui/radio-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const RadioGroupLocationCategoryItem = React.forwardRef<
</RadioGroupPrimitive.Item>
)
})
RadioGroupLocationCategoryItem.displayName = RadioGroupPrimitive.Item.displayName
RadioGroupLocationCategoryItem.displayName =
RadioGroupPrimitive.Item.displayName

export { RadioGroup, RadioGroupLocationCategoryItem, RadioGroupItem }
export { RadioGroup, RadioGroupItem, RadioGroupLocationCategoryItem }
13 changes: 10 additions & 3 deletions app/routes/admin.events.$eventId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import { Timestamp } from "~/components/shared/timestamp"
import { Button } from "~/components/ui/button"
import { Card } from "~/components/ui/card"
import { Iconify } from "~/components/ui/iconify"
import {
RadioGroup,
RadioGroupLocationCategoryItem,
} from "~/components/ui/radio-group"
import { Separator } from "~/components/ui/separator"
import { TextareaAutosize } from "~/components/ui/textarea-autosize"
import { requireUser } from "~/helpers/auth"
Expand All @@ -38,7 +42,6 @@ import { createMeta } from "~/utils/meta"
import { createSitemap } from "~/utils/sitemap"
import { createSlug, truncateText } from "~/utils/string"
import { createTimer } from "~/utils/timer"
import { RadioGroup, RadioGroupLocationCategoryItem } from "~/components/ui/radio-group"

export const handle = createSitemap()

Expand Down Expand Up @@ -286,8 +289,12 @@ export default function UserEventsEventIdRoute() {
<Card className="space-y-2 p-4">
<h2 className="mb-4">Event Location</h2>
<RadioGroup className="grid-cols-2">
<RadioGroupLocationCategoryItem value="OFFLINE">In Person</RadioGroupLocationCategoryItem>
<RadioGroupLocationCategoryItem value="ONLINE">Online</RadioGroupLocationCategoryItem>
<RadioGroupLocationCategoryItem value="OFFLINE">
In Person
</RadioGroupLocationCategoryItem>
<RadioGroupLocationCategoryItem value="ONLINE">
Online
</RadioGroupLocationCategoryItem>
</RadioGroup>
</Card>
</section>
Expand Down
26 changes: 13 additions & 13 deletions prisma/data/location-categories.json
mhaidarhanif marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[
{
"symbol": "ONLINE",
"name": "Online"
},
{
"symbol": "OFFLINE",
"name": "Offline"
},
{
"symbol": "HYBRID",
"name": "Hybrid"
}
]
{
"symbol": "ONLINE",
"name": "Online"
},
{
"symbol": "OFFLINE",
"name": "Offline"
},
{
"symbol": "HYBRID",
"name": "Hybrid"
}
]
11 changes: 8 additions & 3 deletions prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { createSlug } from "~/utils/string"
import dataCredentialUsers from "./credentials/users.json"
import dataEventStatuses from "./data/event-statuses.json"
import { dataEvents } from "./data/events"
import dataLocationCategories from "./data/location-categories.json"
import dataPostStatuses from "./data/post-statuses.json"
import dataPosts from "./data/posts.json"
import dataRoles from "./data/roles.json"
import dataTags from "./data/tags.json"
import dataLocationCategories from "./data/location-categories.json"

/**
* Enable and disable seed items by commenting them
Expand Down Expand Up @@ -292,7 +292,10 @@ async function seedEventStatuses() {

async function seedLocationCategories() {
console.info("\n🪧 Seed location categories")
console.info("🪧 Count location categories", await prisma.locationCategory.count())
console.info(
"🪧 Count location categories",
await prisma.locationCategory.count(),
)
// console.info("🪧 Deleted location categories", await prisma.locationCategory.deleteMany())
console.time("🪧 Upserted location categories")

Expand All @@ -302,7 +305,9 @@ async function seedLocationCategories() {
create: locationCategoryRaw,
update: locationCategoryRaw,
})
console.info(`🪧 Upserted location category ${locationCategory.symbol} / ${locationCategory.name}`)
console.info(
`🪧 Upserted location category ${locationCategory.symbol} / ${locationCategory.name}`,
)
}
console.timeEnd("🪧 Upserted location categories")
}
Expand Down
5 changes: 4 additions & 1 deletion prisma/utils/check-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ async function checkData() {
console.info("👤 Count user profiles", await prisma.userProfile.count())
console.info("📜 Count posts", await prisma.post.count())
console.info("🪧 Count post statuses", await prisma.postStatus.count())
console.info("🪧 Count location categories", await prisma.locationCategory.count())
console.info(
"🪧 Count location categories",
await prisma.locationCategory.count(),
)
console.info("📅 Count events", await prisma.event.count())
console.info("🗓️ Count event statuses", await prisma.eventStatus.count())
}
Expand Down