From cedaa3c4e3fa1ca07861285f906357e2a069c40f Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sat, 13 Jan 2024 21:24:09 +0700 Subject: [PATCH 01/10] fix emulator condition --- apps/app/src/firebase/clientApp.ts | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/apps/app/src/firebase/clientApp.ts b/apps/app/src/firebase/clientApp.ts index 8169e1d..8ec688d 100644 --- a/apps/app/src/firebase/clientApp.ts +++ b/apps/app/src/firebase/clientApp.ts @@ -36,17 +36,11 @@ const getCloudFunction = (functionName: string) => { return returnedFunction; }; -// if ( -// // process.env.REACT_APP_EMULATED === 'True' && -// // (process.env.NODE_ENV.match(/development/i) || -// // window.location.hostname === 'localhost') -// true -// ) { -// connectAuthEmulator(auth, 'http://localhost:9099'); -// connectFirestoreEmulator(db, 'localhost', 8080); -// connectStorageEmulator(storage, 'localhost', 9199); - -// connectFunctionsEmulator(functions, 'localhost', 5001); // Replace with your emulator's host and port -// } +if (process.env.NODE_ENV.match(/development/i) || window.location.hostname === 'localhost') { + connectAuthEmulator(auth, 'http://localhost:9099'); + connectFirestoreEmulator(db, 'localhost', 8080); + connectStorageEmulator(storage, 'localhost', 9199); + connectFunctionsEmulator(functions, 'localhost', 5001); +} export { app, db, auth, storage, getCloudFunction }; From 80ef3cee95abfeb5aa7122e2f3c48e454d57224f Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sat, 13 Jan 2024 22:11:32 +0700 Subject: [PATCH 02/10] nest location details --- .../app/src/app/(protected)/events/Events.tsx | 108 ++++++++++-------- .../create/form/event-info/validation.ts | 2 +- .../form/event-location/MapLocation.tsx | 2 +- .../create/form/event-location/Places.tsx | 15 +-- .../create/form/event-location/index.tsx | 2 +- .../create/form/event-location/validation.ts | 25 +++- .../events/create/form/event-roles/index.tsx | 6 +- .../(protected)/events/create/form/index.tsx | 7 +- 8 files changed, 92 insertions(+), 75 deletions(-) diff --git a/apps/app/src/app/(protected)/events/Events.tsx b/apps/app/src/app/(protected)/events/Events.tsx index 16674bc..84e2dfa 100644 --- a/apps/app/src/app/(protected)/events/Events.tsx +++ b/apps/app/src/app/(protected)/events/Events.tsx @@ -15,52 +15,59 @@ const jobAttributes = [ ]; export const EventsLala = ({ events }: Props) => { + console.log('events', events); console.log('🚀 file: Events.tsx:8 events:', events); + return events ? ( - events.map(event => ( -
-
-
-

{event.event_header}!

-
- - {event.event_type} + events.map(event => { + const { location, roles } = event; + return ( +
+
+
+

{event.event_header}!

+
+ + {event.event_type} +
-
-

{event.description}

-

{event.event_name}

-

{event.address}

- {/*

{event.location_description}

*/} -

{event.coords.lng}

-

{event.coords.lat}

-

{event.place_id}

-

Jobs

- {/* table of roles */} - {event.roles?.length && ( -
- - - - {jobAttributes.map((key: string) => ( - - ))} +

+ {event.event_name}, {location.address} +

+

{event.description}

+

{event.event_name}

+

{location?.address}

+ {/*

{event.location_description}

*/} +

{location.coords.lng}

+

{location.coords.lat}

+

{location.place_id}

+

Jobs

+ {/* table of roles */} + {roles?.length && ( +
+
- {key} -
+ + + {jobAttributes.map((key: string) => ( + + ))} - - - - - {event.roles.map((role: any, index: any) => ( - - {Object.keys(role) - .filter((key: string) => jobAttributes.includes(key)) - .map((_key: string) => ( - - ))} - {/* + + + + {event.roles.map((role: any, index: any) => ( + + {Object.keys(role) + .filter((key: string) => jobAttributes.includes(key)) + .map((_key: string) => ( + + ))} + {/* */} - - ))} - -
+ {key} +
- {role[_key]} - +
+ {role[_key]} +
-
- )} + + ))} + + +
+ )} +
-
- )) + ); + }) ) : (
loading...
); diff --git a/apps/app/src/app/(protected)/events/create/form/event-info/validation.ts b/apps/app/src/app/(protected)/events/create/form/event-info/validation.ts index d9fadce..62b62da 100644 --- a/apps/app/src/app/(protected)/events/create/form/event-info/validation.ts +++ b/apps/app/src/app/(protected)/events/create/form/event-info/validation.ts @@ -39,7 +39,7 @@ export const eventDetailsSchema = yup.object().shape({ event_header: yup.string().min(3), event_name: stringNullable(yup.string().min(2)), event_type: yup.string().oneOf(Object.values(EventType)), - location: yup.string().min(3), + // location: yup.string().min(3), date: yup.date().min(new Date()), description: yup.string().min(3), // roles: yup.array().of(yup.string().min(2)), diff --git a/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx b/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx index 2870f8d..71da4ba 100644 --- a/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx +++ b/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx @@ -41,7 +41,7 @@ export const MapLocation = ({ setValue, address }: Props) => { { + setPin={position => { setPin(position); mapRef.current?.panTo(position); }} diff --git a/apps/app/src/app/(protected)/events/create/form/event-location/Places.tsx b/apps/app/src/app/(protected)/events/create/form/event-location/Places.tsx index 4c8a057..90cc521 100644 --- a/apps/app/src/app/(protected)/events/create/form/event-location/Places.tsx +++ b/apps/app/src/app/(protected)/events/create/form/event-location/Places.tsx @@ -12,7 +12,7 @@ import { IcreateEventSchema } from '../validation'; type PlacesProps = { // setOffice: (position: google.maps.LatLngLiteral) => void; - setOffice: (position: any) => void; + setPin: (position: any) => void; // setFormValue: UseFormSetValue; setValue: any; setZoom: any; @@ -20,7 +20,7 @@ type PlacesProps = { type GeocoderResult = google.maps.GeocoderResult; -export const Places = ({ setOffice, setValue: setFormValue, setZoom }: PlacesProps) => { +export const Places = ({ setPin, setValue: setFormValue, setZoom }: PlacesProps) => { const { ready, value, @@ -35,13 +35,14 @@ export const Places = ({ setOffice, setValue: setFormValue, setZoom }: PlacesPro const results = await getGeocode({ address: val }); console.log('🚀 file: places.tsx:30 results:', results); - const { formatted_address, place_id } = results[0]; + const { formatted_address, place_id, address_components } = results[0]; const { lat, lng } = getLatLng(results[0]); - setFormValue('address', formatted_address); - setFormValue('place_id', place_id); - setFormValue('coords', { lat, lng }); + setFormValue('location.address', formatted_address); + setFormValue('location.place_id', place_id); + setFormValue('location.coords', { lat, lng }); + setFormValue('location.name', address_components[0].short_name); - setOffice({ lat, lng }); + setPin({ lat, lng }); setZoom(18); }; diff --git a/apps/app/src/app/(protected)/events/create/form/event-location/index.tsx b/apps/app/src/app/(protected)/events/create/form/event-location/index.tsx index 6efd12f..1625d2d 100644 --- a/apps/app/src/app/(protected)/events/create/form/event-location/index.tsx +++ b/apps/app/src/app/(protected)/events/create/form/event-location/index.tsx @@ -38,7 +38,7 @@ export const EventLocation = ({ register, errors, setValue, address }: Props) => // prepend={info.prepend} /> - +
) : ( diff --git a/apps/app/src/app/(protected)/events/create/form/event-location/validation.ts b/apps/app/src/app/(protected)/events/create/form/event-location/validation.ts index e3d96d5..d69ab7e 100644 --- a/apps/app/src/app/(protected)/events/create/form/event-location/validation.ts +++ b/apps/app/src/app/(protected)/events/create/form/event-location/validation.ts @@ -58,14 +58,27 @@ type Coordinates = { lng: number; }; +// export const eventLocationSchema = yup.object().shape({ +// address: yup.string().min(10), +// place_id: yup.string().min(10), +// coords: yup.object().shape({ +// lat: yup.number(), +// lng: yup.number(), +// }), +// location_description: stringNullable(yup.string().min(5)), +// }); + export const eventLocationSchema = yup.object().shape({ - address: yup.string().min(10), - place_id: yup.string().min(10), - coords: yup.object().shape({ - lat: yup.number(), - lng: yup.number(), + location: yup.object().shape({ + address: yup.string().min(10), + place_id: yup.string().min(10), + coords: yup.object().shape({ + lat: yup.number(), + lng: yup.number(), + }), + description: stringNullable(yup.string().min(5)), }), - location_description: stringNullable(yup.string().min(5)), }); + export type IeventLocationSchema = yup.InferType; diff --git a/apps/app/src/app/(protected)/events/create/form/event-roles/index.tsx b/apps/app/src/app/(protected)/events/create/form/event-roles/index.tsx index f19fa8b..7bbf564 100644 --- a/apps/app/src/app/(protected)/events/create/form/event-roles/index.tsx +++ b/apps/app/src/app/(protected)/events/create/form/event-roles/index.tsx @@ -32,7 +32,7 @@ type Props = { export const EventRoles = ({ register, control, errors, setValue, getValues }: Props) => { const { currentUser } = useContext(CurrUserContext); const [saved, setSaved] = useState([]); - const selectOptions = ['Provided', 'Not Provided', 'Amount']; + const selectOptions = ['Not Provided', 'Provided', 'Amount']; // const [checked, setChecked] = useState(selectOptions[0]); const { fields, append, prepend, remove, swap, move, insert } = useFieldArray({ @@ -114,8 +114,8 @@ export const EventRoles = ({ register, control, errors, setValue, getValues }: P - {fields - .slice(0, saved.length) + {roles + ?.slice(0, saved.length) .map((field: IeventRoleSchema & { id: string }, index: any) => ( {Object.entries(field).map(([key, value]: [string, any]) => { diff --git a/apps/app/src/app/(protected)/events/create/form/index.tsx b/apps/app/src/app/(protected)/events/create/form/index.tsx index f6e8416..0855281 100644 --- a/apps/app/src/app/(protected)/events/create/form/index.tsx +++ b/apps/app/src/app/(protected)/events/create/form/index.tsx @@ -49,12 +49,7 @@ export const CreateEventForm = () => { } }, [isSubmitSuccessful, reset]); - const vals = getValues(); - console.log('🚀 file: index.tsx:50 vals:', vals); - const vals2 = watch(); - console.log('🚀 file: index.tsx:54 vals2:', vals2); - - const address = watch('address'); + const address = watch('location.address'); const onError = (errors: any, e: any) => { console.log('🚀 file: WorkInfo.tsx:52 data:', watch()); From 4c9da768f7cd358b6697511dedab31d915b7db35 Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sat, 13 Jan 2024 22:20:22 +0700 Subject: [PATCH 03/10] before map --- apps/app/src/app/(protected)/events/Events.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/app/src/app/(protected)/events/Events.tsx b/apps/app/src/app/(protected)/events/Events.tsx index 84e2dfa..4c95737 100644 --- a/apps/app/src/app/(protected)/events/Events.tsx +++ b/apps/app/src/app/(protected)/events/Events.tsx @@ -32,14 +32,12 @@ export const EventsLala = ({ events }: Props) => {

- {event.event_name}, {location.address} + {event.event_name},{' '} + {location.name}

+

{event.description}

-

{event.event_name}

-

{location?.address}

- {/*

{event.location_description}

*/} -

{location.coords.lng}

-

{location.coords.lat}

+

{location.place_id}

Jobs

{/* table of roles */} From 886d98d8eda491f7843df448bb7ebecee1d7dbb7 Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sat, 13 Jan 2024 22:38:50 +0700 Subject: [PATCH 04/10] implementing map view --- .../app/src/app/(protected)/events/Events.tsx | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/apps/app/src/app/(protected)/events/Events.tsx b/apps/app/src/app/(protected)/events/Events.tsx index 4c95737..6286c17 100644 --- a/apps/app/src/app/(protected)/events/Events.tsx +++ b/apps/app/src/app/(protected)/events/Events.tsx @@ -1,10 +1,15 @@ -import React from 'react'; +'use client'; + +import { GoogleMap, Marker } from '@react-google-maps/api'; +import React, { useCallback, useMemo, useRef } from 'react'; import { BiPurchaseTag } from 'react-icons/bi'; type Props = { events: any[]; }; +type MapOptions = google.maps.MapOptions; + const jobAttributes = [ 'role_type', 'days', @@ -18,6 +23,17 @@ export const EventsLala = ({ events }: Props) => { console.log('events', events); console.log('🚀 file: Events.tsx:8 events:', events); + const mapRef = useRef(); + const onLoad = useCallback(map => (mapRef.current = map), []); + const options = useMemo( + () => ({ + mapId: 'b34786d7e100891b', + disableDefaultUI: true, + zoomControl: true, + }), + [] + ); + return events ? ( events.map(event => { const { location, roles } = event; @@ -39,6 +55,32 @@ export const EventsLala = ({ events }: Props) => {

{event.description}

{location.place_id}

+ + {/* const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); */} + +
+ + {/* */} + +
+

Jobs

{/* table of roles */} {roles?.length && ( From b03f5a29c4c660c73069312b86940a6947a72168 Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sun, 14 Jan 2024 00:43:09 +0700 Subject: [PATCH 05/10] add .turbo to clean script --- .../app/src/app/(protected)/events/Events.tsx | 225 ++++++++++-------- .../form/event-location/MapLocation.tsx | 4 - apps/app/src/app/(protected)/events/page.tsx | 13 +- apps/app/src/firebase/clientApp.ts | 3 +- apps/firebase-cloud-functions/package.json | 2 +- 5 files changed, 136 insertions(+), 111 deletions(-) diff --git a/apps/app/src/app/(protected)/events/Events.tsx b/apps/app/src/app/(protected)/events/Events.tsx index 6286c17..42c7370 100644 --- a/apps/app/src/app/(protected)/events/Events.tsx +++ b/apps/app/src/app/(protected)/events/Events.tsx @@ -8,6 +8,8 @@ type Props = { events: any[]; }; +// const google = window.google; +type LatLngLiteral = google.maps.LatLngLiteral; type MapOptions = google.maps.MapOptions; const jobAttributes = [ @@ -19,115 +21,132 @@ const jobAttributes = [ // 'role_description', ]; -export const EventsLala = ({ events }: Props) => { - console.log('events', events); - console.log('🚀 file: Events.tsx:8 events:', events); +// export const EventsLala = ({ events }: Props) => { +export const EventsLala = () => { + // console.log('events', events); + // console.log('🚀 file: Events.tsx:8 events:', events); - const mapRef = useRef(); - const onLoad = useCallback(map => (mapRef.current = map), []); - const options = useMemo( - () => ({ - mapId: 'b34786d7e100891b', - disableDefaultUI: true, - zoomControl: true, - }), - [] + // const mapRef = useRef(); + // const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); + // // const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); + // const options = useMemo( + // // const options = useMemo( + // () => ({ + // mapId: 'b34786d7e100891b', + // disableDefaultUI: true, + // zoomControl: true, + // }), + // [] + // ); + + // const onLoad = useCallback(map => (mapRef.current = map), []); + + return ( + //
+ // + //
+
Here
); - return events ? ( - events.map(event => { - const { location, roles } = event; - return ( -
-
-
-

{event.event_header}!

-
- - {event.event_type} -
-
-

- {event.event_name},{' '} - {location.name} -

-
-

{event.description}

+ // return events ? ( + // events.map(event => { + // const { location, roles } = event; + // return ( + //
+ //
+ //
+ //

{event.event_header}!

+ //
+ // + // {event.event_type} + //
+ //
+ //

+ // {event.event_name},{' '} + // {location.name} + //

+ //
+ //

{event.description}

-

{location.place_id}

+ //

{location.place_id}

- {/* const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); */} + // {/* const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); */} -
- - {/* */} - -
+ //
+ // {/* + // + // */} + //
-

Jobs

- {/* table of roles */} - {roles?.length && ( -
- - - - {jobAttributes.map((key: string) => ( - - ))} + //

Jobs

+ // {/* table of roles */} + // {roles?.length && ( + //
+ //
- {key} -
+ // + // + // {jobAttributes.map((key: string) => ( + // + // ))} - - - - - {event.roles.map((role: any, index: any) => ( - - {Object.keys(role) - .filter((key: string) => jobAttributes.includes(key)) - .map((_key: string) => ( - - ))} - {/* */} - - ))} - -
+ // {key} + //
- {role[_key]} - - - -
-
- )} -
-
- ); - }) - ) : ( -
loading...
- ); + // + // + // + // + // {event.roles.map((role: any, index: any) => ( + // + // {Object.keys(role) + // .filter((key: string) => jobAttributes.includes(key)) + // .map((_key: string) => ( + // + // {role[_key]} + // + // ))} + // {/* + // + // + // */} + // + // ))} + // + // + //
+ // )} + //
+ //
+ // ); + // }) + // ) : ( + //
loading...
+ // ); }; diff --git a/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx b/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx index 71da4ba..4d2bda2 100644 --- a/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx +++ b/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx @@ -12,13 +12,9 @@ type LatLngLiteral = google.maps.LatLngLiteral; type MapOptions = google.maps.MapOptions; export const MapLocation = ({ setValue, address }: Props) => { - // const [office, setOffice] = useState(); const [pin, setPin] = useState<{ lat: number; lng: number }>({ lat: 13.736717, lng: 100.523186 }); - console.log('🚀 file: MapLocation.tsx:16 pin:', pin); const [zoom, setZoom] = useState(12); - // console.log('🚀 file: MapLocation.tsx:11 office:', office); const mapRef = useRef(); - // const bangkokCords = useMemo(() => ({ lat: 40, lng: -80 }), []); const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); const options = useMemo( () => ({ diff --git a/apps/app/src/app/(protected)/events/page.tsx b/apps/app/src/app/(protected)/events/page.tsx index 9729c10..6298bd9 100644 --- a/apps/app/src/app/(protected)/events/page.tsx +++ b/apps/app/src/app/(protected)/events/page.tsx @@ -8,7 +8,15 @@ type Props = {}; export default async function Events({}: Props) { const fetchDocs = getCloudFunction('fetchDocs'); - const { data } = await fetchDocs({ collectionName: 'events' }); + let data: any = {} + try { + const { data } = await fetchDocs({ collectionName: 'events' }); + console.log('🚀 data:', data) + + } catch (error) { + console.log('🚀 error:', error) + + } return (
@@ -18,7 +26,8 @@ export default async function Events({}: Props) { Create New Event
- + {/* */} +
); diff --git a/apps/app/src/firebase/clientApp.ts b/apps/app/src/firebase/clientApp.ts index 8ec688d..461602b 100644 --- a/apps/app/src/firebase/clientApp.ts +++ b/apps/app/src/firebase/clientApp.ts @@ -36,7 +36,8 @@ const getCloudFunction = (functionName: string) => { return returnedFunction; }; -if (process.env.NODE_ENV.match(/development/i) || window.location.hostname === 'localhost') { +// if (process.env.NODE_ENV.match(/development/i) || window.location.hostname === 'localhost') { +if (true) { connectAuthEmulator(auth, 'http://localhost:9099'); connectFirestoreEmulator(db, 'localhost', 8080); connectStorageEmulator(storage, 'localhost', 9199); diff --git a/apps/firebase-cloud-functions/package.json b/apps/firebase-cloud-functions/package.json index b1ede13..e64efc3 100644 --- a/apps/firebase-cloud-functions/package.json +++ b/apps/firebase-cloud-functions/package.json @@ -12,7 +12,7 @@ "emulatorsOLD": "firebase emulators:start", "emulators": "firebase emulators:start --import=emulator-data", "emulators_with_export": "firebase emulators:start --export-on-exit=emulator-data --import=emulator-data", - "clean": "rm -rf node_modules && rm -rf lib && rm -rf ui-debug.log", + "clean": "rm -rf node_modules && rm -rf lib && rm -rf ui-debug.log && rm -rf .turbo", "migrate-firesstore-not-tested": "firebase firestore:export emulator-data/firestore-export", "migrate-firestore": "./scripts/firestore-gcs-local.sh", "migrate-auth": "./scripts/auth-local.sh" From 0b4f2a211e2754a57701df70c3e6311a9f0e9645 Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sun, 14 Jan 2024 15:44:39 +0700 Subject: [PATCH 06/10] map working, new event data --- .../app/src/app/(protected)/events/Events.tsx | 249 +++++++++--------- apps/app/src/app/(protected)/events/page.tsx | 14 +- apps/app/src/firebase/clientApp.ts | 3 +- 3 files changed, 131 insertions(+), 135 deletions(-) diff --git a/apps/app/src/app/(protected)/events/Events.tsx b/apps/app/src/app/(protected)/events/Events.tsx index 42c7370..13d62ce 100644 --- a/apps/app/src/app/(protected)/events/Events.tsx +++ b/apps/app/src/app/(protected)/events/Events.tsx @@ -1,14 +1,14 @@ 'use client'; -import { GoogleMap, Marker } from '@react-google-maps/api'; +import { GoogleMap, Marker, useLoadScript } from '@react-google-maps/api'; import React, { useCallback, useMemo, useRef } from 'react'; import { BiPurchaseTag } from 'react-icons/bi'; +import { NotNull } from 'yup'; type Props = { events: any[]; }; -// const google = window.google; type LatLngLiteral = google.maps.LatLngLiteral; type MapOptions = google.maps.MapOptions; @@ -21,132 +21,137 @@ const jobAttributes = [ // 'role_description', ]; -// export const EventsLala = ({ events }: Props) => { -export const EventsLala = () => { - // console.log('events', events); - // console.log('🚀 file: Events.tsx:8 events:', events); +export const EventsLala = ({ events }: Props) => { + const { isLoaded } = useLoadScript({ + googleMapsApiKey: process.env.NEXT_PUBLIC_MAPS_API_KEY, + }); + console.log('🚀 events:', events); + console.log('🚀 isLoaded:', isLoaded); - // const mapRef = useRef(); - // const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); - // // const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); - // const options = useMemo( - // // const options = useMemo( - // () => ({ - // mapId: 'b34786d7e100891b', - // disableDefaultUI: true, - // zoomControl: true, - // }), - // [] - // ); - - // const onLoad = useCallback(map => (mapRef.current = map), []); - - return ( - //
- // - //
-
Here
+ const mapRef = useRef(); + const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); + const options = useMemo( + () => ({ + mapId: 'b34786d7e100891b', + disableDefaultUI: true, + zoomControl: true, + }), + [] ); - // return events ? ( - // events.map(event => { - // const { location, roles } = event; - // return ( - //
- //
- //
- //

{event.event_header}!

- //
- // - // {event.event_type} - //
- //
- //

- // {event.event_name},{' '} - // {location.name} - //

- //
- //

{event.description}

+ const onLoad = useCallback(map => (mapRef.current = map), []); - //

{location.place_id}

+ // return !google ? null : ( + // return isLoaded ? ( + //
+ // + //
+ // ) : null; - // {/* const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); */} + return events ? ( + events.map(event => { + const { location, roles } = event; + return ( +
+
+
+

{event.event_header}!

+
+ + {event.event_type} +
+
+

+ {event.event_name},{' '} + {location.name} +

+
+
+

{event.description}

- //
- // {/* - // - // */} - //
+ {isLoaded ? ( +
+ + + +
+ ) : ( +
Not loaded
+ )} +
- //

Jobs

- // {/* table of roles */} - // {roles?.length && ( - //
- // - // - // - // {jobAttributes.map((key: string) => ( - // - // ))} +

{location.place_id}

+

{location.place_id}

- // - // - // - // - // {event.roles.map((role: any, index: any) => ( - // - // {Object.keys(role) - // .filter((key: string) => jobAttributes.includes(key)) - // .map((_key: string) => ( - // - // ))} - // {/* */} - // - // ))} - // - //
- // {key} - //
- // {role[_key]} - // - // - // - //
- //
- // )} - //
- //
- // ); - // }) - // ) : ( - //
loading...
- // ); +

Jobs

+ {/* table of roles */} + {roles?.length && ( +
+ + + + {jobAttributes.map((key: string) => ( + + ))} + + + + + + {event.roles.map((role: any, index: any) => ( + + {Object.keys(role) + .filter((key: string) => jobAttributes.includes(key)) + .map((_key: string) => ( + + ))} + {/* */} + + ))} + +
+ {key} +
+ {role[_key]} + + + +
+
+ )} +
+
+ ); + }) + ) : ( +
loading...
+ ); }; diff --git a/apps/app/src/app/(protected)/events/page.tsx b/apps/app/src/app/(protected)/events/page.tsx index 6298bd9..08c4533 100644 --- a/apps/app/src/app/(protected)/events/page.tsx +++ b/apps/app/src/app/(protected)/events/page.tsx @@ -8,15 +8,8 @@ type Props = {}; export default async function Events({}: Props) { const fetchDocs = getCloudFunction('fetchDocs'); - let data: any = {} - try { - const { data } = await fetchDocs({ collectionName: 'events' }); - console.log('🚀 data:', data) - - } catch (error) { - console.log('🚀 error:', error) - - } + const { data } = await fetchDocs({ collectionName: 'events' }); + return (
@@ -26,8 +19,7 @@ export default async function Events({}: Props) { Create New Event
- {/* */} - +
); diff --git a/apps/app/src/firebase/clientApp.ts b/apps/app/src/firebase/clientApp.ts index 461602b..8ec688d 100644 --- a/apps/app/src/firebase/clientApp.ts +++ b/apps/app/src/firebase/clientApp.ts @@ -36,8 +36,7 @@ const getCloudFunction = (functionName: string) => { return returnedFunction; }; -// if (process.env.NODE_ENV.match(/development/i) || window.location.hostname === 'localhost') { -if (true) { +if (process.env.NODE_ENV.match(/development/i) || window.location.hostname === 'localhost') { connectAuthEmulator(auth, 'http://localhost:9099'); connectFirestoreEmulator(db, 'localhost', 8080); connectStorageEmulator(storage, 'localhost', 9199); From 7daa6aaa3ed9278323f16637dbb7668d53035a35 Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sun, 14 Jan 2024 16:59:24 +0700 Subject: [PATCH 07/10] update emul data, map works --- apps/app/public/pin_mint_trans.png | Bin 0 -> 13872 bytes apps/app/public/pin_pink_trans.png | Bin 0 -> 13767 bytes .../app/src/app/(protected)/events/Events.tsx | 13 ++++++------- .../form/event-location/MapLocation.tsx | 13 +++++++------ .../create/form/event-location/Places.tsx | 2 +- .../emulator-data/auth_export/accounts.json | 2 +- .../all_namespaces_all_kinds.export_metadata | Bin 52 -> 52 bytes .../all_namespaces/all_kinds/output-0 | Bin 5166 -> 4666 bytes .../firestore_export.overall_export_metadata | Bin 95 -> 95 bytes ...e => 57c87653-31ce-4fc7-98d5-aee5433d1ea4} | 0 ...4 => 6e238e03-5316-40ee-99ac-edc7d1a9225b} | Bin ...7 => d42e9df6-4147-4ee1-9a8b-ba1129388d43} | Bin ...c => d6586a72-a42e-49f3-b696-7287bc40bfa5} | Bin ...57c87653-31ce-4fc7-98d5-aee5433d1ea4.json} | 0 ...6e238e03-5316-40ee-99ac-edc7d1a9225b.json} | 0 ...d42e9df6-4147-4ee1-9a8b-ba1129388d43.json} | 0 ...d6586a72-a42e-49f3-b696-7287bc40bfa5.json} | 0 17 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 apps/app/public/pin_mint_trans.png create mode 100644 apps/app/public/pin_pink_trans.png rename apps/firebase-cloud-functions/emulator-data/storage_export/blobs/{2c415c47-19c0-48af-bd0a-d334cf291a2e => 57c87653-31ce-4fc7-98d5-aee5433d1ea4} (100%) rename apps/firebase-cloud-functions/emulator-data/storage_export/blobs/{b37d278e-7928-4a66-a2ae-28cc34cbd964 => 6e238e03-5316-40ee-99ac-edc7d1a9225b} (100%) rename apps/firebase-cloud-functions/emulator-data/storage_export/blobs/{28349024-8885-4ca8-9a48-cc09fb78cf07 => d42e9df6-4147-4ee1-9a8b-ba1129388d43} (100%) rename apps/firebase-cloud-functions/emulator-data/storage_export/blobs/{4867077c-4b6b-4b44-8c5f-6c3f0ddfe9fc => d6586a72-a42e-49f3-b696-7287bc40bfa5} (100%) rename apps/firebase-cloud-functions/emulator-data/storage_export/metadata/{2c415c47-19c0-48af-bd0a-d334cf291a2e.json => 57c87653-31ce-4fc7-98d5-aee5433d1ea4.json} (100%) rename apps/firebase-cloud-functions/emulator-data/storage_export/metadata/{b37d278e-7928-4a66-a2ae-28cc34cbd964.json => 6e238e03-5316-40ee-99ac-edc7d1a9225b.json} (100%) rename apps/firebase-cloud-functions/emulator-data/storage_export/metadata/{28349024-8885-4ca8-9a48-cc09fb78cf07.json => d42e9df6-4147-4ee1-9a8b-ba1129388d43.json} (100%) rename apps/firebase-cloud-functions/emulator-data/storage_export/metadata/{4867077c-4b6b-4b44-8c5f-6c3f0ddfe9fc.json => d6586a72-a42e-49f3-b696-7287bc40bfa5.json} (100%) diff --git a/apps/app/public/pin_mint_trans.png b/apps/app/public/pin_mint_trans.png new file mode 100644 index 0000000000000000000000000000000000000000..ba4584f2d6daf9fc37699ccd7541fcda5ff777c1 GIT binary patch literal 13872 zcmeIXXH-+$);|oQfYK~SQK?d;hF(Gw1T=K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--KLZ2U^<(3F3POB!w1l#@s}6`V-vMB5bbIpNys^gH z*GVHb`%^#@*YBtRggcZkxDIIka(ZzGp}#ayBWa>tQFGxIn-AoD{ZJFo#{CSxpe!a* zfd71g#P)3(QhHCC^Kq8});;>mx_<`tx8jsd)zo-ggIf__ij(enc0j7XXeAeDS9iK& zp)bp6PyQXCzfJY|ss*-+SFXOR4gwq&B;c5kg5GcJNL_6Rr1FA))6suX{Eachv=Q$9)LUnzXUJwc@YAe`n4=GU@x>f=w^a)n>fD2B}E|PBCWgt6$F_`K2H! z+kpBFYg9Ik<(>fU%QJTEOh;6r_7qjr?q+Vu+=JTtXL2=fcVm`wYU3~oTQlewOLoB zZn0ig$2`Xl|$ zOx$orYW645%fC|y2$I7%86^W^C%$QD${LtYI4McUu*2e-bZt|9NWJqv1A`P+6|f3% zvkK2={s;B=Pw|#BS`GI4|1SK11WEYa`W0@@v;|se99H`{V5Ki$?cI-oB^X+unfz`3 zA4N^(%6QxIR=smkJoK5Q-4#HC73!TC&fyI6Pp(ISyW0Pt2Sz5j$z22*L^>S+KpA?6 z{xcTJ2XT2x`eI#+7lHBg|GEKqex=ju$y|$2@HUCuMGMcf5B zN}m&7E~Rl8JV2#muFR@bkB!ffza#g5z2?@9k0#S8&i>Tz1IP;2Zn^U61dB{ep7|Mz z5;FnrE};^g-{t$yy7W1L=4u!GQ;r1pG?4rMQcg(;%rxY{1bXPrtieaj^(JgLpcm4e}2K;w`2u`;*29K}Kf9ujL=j1DTBI;3Pe-Wu;_ls?$l} f-;lu1GW39L>>K_H>dCFUq-Thlj%u;W&5-{OxHVI% literal 0 HcmV?d00001 diff --git a/apps/app/public/pin_pink_trans.png b/apps/app/public/pin_pink_trans.png new file mode 100644 index 0000000000000000000000000000000000000000..4fcb519cea8eb72e1cac2c147437a18abca9c956 GIT binary patch literal 13767 zcmeIXWmuG57dDKy0R|`*(j@{S48sgHlprD9priu~Au-4dT?!%~B{$M3NSCD4Fe)fr z(jXv8cO(7n!Mwlc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uM`>tZ?yM)^XJ(>(cfpt6 zmVSrE{4$`r8zh-ck_K_@0?G1N0lxtIVhf58P5s2wt9Ny@o`UOlt zJ#;U(m~;)&gvKM?m7OJdg!dr`oV!g1lS+A9lA0|`Q#z(E{|_|oreE0Ew(HV#&%m?7 zHbvtrN==CV(@cWd)tuVIk7$XnOQN(ZOm?<#YB6fv)81N9go9 z$U}Q0&ir=LFHS%-yx~w@3K!Sdn&}i~X68xJnWqK^%zIq+Gxfdhmw7i2X1YF{{uh13 z1*fE{Y$9DHC8bU9W^X|1Zk=(NyeA$K2+j%MM&thz0=sD`D|I?nTyIqU8Pxk^#1zU-j%qD94r2 ztT7oDwumrqRu`8J@T&mJ^oVgI?pv6t@&oO3KJemaH3ZrnD)`1?3ZB2;24mV0`3f!| zn%8BkE6%BE=HGB3t2hDnpC9>1Q0phfpBYvLR_3)uOSKMb&+SKlZvFgT7_(Ot-d`acbgI^93}iBeG}bgM3Rfko~mBp28@d1J=gMq_KZ1Q{0YNQO(SAb3N5`)m)=lpJbQ8gC zMfITMd(1x1=OLu82?)2|KU0KB{}w82 zg(Cs=ff3ckj9P5_^GZtATHet5ml0*9wR) { {isLoaded ? (
{ key='event_position' position={location.coords} icon={{ - // url: `/bear.svg`, - url: `/logo/logo-d-trans.png`, - origin: new google.maps.Point(0, 0), - anchor: new google.maps.Point(15, 15), - // scaledSize: new window.google.maps.Size(30, 30), - scaledSize: new google.maps.Size(50, 50), + // url: `/pin_mint_trans.png`, + url: `/pin_pink_trans.png`, + // origin: new google.maps.Point(0, 0), + // anchor: new google.maps.Point(15, 15), + scaledSize: new google.maps.Size(70, 70), }} /> diff --git a/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx b/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx index 4d2bda2..7eb7f02 100644 --- a/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx +++ b/apps/app/src/app/(protected)/events/create/form/event-location/MapLocation.tsx @@ -12,7 +12,8 @@ type LatLngLiteral = google.maps.LatLngLiteral; type MapOptions = google.maps.MapOptions; export const MapLocation = ({ setValue, address }: Props) => { - const [pin, setPin] = useState<{ lat: number; lng: number }>({ lat: 13.736717, lng: 100.523186 }); + // const [pin, setPin] = useState<{ lat: number; lng: number }>({ lat: 13.736717, lng: 100.523186 }); + const [pin, setPin] = useState<{ lat: number; lng: number }>(null); const [zoom, setZoom] = useState(12); const mapRef = useRef(); const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); @@ -56,12 +57,12 @@ export const MapLocation = ({ setValue, address }: Props) => { key={`lalalalla`} position={pin} icon={{ - // url: `/bear.svg`, - url: `/logo/logo-d-trans.png`, - origin: new window.google.maps.Point(0, 0), - anchor: new window.google.maps.Point(15, 15), + // url: `/logo/logo-d-trans.png`, + url: `/pin_pink_trans.png`, + // origin: new window.google.maps.Point(0, 0), + // anchor: new window.google.maps.Point(15, 15), // scaledSize: new window.google.maps.Size(30, 30), - scaledSize: new window.google.maps.Size(50, 50), + scaledSize: new window.google.maps.Size(90, 90), }} /> )} diff --git a/apps/app/src/app/(protected)/events/create/form/event-location/Places.tsx b/apps/app/src/app/(protected)/events/create/form/event-location/Places.tsx index 90cc521..2c9e97d 100644 --- a/apps/app/src/app/(protected)/events/create/form/event-location/Places.tsx +++ b/apps/app/src/app/(protected)/events/create/form/event-location/Places.tsx @@ -43,7 +43,7 @@ export const Places = ({ setPin, setValue: setFormValue, setZoom }: PlacesProps) setFormValue('location.name', address_components[0].short_name); setPin({ lat, lng }); - setZoom(18); + setZoom(15); }; return ( diff --git a/apps/firebase-cloud-functions/emulator-data/auth_export/accounts.json b/apps/firebase-cloud-functions/emulator-data/auth_export/accounts.json index bce3291..197c205 100644 --- a/apps/firebase-cloud-functions/emulator-data/auth_export/accounts.json +++ b/apps/firebase-cloud-functions/emulator-data/auth_export/accounts.json @@ -1 +1 @@ -{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"DI4Dx3YiiDonUcaz0UiiFjdCUkAU","createdAt":"1704033339723","lastLoginAt":"1704033339727","displayName":"Orange Chicken","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FDI4Dx3YiiDonUcaz0UiiFjdCUkAU%2Fimages%2Fprofile?alt=media&token=aaa55962-ac74-4b1d-8045-7c688f925cc4","customAttributes":"{\"basic_info_done\":true,\"type\":\"freelancer\"}","providerUserInfo":[{"providerId":"google.com","rawId":"6233296176568572704053954672800598602635","federatedId":"6233296176568572704053954672800598602635","displayName":"Orange Chicken","email":"orange.chicken.38@example.com","screenName":"chicken_orange"}],"validSince":"1704912488","email":"orange.chicken.38@example.com","emailVerified":true,"disabled":false},{"localId":"XobXVTMfKX21NwEP7V5LEuuX4q8u","createdAt":"1704023132744","lastLoginAt":"1704023132744","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FXobXVTMfKX21NwEP7V5LEuuX4q8u%2Fimages%2Fprofile?alt=media&token=be3f3bef-d833-4dd0-b275-11a58ec238a3","passwordHash":"fakeHash:salt=fakeSaltUu0sqgKGXdW18M52lrCJ:password=oooooo","salt":"fakeSaltUu0sqgKGXdW18M52lrCJ","passwordUpdatedAt":1704912488566,"customAttributes":"{\"basic_info_done\":true,\"type\":\"freelancer\"}","providerUserInfo":[{"providerId":"password","email":"oo@oo.oo","federatedId":"oo@oo.oo","rawId":"oo@oo.oo","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FXobXVTMfKX21NwEP7V5LEuuX4q8u%2Fimages%2Fprofile?alt=media&token=be3f3bef-d833-4dd0-b275-11a58ec238a3"}],"validSince":"1704912488","email":"oo@oo.oo","emailVerified":false,"disabled":false},{"localId":"qIsokoD9bxhWt2tcFdcNpAg0DPZb","createdAt":"1704107208217","lastLoginAt":"1704912527992","photoUrl":"https://storage.cloud.google.com/event-dee-staging.appspot.com/misc/profile-photo-placeholder.jpg","passwordHash":"fakeHash:salt=fakeSalth89eFQSxrdhCytX68Nxe:password=bbbbbb","salt":"fakeSalth89eFQSxrdhCytX68Nxe","passwordUpdatedAt":1704912488567,"customAttributes":"{\"basic_info_done\":true,\"type\":\"business\"}","providerUserInfo":[{"providerId":"password","email":"bb@bb.bb","federatedId":"bb@bb.bb","rawId":"bb@bb.bb","photoUrl":"https://storage.cloud.google.com/event-dee-staging.appspot.com/misc/profile-photo-placeholder.jpg"}],"validSince":"1704912488","email":"bb@bb.bb","emailVerified":false,"disabled":false,"lastRefreshAt":"2024-01-10T18:48:58.614Z"}]} \ No newline at end of file +{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"DI4Dx3YiiDonUcaz0UiiFjdCUkAU","createdAt":"1704033339723","lastLoginAt":"1704033339727","displayName":"Orange Chicken","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FDI4Dx3YiiDonUcaz0UiiFjdCUkAU%2Fimages%2Fprofile?alt=media&token=aaa55962-ac74-4b1d-8045-7c688f925cc4","customAttributes":"{\"basic_info_done\":true,\"type\":\"freelancer\"}","providerUserInfo":[{"providerId":"google.com","rawId":"6233296176568572704053954672800598602635","federatedId":"6233296176568572704053954672800598602635","displayName":"Orange Chicken","email":"orange.chicken.38@example.com","screenName":"chicken_orange"}],"validSince":"1705214817","email":"orange.chicken.38@example.com","emailVerified":true,"disabled":false},{"localId":"XobXVTMfKX21NwEP7V5LEuuX4q8u","createdAt":"1704023132744","lastLoginAt":"1704023132744","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FXobXVTMfKX21NwEP7V5LEuuX4q8u%2Fimages%2Fprofile?alt=media&token=be3f3bef-d833-4dd0-b275-11a58ec238a3","passwordHash":"fakeHash:salt=fakeSaltUu0sqgKGXdW18M52lrCJ:password=oooooo","salt":"fakeSaltUu0sqgKGXdW18M52lrCJ","passwordUpdatedAt":1705214817929,"customAttributes":"{\"basic_info_done\":true,\"type\":\"freelancer\"}","providerUserInfo":[{"providerId":"password","email":"oo@oo.oo","federatedId":"oo@oo.oo","rawId":"oo@oo.oo","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FXobXVTMfKX21NwEP7V5LEuuX4q8u%2Fimages%2Fprofile?alt=media&token=be3f3bef-d833-4dd0-b275-11a58ec238a3"}],"validSince":"1705214817","email":"oo@oo.oo","emailVerified":false,"disabled":false},{"localId":"qIsokoD9bxhWt2tcFdcNpAg0DPZb","createdAt":"1704107208217","lastLoginAt":"1704912527992","photoUrl":"https://storage.cloud.google.com/event-dee-staging.appspot.com/misc/profile-photo-placeholder.jpg","passwordHash":"fakeHash:salt=fakeSalth89eFQSxrdhCytX68Nxe:password=bbbbbb","salt":"fakeSalth89eFQSxrdhCytX68Nxe","passwordUpdatedAt":1705214817929,"customAttributes":"{\"basic_info_done\":true,\"type\":\"business\"}","providerUserInfo":[{"providerId":"password","email":"bb@bb.bb","federatedId":"bb@bb.bb","rawId":"bb@bb.bb","photoUrl":"https://storage.cloud.google.com/event-dee-staging.appspot.com/misc/profile-photo-placeholder.jpg"}],"validSince":"1705214817","email":"bb@bb.bb","emailVerified":false,"disabled":false}]} \ No newline at end of file diff --git a/apps/firebase-cloud-functions/emulator-data/firestore_export/all_namespaces/all_kinds/all_namespaces_all_kinds.export_metadata b/apps/firebase-cloud-functions/emulator-data/firestore_export/all_namespaces/all_kinds/all_namespaces_all_kinds.export_metadata index 2780b6794134d6ccde424d68c7670c1b7508282f..bb0c487ebf2e4e36f86b311ee46fb7f8528b6053 100644 GIT binary patch delta 35 ocmXppnII;2ea`u%cbb_cb}X0&W(e_cF$i(wmzETimgpJ)01Y(_ssI20 delta 35 mcmXppnII-N<>%LZmz$X-mb`{Agm}0ZggEj`OA1O$bPWI{OAf*S diff --git a/apps/firebase-cloud-functions/emulator-data/firestore_export/all_namespaces/all_kinds/output-0 b/apps/firebase-cloud-functions/emulator-data/firestore_export/all_namespaces/all_kinds/output-0 index 67f38db5fa6e6ab334009a046a45a4277cf70642..4447bbc21bdee0c85dc83dab6fd90b8db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XCqXza1^#HEQm{w%BtyHo&I>jymm delta 23 ecma!#=h>0#;>XCqXv~_r!G0o-KMR|}It>6zSOxq5 diff --git a/apps/firebase-cloud-functions/emulator-data/storage_export/blobs/2c415c47-19c0-48af-bd0a-d334cf291a2e b/apps/firebase-cloud-functions/emulator-data/storage_export/blobs/57c87653-31ce-4fc7-98d5-aee5433d1ea4 similarity index 100% rename from apps/firebase-cloud-functions/emulator-data/storage_export/blobs/2c415c47-19c0-48af-bd0a-d334cf291a2e rename to apps/firebase-cloud-functions/emulator-data/storage_export/blobs/57c87653-31ce-4fc7-98d5-aee5433d1ea4 diff --git a/apps/firebase-cloud-functions/emulator-data/storage_export/blobs/b37d278e-7928-4a66-a2ae-28cc34cbd964 b/apps/firebase-cloud-functions/emulator-data/storage_export/blobs/6e238e03-5316-40ee-99ac-edc7d1a9225b similarity index 100% rename from apps/firebase-cloud-functions/emulator-data/storage_export/blobs/b37d278e-7928-4a66-a2ae-28cc34cbd964 rename to apps/firebase-cloud-functions/emulator-data/storage_export/blobs/6e238e03-5316-40ee-99ac-edc7d1a9225b diff --git a/apps/firebase-cloud-functions/emulator-data/storage_export/blobs/28349024-8885-4ca8-9a48-cc09fb78cf07 b/apps/firebase-cloud-functions/emulator-data/storage_export/blobs/d42e9df6-4147-4ee1-9a8b-ba1129388d43 similarity index 100% rename from apps/firebase-cloud-functions/emulator-data/storage_export/blobs/28349024-8885-4ca8-9a48-cc09fb78cf07 rename to apps/firebase-cloud-functions/emulator-data/storage_export/blobs/d42e9df6-4147-4ee1-9a8b-ba1129388d43 diff --git a/apps/firebase-cloud-functions/emulator-data/storage_export/blobs/4867077c-4b6b-4b44-8c5f-6c3f0ddfe9fc b/apps/firebase-cloud-functions/emulator-data/storage_export/blobs/d6586a72-a42e-49f3-b696-7287bc40bfa5 similarity index 100% rename from apps/firebase-cloud-functions/emulator-data/storage_export/blobs/4867077c-4b6b-4b44-8c5f-6c3f0ddfe9fc rename to apps/firebase-cloud-functions/emulator-data/storage_export/blobs/d6586a72-a42e-49f3-b696-7287bc40bfa5 diff --git a/apps/firebase-cloud-functions/emulator-data/storage_export/metadata/2c415c47-19c0-48af-bd0a-d334cf291a2e.json b/apps/firebase-cloud-functions/emulator-data/storage_export/metadata/57c87653-31ce-4fc7-98d5-aee5433d1ea4.json similarity index 100% rename from apps/firebase-cloud-functions/emulator-data/storage_export/metadata/2c415c47-19c0-48af-bd0a-d334cf291a2e.json rename to apps/firebase-cloud-functions/emulator-data/storage_export/metadata/57c87653-31ce-4fc7-98d5-aee5433d1ea4.json diff --git a/apps/firebase-cloud-functions/emulator-data/storage_export/metadata/b37d278e-7928-4a66-a2ae-28cc34cbd964.json b/apps/firebase-cloud-functions/emulator-data/storage_export/metadata/6e238e03-5316-40ee-99ac-edc7d1a9225b.json similarity index 100% rename from apps/firebase-cloud-functions/emulator-data/storage_export/metadata/b37d278e-7928-4a66-a2ae-28cc34cbd964.json rename to apps/firebase-cloud-functions/emulator-data/storage_export/metadata/6e238e03-5316-40ee-99ac-edc7d1a9225b.json diff --git a/apps/firebase-cloud-functions/emulator-data/storage_export/metadata/28349024-8885-4ca8-9a48-cc09fb78cf07.json b/apps/firebase-cloud-functions/emulator-data/storage_export/metadata/d42e9df6-4147-4ee1-9a8b-ba1129388d43.json similarity index 100% rename from apps/firebase-cloud-functions/emulator-data/storage_export/metadata/28349024-8885-4ca8-9a48-cc09fb78cf07.json rename to apps/firebase-cloud-functions/emulator-data/storage_export/metadata/d42e9df6-4147-4ee1-9a8b-ba1129388d43.json diff --git a/apps/firebase-cloud-functions/emulator-data/storage_export/metadata/4867077c-4b6b-4b44-8c5f-6c3f0ddfe9fc.json b/apps/firebase-cloud-functions/emulator-data/storage_export/metadata/d6586a72-a42e-49f3-b696-7287bc40bfa5.json similarity index 100% rename from apps/firebase-cloud-functions/emulator-data/storage_export/metadata/4867077c-4b6b-4b44-8c5f-6c3f0ddfe9fc.json rename to apps/firebase-cloud-functions/emulator-data/storage_export/metadata/d6586a72-a42e-49f3-b696-7287bc40bfa5.json From e63debcfdfceaa15625bbf7e9a0eec8df3a55f3c Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sun, 14 Jan 2024 17:02:36 +0700 Subject: [PATCH 08/10] cleanup --- .../app/src/app/(protected)/events/Events.tsx | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/apps/app/src/app/(protected)/events/Events.tsx b/apps/app/src/app/(protected)/events/Events.tsx index 5bef1bc..4a11f06 100644 --- a/apps/app/src/app/(protected)/events/Events.tsx +++ b/apps/app/src/app/(protected)/events/Events.tsx @@ -3,7 +3,6 @@ import { GoogleMap, Marker, useLoadScript } from '@react-google-maps/api'; import React, { useCallback, useMemo, useRef } from 'react'; import { BiPurchaseTag } from 'react-icons/bi'; -import { NotNull } from 'yup'; type Props = { events: any[]; @@ -12,24 +11,14 @@ type Props = { type LatLngLiteral = google.maps.LatLngLiteral; type MapOptions = google.maps.MapOptions; -const jobAttributes = [ - 'role_type', - 'days', - 'hours_per_day', - 'number_workers', - 'hourly', - // 'role_description', -]; +const jobAttributes = ['', 'days', 'hours_per_day', 'number_workers', 'hourly']; export const EventsLala = ({ events }: Props) => { const { isLoaded } = useLoadScript({ googleMapsApiKey: process.env.NEXT_PUBLIC_MAPS_API_KEY, }); - console.log('🚀 events:', events); - console.log('🚀 isLoaded:', isLoaded); const mapRef = useRef(); - const bangkokCords = useMemo(() => ({ lat: 13.736717, lng: 100.523186 }), []); const options = useMemo( () => ({ mapId: 'b34786d7e100891b', @@ -41,18 +30,6 @@ export const EventsLala = ({ events }: Props) => { const onLoad = useCallback(map => (mapRef.current = map), []); - // return !google ? null : ( - // return isLoaded ? ( - //
- // - //
- // ) : null; - return events ? ( events.map(event => { const { location, roles } = event; @@ -79,7 +56,6 @@ export const EventsLala = ({ events }: Props) => { @@ -87,10 +63,7 @@ export const EventsLala = ({ events }: Props) => { key='event_position' position={location.coords} icon={{ - // url: `/pin_mint_trans.png`, url: `/pin_pink_trans.png`, - // origin: new google.maps.Point(0, 0), - // anchor: new google.maps.Point(15, 15), scaledSize: new google.maps.Size(70, 70), }} /> From 37f8a086d168c3d2c3352cd3116ed634cff92cd9 Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sun, 14 Jan 2024 17:12:27 +0700 Subject: [PATCH 09/10] fix roles --- .../app/src/app/(protected)/events/Events.tsx | 44 ++++++++++++++----- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/apps/app/src/app/(protected)/events/Events.tsx b/apps/app/src/app/(protected)/events/Events.tsx index 4a11f06..88df2f2 100644 --- a/apps/app/src/app/(protected)/events/Events.tsx +++ b/apps/app/src/app/(protected)/events/Events.tsx @@ -11,7 +11,30 @@ type Props = { type LatLngLiteral = google.maps.LatLngLiteral; type MapOptions = google.maps.MapOptions; -const jobAttributes = ['', 'days', 'hours_per_day', 'number_workers', 'hourly']; +const jobAttributes = [ + { + title: '', + field_name: 'role_type', + }, + { + title: 'Days', + field_name: 'days', + }, + { + title: 'Hours', + field_name: 'hours_per_day', + }, + { + title: 'Qty.', + field_name: 'number_workers', + }, + { + title: 'Hourly', + field_name: 'hourly', + }, +]; + +// 'role_type', 'days', 'hours_per_day', 'number_workers', 'hourly']; export const EventsLala = ({ events }: Props) => { const { isLoaded } = useLoadScript({ @@ -74,9 +97,6 @@ export const EventsLala = ({ events }: Props) => { )}
-

{location.place_id}

-

{location.place_id}

-

Jobs

{/* table of roles */} {roles?.length && ( @@ -84,9 +104,9 @@ export const EventsLala = ({ events }: Props) => { - {jobAttributes.map((key: string) => ( - ))} @@ -97,10 +117,12 @@ export const EventsLala = ({ events }: Props) => { {event.roles.map((role: any, index: any) => ( {Object.keys(role) - .filter((key: string) => jobAttributes.includes(key)) - .map((_key: string) => ( - ))} {/*
- {key} + {jobAttributes.map((attr: any) => ( + + {attr.title}
- {role[_key]} + .filter((key: string) => + jobAttributes.map(attr => attr.field_name).includes(key) + ) + .map((field_name: string) => ( + + {role[field_name]} From 9e9c40889990135ec4b9980c84c17ff61369d0d6 Mon Sep 17 00:00:00 2001 From: AndyOoh Date: Sun, 14 Jan 2024 17:16:52 +0700 Subject: [PATCH 10/10] map link --- apps/app/src/app/(protected)/events/Events.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/app/src/app/(protected)/events/Events.tsx b/apps/app/src/app/(protected)/events/Events.tsx index 88df2f2..4039045 100644 --- a/apps/app/src/app/(protected)/events/Events.tsx +++ b/apps/app/src/app/(protected)/events/Events.tsx @@ -71,13 +71,19 @@ export const EventsLala = ({ events }: Props) => { {location.name}
-
-

{event.description}

+
+
+

{event.description}

+
+

{location.address}

+ See Map +
+
{isLoaded ? (