From 3e41b21f3ad78289a343dc0b9ea51831e3266356 Mon Sep 17 00:00:00 2001 From: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Date: Fri, 23 Feb 2024 21:30:38 -0500 Subject: [PATCH] Release v1.10.2 (#322) * Feature/revamp card (#135) * Feature/update backend setup on developer md (#104) * Ignore local IDE config * Update backend setup guidelines on developer.md * Add supabase config guidelines * Fix md syntax * add CORS to edge func depending on the staging env * add reply-to header to both contact email (#109) * Feature/refactor search hook (#96) * Refactor search hook in referral page * Refactor referee search hook * Remove useless import * Refactor referee post * Refactor referrer post search hook * Remmove uesless import * Change to error toast (#106) Co-authored-by: Pjaijai --------- Co-authored-by: Pjaijai * create new card component for referrer and referee; update card skeleton; add missing modules in tailwind * add referral post card; update referral post pages * update contact toUuid; minor ui fix * add items-center to info display * Show edit button on profile page if logged-in user is profile user * Fix build error * Fix typos * Import as module path * Module import * Using Link instead of onurlclick * Fix import * Remove id slug user page * Remove showEditButton props --------- Co-authored-by: Lulu <76647602+511234@users.noreply.github.com> Co-authored-by: Thomas Yau Co-authored-by: Thomas Yau Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai Co-authored-by: Lulu Tung * Refactor/fix all formart problem (#142) * Fix doc * Fix format --------- Co-authored-by: Pjaijai * Feature/contributors page (#174) * fix file name * Adding reminder message to contact dialog (#181) Co-authored-by: Pjaijai * Feature/Adding contributor (#180) * Adding contributor * Fix error --------- Co-authored-by: Pjaijai * Refactor/refactor use search post and api (#171) * Adding max words length * Feature/config email testing on local environment (#138) * Remove (#92) Co-authored-by: Pjaijai * [#137] Config email testing on local environment * Fix .env variable name --------- Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai * Feature/cc sender when sending email (#140) * Add sender email to cc * Updating reminder text in contact dialog --------- Co-authored-by: Pjaijai * Feature/adding type from supabase (#124) * Adding supabase type * Adding workflow files * fix types --------- Co-authored-by: Pjaijai * Feature/Adding initial data (#125) * Adding initial data * Update * update st johns value * Update * Fix typo --------- Co-authored-by: Pjaijai * Feature/revamp card (#135) * Feature/update backend setup on developer md (#104) * Ignore local IDE config * Update backend setup guidelines on developer.md * Add supabase config guidelines * Fix md syntax * add CORS to edge func depending on the staging env * add reply-to header to both contact email (#109) * Feature/refactor search hook (#96) * Refactor search hook in referral page * Refactor referee search hook * Remove useless import * Refactor referee post * Refactor referrer post search hook * Remmove uesless import * Change to error toast (#106) Co-authored-by: Pjaijai --------- Co-authored-by: Pjaijai * create new card component for referrer and referee; update card skeleton; add missing modules in tailwind * add referral post card; update referral post pages * update contact toUuid; minor ui fix * add items-center to info display * Show edit button on profile page if logged-in user is profile user * Fix build error * Fix typos * Import as module path * Module import * Using Link instead of onurlclick * Fix import * Remove id slug user page * Remove showEditButton props --------- Co-authored-by: Lulu <76647602+511234@users.noreply.github.com> Co-authored-by: Thomas Yau Co-authored-by: Thomas Yau Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai Co-authored-by: Lulu Tung * Refactor/fix all formart problem (#142) * Fix doc * Fix format --------- Co-authored-by: Pjaijai * Hotfix/fix post duplication (#144) * Fix IUserResponse type * Fix api * Fix type * Fix api * House keep * Fetch 3 per page in search referral api * Fix search post api * House keep * fix type * fix format * Fix number of order per page --------- Co-authored-by: Pjaijai * Feature/adding tailwind plugin (#145) * Adding prettier-plugin-tailwindcss and prettier * Fixing formart --------- Co-authored-by: Pjaijai * Bugfix/Card UI (#160) * fix card ui bugs; modify the contact button of referral post card in mobile * chaneg relative paths to absolute * Bugfix/fix contact dialog text (#156) * Fix text * fix text --------- Co-authored-by: Pjaijai * Fix UI (#163) Co-authored-by: Pjaijai * Add word break (#162) Co-authored-by: Pjaijai * Doc/adding local db dev guidelines (#146) * Updating docs for backend local dev * Fix typo * House keep * fix typo --------- Co-authored-by: Pjaijai * version bump to 1.4.0 (#167) Co-authored-by: Pjaijai * create ISearchPostsRequest * Refactor * Adding year of experience min and max * House keep * Feature/config email testing on local environment (#138) * Remove (#92) Co-authored-by: Pjaijai * [#137] Config email testing on local environment * Fix .env variable name --------- Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai * Feature/revamp card (#135) * Feature/update backend setup on developer md (#104) * Ignore local IDE config * Update backend setup guidelines on developer.md * Add supabase config guidelines * Fix md syntax * add CORS to edge func depending on the staging env * add reply-to header to both contact email (#109) * Feature/refactor search hook (#96) * Refactor search hook in referral page * Refactor referee search hook * Remove useless import * Refactor referee post * Refactor referrer post search hook * Remmove uesless import * Change to error toast (#106) Co-authored-by: Pjaijai --------- Co-authored-by: Pjaijai * create new card component for referrer and referee; update card skeleton; add missing modules in tailwind * add referral post card; update referral post pages * update contact toUuid; minor ui fix * add items-center to info display * Show edit button on profile page if logged-in user is profile user * Fix build error * Fix typos * Import as module path * Module import * Using Link instead of onurlclick * Fix import * Remove id slug user page * Remove showEditButton props --------- Co-authored-by: Lulu <76647602+511234@users.noreply.github.com> Co-authored-by: Thomas Yau Co-authored-by: Thomas Yau Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai Co-authored-by: Lulu Tung * Refactor/fix all formart problem (#142) * Fix doc * Fix format --------- Co-authored-by: Pjaijai * Refactor/fixing site config and using common layout (#172) * Rename search page layout to common page layout * refactor common layout * Using common layout * Remove margin top in create post template --------- Co-authored-by: Pjaijai * version bump (#175) Co-authored-by: Pjaijai --------- Co-authored-by: Pjaijai Co-authored-by: Lulu <76647602+511234@users.noreply.github.com> Co-authored-by: marukosy124 <54564324+marukosy124@users.noreply.github.com> Co-authored-by: Thomas Yau Co-authored-by: Thomas Yau Co-authored-by: Lulu Tung * Feature/post detail page (#183) * Adding max words length * Feature/config email testing on local environment (#138) * Remove (#92) Co-authored-by: Pjaijai * [#137] Config email testing on local environment * Fix .env variable name --------- Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai * Feature/cc sender when sending email (#140) * Add sender email to cc * Updating reminder text in contact dialog --------- Co-authored-by: Pjaijai * Feature/adding type from supabase (#124) * Adding supabase type * Adding workflow files * fix types --------- Co-authored-by: Pjaijai * Feature/Adding initial data (#125) * Adding initial data * Update * update st johns value * Update * Fix typo --------- Co-authored-by: Pjaijai * Feature/revamp card (#135) * Feature/update backend setup on developer md (#104) * Ignore local IDE config * Update backend setup guidelines on developer.md * Add supabase config guidelines * Fix md syntax * add CORS to edge func depending on the staging env * add reply-to header to both contact email (#109) * Feature/refactor search hook (#96) * Refactor search hook in referral page * Refactor referee search hook * Remove useless import * Refactor referee post * Refactor referrer post search hook * Remmove uesless import * Change to error toast (#106) Co-authored-by: Pjaijai --------- Co-authored-by: Pjaijai * create new card component for referrer and referee; update card skeleton; add missing modules in tailwind * add referral post card; update referral post pages * update contact toUuid; minor ui fix * add items-center to info display * Show edit button on profile page if logged-in user is profile user * Fix build error * Fix typos * Import as module path * Module import * Using Link instead of onurlclick * Fix import * Remove id slug user page * Remove showEditButton props --------- Co-authored-by: Lulu <76647602+511234@users.noreply.github.com> Co-authored-by: Thomas Yau Co-authored-by: Thomas Yau Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai Co-authored-by: Lulu Tung * Refactor/fix all formart problem (#142) * Fix doc * Fix format --------- Co-authored-by: Pjaijai * Hotfix/fix post duplication (#144) * Fix IUserResponse type * Fix api * Fix type * Fix api * House keep * Fetch 3 per page in search referral api * Fix search post api * House keep * fix type * fix format * Fix number of order per page --------- Co-authored-by: Pjaijai * Feature/adding tailwind plugin (#145) * Adding prettier-plugin-tailwindcss and prettier * Fixing formart --------- Co-authored-by: Pjaijai * Bugfix/Card UI (#160) * fix card ui bugs; modify the contact button of referral post card in mobile * chaneg relative paths to absolute * Bugfix/fix contact dialog text (#156) * Fix text * fix text --------- Co-authored-by: Pjaijai * Fix UI (#163) Co-authored-by: Pjaijai * Add word break (#162) Co-authored-by: Pjaijai * Doc/adding local db dev guidelines (#146) * Updating docs for backend local dev * Fix typo * House keep * fix typo --------- Co-authored-by: Pjaijai * version bump to 1.4.0 (#167) Co-authored-by: Pjaijai * add post details page * fix page status layout bugs * Rename params from postId to uuid * refactor get post api and hook * Rename post status enum * Fixing type * Add post status enum migration file * Refactoring ReferralTypeZh * Refactoring nested conditional components mounting * Add doc * Remove useless line * fix card height inconsistent bug; fix post header floating bug; update CollapsibleTextWrapper to only show expand button when needed --------- Co-authored-by: Pjaijai Co-authored-by: Lulu <76647602+511234@users.noreply.github.com> Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Thomas Yau Co-authored-by: Thomas Yau Co-authored-by: Lulu Tung * Feature/Simplify referral post card (#185) * Simplify referral -post card * Clicking avatar redirect to user profile * fix links on card not clickable issue; fix tooltip no center-aligned issue --------- Co-authored-by: Pjaijai Co-authored-by: marukosy124 * Fix layout (#187) Co-authored-by: Pjaijai * Feature/remove referee post page (#186) * Remove post referee * House keep * Remove type input in post cerate page * Remove badge * Remove post referee * House keep * House keep * House keep * Move post component to post module --------- Co-authored-by: Pjaijai * Refactor/update post types (#188) * Update type * Fix type casting --------- Co-authored-by: Pjaijai * Refactor/update post types (#189) * Update type * Fix type casting * fix types --------- Co-authored-by: Pjaijai * Feature/create post history page (#193) * create page * Create listPostByUserUuid api * Create type * Create list post api hook * Create post * Add no isloading * Fix skeleton folder name and import path * Fix IReferralPostCardProps * Remove fragment from ReferralPostCard * Adding status to PostHeader * Rename created At helper * Rename created at * Create formate date helper * create post history card * Format * Remove lines * Add buttons to post history card * House keep * Adding skeleton * house keep * house keep --------- Co-authored-by: Pjaijai * Fix doc (#195) Co-authored-by: Pjaijai * Update DEVELOPER.md regarding the supabase development setup (#196) Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> * Fix margin (#202) Co-authored-by: Pjaijai * Feature/updating contact through post api (#198) * Update env template * Update api * Fix typo * Fix text --------- Co-authored-by: Pjaijai * Use search params on filtering values (#203) * Use search params on filtering values * add missing handleSubmitChange function in post referee template * add missing key press function in post referee template * move confirm button out of the search component * update contributor list * fix build error in post referee template * Feature/edit post (#197) * create edit page * Create edit post template * adding uuid * House keep * Refactor post validation * Update edit post validation schema * Fix type * fix status validation * Fix select * Update edit post page * Adding setting initial value * Remove line * Make status select * Rename hook post list * Create update post api * House keep * Add user return hook * Add update post policy migration file * addd error hanlding * Redirect to post detail page * House keep * House keep * Adding create_on_post_update_function_and_trigger * Fix path --------- Co-authored-by: Pjaijai * Feature/progressive web app (#192) * Bug: These 2 files exist for no reason * Feat: Added PWA configuration * Feat: Adding manifest,json and icon * Revert "Bug: These 2 files exist for no reason" This reverts commit b0b1fe0f7296a74cc36cacea18d0972e098fd937. * Fix skeleton file name * install next pwa * Adding config * Fix manifest * Add git config * Feat: Added _document.js and added manifest in layout.tsx * Update images and manifest * Rename pwa config * Update _document --------- Co-authored-by: Pjaijai Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> * Feature/adding site name to edit post page (#206) * House keep * Adding edit post in site config * Adding page name to edit page --------- Co-authored-by: Pjaijai * Feature/fix pwa structure (#208) * [#192] Set default color from _document.js Fix the ul li key warning * [#207] Fix the ul li key warning as well * Add myself as a contributor * Fix format --------- Co-authored-by: Pjaijai Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> * Refactor/improve typing (#210) * [#192] Set default color from _document.js Fix the ul li key warning * [#207] Fix the ul li key warning as well * Add myself as a contributor * [#209] Simplify countryList, provinceList, cityList and industryList related logic Remove unnecessary `as` usage in code * Fix format --------- Co-authored-by: Pjaijai * Feature/seo optimization (#212) * Add metedata keywords * Add generateMetadata to SSR pages - Move profile templates to a separate file for client-side rendering * Show not found if userUuid is null on profile page * Clean code * Add noindex & nofollow to policy & tnc pages * Remove next/babel extension * Fix build issues * Add spacing to clickable elements to enhance SEO * Improve accessibility by adding discernible text * Edit contributor page * Fix import as amended in latest dev branch * fix typo * Adding key words --------- Co-authored-by: Pjaijai * Feature/add contributor (#214) * add contributor (ken tung) * update some formatting * Refactor/post (#200) * update post details page ui; add contact button; unify created at formatting * update post details info components * Fix format * Fix merge mistake * Adding edit post redirect link in post history card * Refactor post view template --------- Co-authored-by: Pjaijai * Feature/post history page button in profile page (#215) * Adding site config * Adding post history page title * House keep * Adding history icon * Adding post history button to profile page * Adding metadata * House keep * Fix seo metadata generation problem --------- Co-authored-by: Pjaijai * Feature/block sending email if post is closed (#216) * Creating post status enum * Blocking action if post is closed * Hide button if the post is closed --------- Co-authored-by: Pjaijai * Fix type * [#205] Fix Edit Post bug (#219) * [#205] Remove useEffect in edit post for reset url Improve type * Fix format --------- Co-authored-by: Pjaijai Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> * Feature/Adding user profile url to email template (#199) * Adding user profile url to email template * Fix text * Fix typo --------- Co-authored-by: Pjaijai * Version bump * Fix text (#225) Co-authored-by: Pjaijai * Adding gap (#222) Co-authored-by: Pjaijai * Feature/error boundary (#218) * Add root error boundary * add myself as contributor * [Issue #226] Bugfix/post-card-ui (#227) * fix issue #226 * fix validateDOMNesting issues --------- Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> * Feature/redirect to post detail page after creating (#230) * Return data after insert * Redirect to post detail page * Select uuid only --------- Co-authored-by: Pjaijai * Refactor/navbar UI issues (#232) * center-align navbar items * hide duplicate dropdown menu items; change logout text to red * also hide them on root route * add myself to contributors * Adding text (#236) Co-authored-by: Pjaijai * Fix showing logic (#237) Co-authored-by: Pjaijai * Fix user profile url * add global loading placeholder during rendering (#229) * add global loading placeholder during rendering * update to use spinner --------- Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> * Doc/update sql script for create user in local (#233) * Update doc * Add local mail box * Update * Fix format * fix typo * doc: Updated local backend instuction for magic link * doc: Found the problem of the redirect_to problem, updated DEVELOPER.md * Updated .env.template --------- Co-authored-by: Pjaijai Co-authored-by: Eddie Li <14104647ls3@gmail.com> * Feature/Created authenticated wrapper (#247) * Created authenticated layout * Rename * update ui * House keep * Fix typo --------- Co-authored-by: Pjaijai * [#131] adding husky (#221) * [#131] Test * absolute version * feat: enhance common layout component * add fragment * testing * add git ignore --------- Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> Co-authored-by: Pjaijai * Refactor/ Get user profile api (#223) * Refactor api * Disable to fire api when no user uuid is passed * House keep * Refactor useGetUserprofile * Fix build error * House keep --------- Co-authored-by: Pjaijai * [Test] Adding Jest set up (#258) * add @types/jest, jest, and ts-jest * add jest config * add test script * update jest config to allow import from module in test files * add coverage collection setting * add jest-runner-groups * set runner to groups * Add testing docs * add unit test for get-contribution-area-text.ts * add script to run test for unit, integration, and e2e * remove Test.md * add TEST.md * Refactor/refactor types naming convention (#254) * Created authenticated layout * add fragment * testing * Rename MessageType to EMessageType * Rename PostStatusType to TPostStatusType * Rename PostStatus to EPostStatus * Rename Post to IPost * Rename QueryKeyString to EQueryKeyString * Rename ReferralType to EReferralType * Rename NavItem to INavItem * fix rebase error e Please enter the commit message for your changes. Lines starting * add ignore --------- Co-authored-by: Pjaijai * Feature/create space for auth (#260) * Created authenticated layout * Create sign in sign up and forgot password --------- Co-authored-by: Pjaijai * [Docs] Improvements and breaking down (#257) * Remove Developer.md * change root README.md developer guide to linkt to introduction.md * Add introduction.md containing overview of the project, tech stack, and the corresponding docs * migrate git guide and put in CONTRIBUTING.md * Add Frontend.md, containing guide to setup local dev environment and access to user interface * Add Backend.md, containing guide to set up local backend, deployment, migration, and table structure * remove markdown file * add markdown files name with all captial * update Readme file reference * add Inbucket guide in set up backend locally, separate Resend config guide to another section * update sql script for set up trigger on inital run --------- Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> * Feature/PWA installation instruction (#267) * create installation page * add link in footer * House keep --------- Co-authored-by: Pjaijai * search url using value instead of uuid (#255) * Created authenticated layout * search url using value instead of uuid * search referal uuid to value update * fix type * house keep search post hook * house keep search referral hook * rename yeo to year of experience * Rename maxYearofExperience * rename minYearOfExperience --------- Co-authored-by: Pjaijai Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> * Feature/adding react testing library (#259) * Created authenticated layout * install packages * Adding config * Adding ContributionAreaBadge test * house keep * install packages * Adding config * Adding ContributionAreaBadge test * house keep * add doc * update test doc * Update contributing doc --------- Co-authored-by: Pjaijai * Feature/adding more husky config (#261) * Created authenticated layout * Add eslint and prettier pre commit * Fix format * Modify prettier config * feat: add commit convention hook * fix: fix commit problem * chore: use absolute version * chore(release): 1.6.0 * chore: house keep * docs: add doc --------- Co-authored-by: Pjaijai * CI/adding run client test ci (#270) * docs: updating contributing doc * ci: adding run client test ci --------- Co-authored-by: Pjaijai * fix: remove extra lint-staged (#268) Co-authored-by: Pjaijai * fix: refetch data after finishing edit (#271) Co-authored-by: Pjaijai * test: adding created-at and location helper tests (#272) * test: adding created-at and location helper tests * chore: rename folder name --------- Co-authored-by: Pjaijai * Feature/password sign up and sign in (#269) * feat: create create user with email password api * feat: create sign up skeleton * feat: adding error message to form check box * feat: adding type for form text input * refactor: refactor auth email and password validation * feat: create sign in form validation * feat: create sign in form skeleton * chore: rename sign up api and hook * feat: create sign in form skeleton * feat: adding auth api ui handling * fix: fix error toast color * feat: handle username * feat: duplicate username handling * feat: create create user with email password api * feat: create sign up skeleton * chore: rename sign up api and hook * feat: create sign in form skeleton * fix: fix profile usernam validation * feat: create signInWithMagicLink api and hook * chore: rename and move sign in and sign up api type * feat: create ISignInEmailMagicLinkRequest type * feat: create magic linka and password sign in form * feat: create magic link and password sign in validation * feat: create sign in tab * feat: create sign in template * feat: adding left component to input label * fix: fix auth form tabs height * chore: house keep * fix: fix style of register link in sign in template * chore: house keep * fix: fix username max length validation * fix: fix validation text * feat: create EEmaiVerification * feat: create email verificaiton page * feat: add email verification to site config * feat: sign up page house keep * feat: remove sign up page checkbox validaiton * feat: fix text and copy * fix: add forgort password link to sign in page * fix: fixing minor issue \ * style: fixing margin * refactor: performance improvement --------- Co-authored-by: Pjaijai * Feature/Add contributor (#276) * feat: add contributor * test: fix test * fix: fix contributor area --------- Co-authored-by: Pjaijai * style: fix style of sign in page (#277) Co-authored-by: Pjaijai * Feature/sign up confirmation page (#279) * chore: fix auth tmeplate import path * chore: centailize auth templates * feat: remove hover underline base link button * feat: create sign up confirmation page * test: fix test --------- Co-authored-by: Pjaijai * fix: fix test * fix: fix password min length validation * chore: house keep * refactor: remove link in functions deploy in staging yml file * Revert "refactor: remove link in functions deploy in staging yml file" This reverts commit 59f083ebd680d09df5d83d9ea6fbda972e4e561c. * feat: add debug log to function deploy * Feature/forget password (#280) * feat: create forgot password * fix: add loading for sigin and sing up * feat: add disabled to input * feat: add sign in button to site header * fix: fix site paht in site config --------- Co-authored-by: Pjaijai * feat: replace text input instead of form text input in reset password form (#281) Co-authored-by: Pjaijai * Feature/remove old magic link (#282) * feat: remove old sign in * fix: replace sign path insead of auth path --------- Co-authored-by: Pjaijai * feat: remove contributor button (#283) Co-authored-by: Pjaijai * chore(release): 1.7.0 * chore(release): 1.7.0 * chore(release): 1.8.0 * chore(release): 1.7.1 * docs: release * feat: yarn lock update * feat: temp remove function deploy * fix: fix build error * feat: add handling (#285) Co-authored-by: Pjaijai * Feature/data access (#286) * feat: migration script * feat: remove email from api * fix: fix contact content email failed to send reset problem --------- Co-authored-by: Pjaijai * feat: migration file * fix: update on contact referral query * ci: update staging ci file * fix: fix contact through post function * ci: remove function deplot * Refactor/house keep (#288) * chore: house keep * house keep * add back register button title --------- Co-authored-by: Pjaijai * fix: fix import path * feat: add new password same as old password handling * fix: fix text * fix: fix import error * feat: turn off local supabase analytics * Feature/Internationalization set up (#287) * feat: move app files to have locale path * feat: install next international * feat: next internaiton config * feat: next international implementation * feat: create combined middleware * chore: remove layout what not in locale * feat: update typescript version * docs: adding next internaiton to doc --------- Co-authored-by: Pjaijai * Feature/handle signed in user in sign page (#289) * feat: create not found page * feat: return not found in sign up page if user already signed in * chore: replace throw with replace * fix: new not found page --------- Co-authored-by: Pjaijai * Feature/access control (#290) * feat: create sever admin * feat: migration restrict user table column access * feat: replace client with sever admin * chore: house keep * chore: house keep * chore: house keep --------- Co-authored-by: Pjaijai * feat: added backbtn to post referer page (#294) Co-authored-by: Pjaijai <87293994+Pjaijai@users.noreply.github.com> * style: fix back to post button * Feature/in app chat room UI (#292) * feat: update lucide-react * fix: fix icon onclick error * feat: chat ui * feat(message unread ui): messsage unread ui * chore: house keep * style: more style on room card * feat: update lucide-react * fix: fix icon onclick error * feat: chat ui * feat(message unread ui): messsage unread ui * chore: house keep * style: more style on room card * test: chat message card test * test: chat conversation header test --------- Co-authored-by: Pjaijai * style: fix layout style * feat: add helen wong to contributor list * feat: add selina lam to contributor list * Feature/In app Chat (#293) * Feature/in app chat room UI (#292) * feat: update lucide-react * fix: fix icon onclick error * feat: chat ui * feat(message unread ui): messsage unread ui * chore: house keep * style: more style on room card * feat: update lucide-react * fix: fix icon onclick error * feat: chat ui * feat(message unread ui): messsage unread ui * chore: house keep * style: more style on room card * test: chat message card test * test: chat conversation header test --------- Co-authored-by: Pjaijai * Feature/message logic (#296) * feat: create message api and logic * feat: remove email for apis * feat: fix message referral request for edge funciton * feat: implement message edge function * feat: remove contact apis * feat: update supabse types * feat: basic message api implementation * feat: enhance base infinite scroll * fix: fix for input text * chore: remove useUpdateConversationLastUpdatedAt * feat: cretae useUpdateConversation api hook * feat: update api * feat: update chat * feat: update package json script * feat: update supabase type * feat: migration script * chore: rename room to conversation * feat(implement date in message card): implment date in mesage card * feat: add before to created message * feat: messsage infinite scroll * fix(fix page overflow problem ): fix page overflow problem * style: fix style * fix: fix conversation header url * feat: conversation scroll * feat: conversatio header routing * feat: chat page mobile view * style: in app chat layout * feat: close footer when in chat page * feat: chat api hool refech config * feat: message real time subscribe * fix: fix post page layout * feat: conversation update * feat: loading and no messange and conversation handleing * feat: update is convertion seen checking condition * fix: fix conversation api fetch timing * style: fix conversation and message card style * fix: fix message real time refech * fix: fix in app caht back button * style: chat message list skletion style * test: chat skeletion test * feat: check conversation unseen * chore: house keep * feat: add chat provider * style: fix input field style * feat: update handle_message_create function migration file --------- Co-authored-by: Pjaijai * fix: fix build error * docs: update supabase types * Bugfix/fix chat style (#301) * fix: fix chat invalidate logic * style(fix chat style): fix chat style * fix: fix build failed --------- Co-authored-by: Pjaijai * fix: fix build error * style: chat page an scroll bar style * Feature/schedule notification for unseen conversation (#302) * Feature/in app chat room UI (#292) * feat: update lucide-react * fix: fix icon onclick error * feat: chat ui * feat(message unread ui): messsage unread ui * chore: house keep * style: more style on room card * feat: update lucide-react * fix: fix icon onclick error * feat: chat ui * feat(message unread ui): messsage unread ui * chore: house keep * style: more style on room card * test: chat message card test * test: chat conversation header test --------- Co-authored-by: Pjaijai * Feature/message logic (#296) * feat: create message api and logic * feat: remove email for apis * feat: fix message referral request for edge funciton * feat: implement message edge function * feat: remove contact apis * feat: update supabse types * feat: basic message api implementation * feat: enhance base infinite scroll * fix: fix for input text * chore: remove useUpdateConversationLastUpdatedAt * feat: cretae useUpdateConversation api hook * feat: update api * feat: update chat * feat: update package json script * feat: update supabase type * feat: migration script * chore: rename room to conversation * feat(implement date in message card): implment date in mesage card * feat: add before to created message * feat: messsage infinite scroll * fix(fix page overflow problem ): fix page overflow problem * style: fix style * fix: fix conversation header url * feat: conversation scroll * feat: conversatio header routing * feat: chat page mobile view * style: in app chat layout * feat: close footer when in chat page * feat: chat api hool refech config * feat: message real time subscribe * fix: fix post page layout * feat: conversation update * feat: loading and no messange and conversation handleing * feat: update is convertion seen checking condition * fix: fix conversation api fetch timing * style: fix conversation and message card style * fix: fix message real time refech * fix: fix in app caht back button * style: chat message list skletion style * test: chat skeletion test * feat: check conversation unseen * chore: house keep * feat: add chat provider * style: fix input field style * feat: update handle_message_create function migration file --------- Co-authored-by: Pjaijai * fix: fix build error * feat: notify unseenconversation function * style: fix email style * fix: fix unseen conversation function return * fix: fix build error --------- Co-authored-by: Pjaijai --------- Co-authored-by: Pjaijai * feat(fix email sending error and adding log): fix email sending error and adding log * fix: fix chat email link * fix: fix conversation exsist case * fix: fix chat room redirection in email content * feat: not showing user massage in notificaiton email * test: temp remove test * feat: mobile friendly main page ui (#303) * feat(mobile friendly main page ui): mobile friendly main page ui * fix: fix copy --------- Co-authored-by: Pjaijai * style: update char message card ui (#304) Co-authored-by: Pjaijai * test: fix message card test * Feature/mobile menu (#305) * feat: add side menu for mobile * feat: update message icon for nav menu; update chat nav link on mobile menu * fix: updated message test typo * Feature/translation (#306) * test: fix message card test * feat: update layout lang point to locale * feat: update zh-hk and en-ca copies * feat: implement i18n keys * feat: hanlde not static data translation * style: user count magin * feat: unify created at * feat: add locale setting button * feat: page name i18n impletation * style: make locale selection visible on mobile * feat: mobile nav i18n --------- Co-authored-by: Pjaijai * Feature/mobile no message handling (#307) * fix: not allow white space username in edit profile * fix: fix profile page title * fix: fix profile site config name * feat: no message to conversation left section * fix: fix change locale sign our problem * fix: fix change locale no search params problem * chore: house keep --------- Co-authored-by: Pjaijai * fix: fix password email invalid text * Feature/style house keep (#308) * style: fix style * fix: fix theme toggle in mobile nav --------- Co-authored-by: Pjaijai * Feature/replace magic link with one time passcode (#309) * feat: replace magic link with one time password * chore: house keep * chore: house keep --------- Co-authored-by: Pjaijai * style: fix opt verfication max width * feat: message display clickable link (#310) Co-authored-by: Pjaijai * fix: fix copy * fix: fix message icon in site header not redirect * chore(release): 1.8.0 * style: email style * fix: fix email link * fix: fix copy * fix: fix copy * style: profile buttons container style * feat: implement bottleneck * fix: fix copies * fix: fix copy * chore: house keep * chore: house keep * fix(fix en-ca copy): fix en-ca copy * feat: optimize notify unseen conversation function (#314) Co-authored-by: Pjaijai * Feature/api-ssg (#312) * fix: makes server action works * fix: fix copy * fix: fix sign up redirect problem * feat: user count isg * feat(remove unauthenticated wrapper): remove unauthenticated wrapper * feat: remove unauth wrapper * feat: update options hooks * feat: update search hook * feat: ssg in post * feat(profile cache\): profile cache * feat: referral cache * feat: updateb search pop over * feat: remove react-query-next-experimental * feat(update profile template): update profile templates * feat: update referral templates * feat: update post templates * fix: fix edit post page rendering * fix: fix rendering --------- Co-authored-by: Pjaijai * feat: install speed insights * chore(release): 1.9.0 * feat: fix sign in link in sign up page * feat: invalidate instead of refech (#317) Co-authored-by: Pjaijai * Feature/password eye icon (#316) * style: password input show eye icon when focus or have value * style: main page layout --------- Co-authored-by: Pjaijai * chore(release): 1.10.0 * fix: hotfix conversatio per page * chore(release): 1.10.1 * Feature/revamp user profile (#320) * feat: post detail page title * feat: fix options schema not null colounm * docs: fix type * feat: split profile edit page * feat: add copies * feat: add icons * style: edit and view profile page style --------- Co-authored-by: Pjaijai * chore(release): 1.10.2 * chore(release): 1.10.3 * fix: fixtype * feat: post prefech cache --------- Co-authored-by: marukosy124 <54564324+marukosy124@users.noreply.github.com> Co-authored-by: Lulu <76647602+511234@users.noreply.github.com> Co-authored-by: Thomas Yau Co-authored-by: Thomas Yau Co-authored-by: Pjaijai Co-authored-by: Lulu Tung Co-authored-by: marukosy124 Co-authored-by: Ken Tung Co-authored-by: Martin Tsang <64913859+marttsang2@users.noreply.github.com> Co-authored-by: 14104647ls3 <67142310+14104647ls3@users.noreply.github.com> Co-authored-by: tommy Co-authored-by: Paco Wong <86609598+paco0161@users.noreply.github.com> Co-authored-by: Cyrus Chan <111417390+cyruscsc@users.noreply.github.com> Co-authored-by: Eddie Li <14104647ls3@gmail.com> Co-authored-by: Vardy Co-authored-by: Trevor Wong <44539644+trevorwongtw@users.noreply.github.com> Co-authored-by: Johnson Shan <43336083+JohnsonShan@users.noreply.github.com> --- CHANGELOG.md | 132 +++++------ .../app/[locale]/post/referer/[uuid]/page.tsx | 18 ++ client/app/[locale]/profile/edit/page.tsx | 36 +++ client/components/icons.tsx | 4 + client/config/site.ts | 4 + .../modules/profile/components/cards/Info.tsx | 14 ++ client/modules/profile/edit/template.tsx | 146 ++++++------ client/modules/profile/template.tsx | 94 +++----- client/modules/profile/view/template.tsx | 224 ++++++++++-------- client/types/api/response/user.ts | 6 +- client/types/supabase.ts | 72 +++--- .../internationalization/messages/en-ca.ts | 13 +- .../internationalization/messages/zh-hk.ts | 13 +- package.json | 2 +- .../20240217051241_fix_options_schema.sql | 25 ++ 15 files changed, 460 insertions(+), 343 deletions(-) create mode 100644 client/app/[locale]/profile/edit/page.tsx create mode 100644 client/modules/profile/components/cards/Info.tsx create mode 100644 supabase/migrations/20240217051241_fix_options_schema.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index 207edada..0ae85166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,101 +2,97 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -### [1.10.1](https://github.com/Pjaijai/Referalah/compare/v1.10.0...v1.10.1) (2024-02-20) +### [1.10.2](https://github.com/Pjaijai/Referalah/compare/v1.10.1...v1.10.2) (2024-02-22) +### [1.10.1](https://github.com/Pjaijai/Referalah/compare/v1.10.0...v1.10.1) (2024-02-20) ### Bug Fixes -* hotfix conversatio per page ([aa9499c](https://github.com/Pjaijai/Referalah/commit/aa9499c01c22acbff4a26eb381d0af836874afaa)) +- hotfix conversatio per page ([aa9499c](https://github.com/Pjaijai/Referalah/commit/aa9499c01c22acbff4a26eb381d0af836874afaa)) ## [1.10.0](https://github.com/Pjaijai/Referalah/compare/v1.9.0...v1.10.0) (2024-02-17) - ### Features -* fix sign in link in sign up page ([200ea77](https://github.com/Pjaijai/Referalah/commit/200ea7742718997b6f12270fa10bdd8847819bf9)) -* invalidate instead of refech ([#317](https://github.com/Pjaijai/Referalah/issues/317)) ([1140d3c](https://github.com/Pjaijai/Referalah/commit/1140d3c218803f139d6fb9449c5ce6af47bb5f38)) +- fix sign in link in sign up page ([200ea77](https://github.com/Pjaijai/Referalah/commit/200ea7742718997b6f12270fa10bdd8847819bf9)) +- invalidate instead of refech ([#317](https://github.com/Pjaijai/Referalah/issues/317)) ([1140d3c](https://github.com/Pjaijai/Referalah/commit/1140d3c218803f139d6fb9449c5ce6af47bb5f38)) ## [1.9.0](https://github.com/Pjaijai/Referalah/compare/v1.7.1...v1.9.0) (2024-02-10) - ### Features -* add handling ([#285](https://github.com/Pjaijai/Referalah/issues/285)) ([9def67c](https://github.com/Pjaijai/Referalah/commit/9def67c75d20124045e93650c1f32ace5c7dbba7)) -* add helen wong to contributor list ([120d6b4](https://github.com/Pjaijai/Referalah/commit/120d6b47f9f1470c2d5b97ce200f12d196340b43)) -* add new password same as old password handling ([ca967a7](https://github.com/Pjaijai/Referalah/commit/ca967a7170602fa3e853267c6a80f76326e799eb)) -* add selina lam to contributor list ([585c5f8](https://github.com/Pjaijai/Referalah/commit/585c5f84ad7e5686a507bdc372c93cf0c19d1b7f)) -* added backbtn to post referer page ([#294](https://github.com/Pjaijai/Referalah/issues/294)) ([d1cdb3a](https://github.com/Pjaijai/Referalah/commit/d1cdb3a8e8689db7d9985b50cb0be9571f4476fc)) -* **fix email sending error and adding log:** fix email sending error and adding log ([fbc351b](https://github.com/Pjaijai/Referalah/commit/fbc351bdabb01cf3320d8dbbf950916678884ba6)) -* implement bottleneck ([644a187](https://github.com/Pjaijai/Referalah/commit/644a187181dd864c02f3809eeb575489afa5d437)) -* install speed insights ([8a88cda](https://github.com/Pjaijai/Referalah/commit/8a88cda7e2796037d2d8f3208688d124ed7b0492)) -* message display clickable link ([#310](https://github.com/Pjaijai/Referalah/issues/310)) ([3453910](https://github.com/Pjaijai/Referalah/commit/34539102b1a9648cbdd53681cb85bc04f1cbc7aa)) -* migration file ([f88e67d](https://github.com/Pjaijai/Referalah/commit/f88e67db758a50fcb27ef7ce0b1c6284c7c73f1f)) -* mobile friendly main page ui ([#303](https://github.com/Pjaijai/Referalah/issues/303)) ([67abfd1](https://github.com/Pjaijai/Referalah/commit/67abfd1c51de0b8e1b3da1a1059525d99538a94c)) -* not showing user massage in notificaiton email ([b21babb](https://github.com/Pjaijai/Referalah/commit/b21babbef77a8cafb701cdd77e428d73e3bf346c)) -* optimize notify unseen conversation function ([#314](https://github.com/Pjaijai/Referalah/issues/314)) ([5c7cc48](https://github.com/Pjaijai/Referalah/commit/5c7cc485ed46d706c45ce1624c970078f1c1ffd8)) -* temp remove function deploy ([f4cc33e](https://github.com/Pjaijai/Referalah/commit/f4cc33e1b03a1b15975bfd6db082bd791774054c)) -* turn off local supabase analytics ([34fc7eb](https://github.com/Pjaijai/Referalah/commit/34fc7eb11c5005820dd11716e1be8aabb4bdc28e)) -* yarn lock update ([91278f3](https://github.com/Pjaijai/Referalah/commit/91278f349a3f6c6cdb74acfd9e0550f3a6d6a880)) - +- add handling ([#285](https://github.com/Pjaijai/Referalah/issues/285)) ([9def67c](https://github.com/Pjaijai/Referalah/commit/9def67c75d20124045e93650c1f32ace5c7dbba7)) +- add helen wong to contributor list ([120d6b4](https://github.com/Pjaijai/Referalah/commit/120d6b47f9f1470c2d5b97ce200f12d196340b43)) +- add new password same as old password handling ([ca967a7](https://github.com/Pjaijai/Referalah/commit/ca967a7170602fa3e853267c6a80f76326e799eb)) +- add selina lam to contributor list ([585c5f8](https://github.com/Pjaijai/Referalah/commit/585c5f84ad7e5686a507bdc372c93cf0c19d1b7f)) +- added backbtn to post referer page ([#294](https://github.com/Pjaijai/Referalah/issues/294)) ([d1cdb3a](https://github.com/Pjaijai/Referalah/commit/d1cdb3a8e8689db7d9985b50cb0be9571f4476fc)) +- **fix email sending error and adding log:** fix email sending error and adding log ([fbc351b](https://github.com/Pjaijai/Referalah/commit/fbc351bdabb01cf3320d8dbbf950916678884ba6)) +- implement bottleneck ([644a187](https://github.com/Pjaijai/Referalah/commit/644a187181dd864c02f3809eeb575489afa5d437)) +- install speed insights ([8a88cda](https://github.com/Pjaijai/Referalah/commit/8a88cda7e2796037d2d8f3208688d124ed7b0492)) +- message display clickable link ([#310](https://github.com/Pjaijai/Referalah/issues/310)) ([3453910](https://github.com/Pjaijai/Referalah/commit/34539102b1a9648cbdd53681cb85bc04f1cbc7aa)) +- migration file ([f88e67d](https://github.com/Pjaijai/Referalah/commit/f88e67db758a50fcb27ef7ce0b1c6284c7c73f1f)) +- mobile friendly main page ui ([#303](https://github.com/Pjaijai/Referalah/issues/303)) ([67abfd1](https://github.com/Pjaijai/Referalah/commit/67abfd1c51de0b8e1b3da1a1059525d99538a94c)) +- not showing user massage in notificaiton email ([b21babb](https://github.com/Pjaijai/Referalah/commit/b21babbef77a8cafb701cdd77e428d73e3bf346c)) +- optimize notify unseen conversation function ([#314](https://github.com/Pjaijai/Referalah/issues/314)) ([5c7cc48](https://github.com/Pjaijai/Referalah/commit/5c7cc485ed46d706c45ce1624c970078f1c1ffd8)) +- temp remove function deploy ([f4cc33e](https://github.com/Pjaijai/Referalah/commit/f4cc33e1b03a1b15975bfd6db082bd791774054c)) +- turn off local supabase analytics ([34fc7eb](https://github.com/Pjaijai/Referalah/commit/34fc7eb11c5005820dd11716e1be8aabb4bdc28e)) +- yarn lock update ([91278f3](https://github.com/Pjaijai/Referalah/commit/91278f349a3f6c6cdb74acfd9e0550f3a6d6a880)) ### Bug Fixes -* update on contact referral query ([4e86ad0](https://github.com/Pjaijai/Referalah/commit/4e86ad07945b45e8dd953c8758e33919cbc42b1b)) -* fix build error ([6589ace](https://github.com/Pjaijai/Referalah/commit/6589acea24fcaf1c88ed94e05ed66b3c641350b1)) -* fix chat email link ([574692e](https://github.com/Pjaijai/Referalah/commit/574692ef542809df3a8431b259aab4710cb280f5)) -* fix chat room redirection in email content ([58a742d](https://github.com/Pjaijai/Referalah/commit/58a742d67186b7abce2f3a8ac54c90dfaa155745)) -* fix contact through post function ([d454821](https://github.com/Pjaijai/Referalah/commit/d4548219f2dcba5a4b8b3ccfddc375e83d07b549)) -* fix conversation exsist case ([948e855](https://github.com/Pjaijai/Referalah/commit/948e855381f5a7ac7e3acc6ba3abe6310393a835)) -* fix copies ([6eb169e](https://github.com/Pjaijai/Referalah/commit/6eb169ee4dce5a1b6f5ae5d428b6225907c22426)) -* fix copy ([c5aece5](https://github.com/Pjaijai/Referalah/commit/c5aece53e501e9b1ccf8ac19ee7a1c48a5e17648)) -* fix copy ([5520567](https://github.com/Pjaijai/Referalah/commit/552056798bfead6f404e981aa7844ec91fe8d0e8)) -* fix copy ([fc721e2](https://github.com/Pjaijai/Referalah/commit/fc721e279d59a85daf4c22baef1035ac2e962412)) -* fix copy ([5d21da4](https://github.com/Pjaijai/Referalah/commit/5d21da41cbccc34003e963883bc6575a413994de)) -* fix email link ([a0425a7](https://github.com/Pjaijai/Referalah/commit/a0425a7c3b9641873193842bf99c50864f60eec3)) -* **fix en-ca copy:** fix en-ca copy ([b253fdd](https://github.com/Pjaijai/Referalah/commit/b253fddfef8e7d072169c671feb7829be5d672fd)) -* fix import error ([93adafe](https://github.com/Pjaijai/Referalah/commit/93adafe9a06ab19919d994321fed4585e36427f1)) -* fix import path ([a6c491a](https://github.com/Pjaijai/Referalah/commit/a6c491a9e77b8945ef26ff311ccebe45e5d53bfc)) -* fix message icon in site header not redirect ([add2981](https://github.com/Pjaijai/Referalah/commit/add2981fcf4b8e007237a7c5e59d1d38da125a3e)) -* fix password email invalid text ([19d5c8e](https://github.com/Pjaijai/Referalah/commit/19d5c8e38327e0b7fe9df87138c2fa3df6b48e8a)) -* fix text ([b121e45](https://github.com/Pjaijai/Referalah/commit/b121e456c5c6d3d6793dd75ff24ef7a7bbe0f36b)) +- update on contact referral query ([4e86ad0](https://github.com/Pjaijai/Referalah/commit/4e86ad07945b45e8dd953c8758e33919cbc42b1b)) +- fix build error ([6589ace](https://github.com/Pjaijai/Referalah/commit/6589acea24fcaf1c88ed94e05ed66b3c641350b1)) +- fix chat email link ([574692e](https://github.com/Pjaijai/Referalah/commit/574692ef542809df3a8431b259aab4710cb280f5)) +- fix chat room redirection in email content ([58a742d](https://github.com/Pjaijai/Referalah/commit/58a742d67186b7abce2f3a8ac54c90dfaa155745)) +- fix contact through post function ([d454821](https://github.com/Pjaijai/Referalah/commit/d4548219f2dcba5a4b8b3ccfddc375e83d07b549)) +- fix conversation exsist case ([948e855](https://github.com/Pjaijai/Referalah/commit/948e855381f5a7ac7e3acc6ba3abe6310393a835)) +- fix copies ([6eb169e](https://github.com/Pjaijai/Referalah/commit/6eb169ee4dce5a1b6f5ae5d428b6225907c22426)) +- fix copy ([c5aece5](https://github.com/Pjaijai/Referalah/commit/c5aece53e501e9b1ccf8ac19ee7a1c48a5e17648)) +- fix copy ([5520567](https://github.com/Pjaijai/Referalah/commit/552056798bfead6f404e981aa7844ec91fe8d0e8)) +- fix copy ([fc721e2](https://github.com/Pjaijai/Referalah/commit/fc721e279d59a85daf4c22baef1035ac2e962412)) +- fix copy ([5d21da4](https://github.com/Pjaijai/Referalah/commit/5d21da41cbccc34003e963883bc6575a413994de)) +- fix email link ([a0425a7](https://github.com/Pjaijai/Referalah/commit/a0425a7c3b9641873193842bf99c50864f60eec3)) +- **fix en-ca copy:** fix en-ca copy ([b253fdd](https://github.com/Pjaijai/Referalah/commit/b253fddfef8e7d072169c671feb7829be5d672fd)) +- fix import error ([93adafe](https://github.com/Pjaijai/Referalah/commit/93adafe9a06ab19919d994321fed4585e36427f1)) +- fix import path ([a6c491a](https://github.com/Pjaijai/Referalah/commit/a6c491a9e77b8945ef26ff311ccebe45e5d53bfc)) +- fix message icon in site header not redirect ([add2981](https://github.com/Pjaijai/Referalah/commit/add2981fcf4b8e007237a7c5e59d1d38da125a3e)) +- fix password email invalid text ([19d5c8e](https://github.com/Pjaijai/Referalah/commit/19d5c8e38327e0b7fe9df87138c2fa3df6b48e8a)) +- fix text ([b121e45](https://github.com/Pjaijai/Referalah/commit/b121e456c5c6d3d6793dd75ff24ef7a7bbe0f36b)) ## [1.5.0](https://github.com/Pjaijai/Referalah/compare/v1.4.1...v1.5.0) (2023-11-13) ## [1.8.0](https://github.com/Pjaijai/Referalah/compare/v1.7.1...v1.8.0) (2024-01-24) - ### Features -* add handling ([#285](https://github.com/Pjaijai/Referalah/issues/285)) ([9def67c](https://github.com/Pjaijai/Referalah/commit/9def67c75d20124045e93650c1f32ace5c7dbba7)) -* add helen wong to contributor list ([120d6b4](https://github.com/Pjaijai/Referalah/commit/120d6b47f9f1470c2d5b97ce200f12d196340b43)) -* add new password same as old password handling ([ca967a7](https://github.com/Pjaijai/Referalah/commit/ca967a7170602fa3e853267c6a80f76326e799eb)) -* add selina lam to contributor list ([585c5f8](https://github.com/Pjaijai/Referalah/commit/585c5f84ad7e5686a507bdc372c93cf0c19d1b7f)) -* added backbtn to post referer page ([#294](https://github.com/Pjaijai/Referalah/issues/294)) ([d1cdb3a](https://github.com/Pjaijai/Referalah/commit/d1cdb3a8e8689db7d9985b50cb0be9571f4476fc)) -* **fix email sending error and adding log:** fix email sending error and adding log ([fbc351b](https://github.com/Pjaijai/Referalah/commit/fbc351bdabb01cf3320d8dbbf950916678884ba6)) -* message display clickable link ([#310](https://github.com/Pjaijai/Referalah/issues/310)) ([3453910](https://github.com/Pjaijai/Referalah/commit/34539102b1a9648cbdd53681cb85bc04f1cbc7aa)) -* migration file ([f88e67d](https://github.com/Pjaijai/Referalah/commit/f88e67db758a50fcb27ef7ce0b1c6284c7c73f1f)) -* mobile friendly main page ui ([#303](https://github.com/Pjaijai/Referalah/issues/303)) ([67abfd1](https://github.com/Pjaijai/Referalah/commit/67abfd1c51de0b8e1b3da1a1059525d99538a94c)) -* not showing user massage in notificaiton email ([b21babb](https://github.com/Pjaijai/Referalah/commit/b21babbef77a8cafb701cdd77e428d73e3bf346c)) -* temp remove function deploy ([f4cc33e](https://github.com/Pjaijai/Referalah/commit/f4cc33e1b03a1b15975bfd6db082bd791774054c)) -* turn off local supabase analytics ([34fc7eb](https://github.com/Pjaijai/Referalah/commit/34fc7eb11c5005820dd11716e1be8aabb4bdc28e)) -* yarn lock update ([91278f3](https://github.com/Pjaijai/Referalah/commit/91278f349a3f6c6cdb74acfd9e0550f3a6d6a880)) - +- add handling ([#285](https://github.com/Pjaijai/Referalah/issues/285)) ([9def67c](https://github.com/Pjaijai/Referalah/commit/9def67c75d20124045e93650c1f32ace5c7dbba7)) +- add helen wong to contributor list ([120d6b4](https://github.com/Pjaijai/Referalah/commit/120d6b47f9f1470c2d5b97ce200f12d196340b43)) +- add new password same as old password handling ([ca967a7](https://github.com/Pjaijai/Referalah/commit/ca967a7170602fa3e853267c6a80f76326e799eb)) +- add selina lam to contributor list ([585c5f8](https://github.com/Pjaijai/Referalah/commit/585c5f84ad7e5686a507bdc372c93cf0c19d1b7f)) +- added backbtn to post referer page ([#294](https://github.com/Pjaijai/Referalah/issues/294)) ([d1cdb3a](https://github.com/Pjaijai/Referalah/commit/d1cdb3a8e8689db7d9985b50cb0be9571f4476fc)) +- **fix email sending error and adding log:** fix email sending error and adding log ([fbc351b](https://github.com/Pjaijai/Referalah/commit/fbc351bdabb01cf3320d8dbbf950916678884ba6)) +- message display clickable link ([#310](https://github.com/Pjaijai/Referalah/issues/310)) ([3453910](https://github.com/Pjaijai/Referalah/commit/34539102b1a9648cbdd53681cb85bc04f1cbc7aa)) +- migration file ([f88e67d](https://github.com/Pjaijai/Referalah/commit/f88e67db758a50fcb27ef7ce0b1c6284c7c73f1f)) +- mobile friendly main page ui ([#303](https://github.com/Pjaijai/Referalah/issues/303)) ([67abfd1](https://github.com/Pjaijai/Referalah/commit/67abfd1c51de0b8e1b3da1a1059525d99538a94c)) +- not showing user massage in notificaiton email ([b21babb](https://github.com/Pjaijai/Referalah/commit/b21babbef77a8cafb701cdd77e428d73e3bf346c)) +- temp remove function deploy ([f4cc33e](https://github.com/Pjaijai/Referalah/commit/f4cc33e1b03a1b15975bfd6db082bd791774054c)) +- turn off local supabase analytics ([34fc7eb](https://github.com/Pjaijai/Referalah/commit/34fc7eb11c5005820dd11716e1be8aabb4bdc28e)) +- yarn lock update ([91278f3](https://github.com/Pjaijai/Referalah/commit/91278f349a3f6c6cdb74acfd9e0550f3a6d6a880)) ### Bug Fixes -* update on contact referral query ([4e86ad0](https://github.com/Pjaijai/Referalah/commit/4e86ad07945b45e8dd953c8758e33919cbc42b1b)) -* fix build error ([6589ace](https://github.com/Pjaijai/Referalah/commit/6589acea24fcaf1c88ed94e05ed66b3c641350b1)) -* fix chat email link ([574692e](https://github.com/Pjaijai/Referalah/commit/574692ef542809df3a8431b259aab4710cb280f5)) -* fix chat room redirection in email content ([58a742d](https://github.com/Pjaijai/Referalah/commit/58a742d67186b7abce2f3a8ac54c90dfaa155745)) -* fix contact through post function ([d454821](https://github.com/Pjaijai/Referalah/commit/d4548219f2dcba5a4b8b3ccfddc375e83d07b549)) -* fix conversation exsist case ([948e855](https://github.com/Pjaijai/Referalah/commit/948e855381f5a7ac7e3acc6ba3abe6310393a835)) -* fix copy ([5d21da4](https://github.com/Pjaijai/Referalah/commit/5d21da41cbccc34003e963883bc6575a413994de)) -* fix import error ([93adafe](https://github.com/Pjaijai/Referalah/commit/93adafe9a06ab19919d994321fed4585e36427f1)) -* fix import path ([a6c491a](https://github.com/Pjaijai/Referalah/commit/a6c491a9e77b8945ef26ff311ccebe45e5d53bfc)) -* fix message icon in site header not redirect ([add2981](https://github.com/Pjaijai/Referalah/commit/add2981fcf4b8e007237a7c5e59d1d38da125a3e)) -* fix password email invalid text ([19d5c8e](https://github.com/Pjaijai/Referalah/commit/19d5c8e38327e0b7fe9df87138c2fa3df6b48e8a)) -* fix text ([b121e45](https://github.com/Pjaijai/Referalah/commit/b121e456c5c6d3d6793dd75ff24ef7a7bbe0f36b)) +- update on contact referral query ([4e86ad0](https://github.com/Pjaijai/Referalah/commit/4e86ad07945b45e8dd953c8758e33919cbc42b1b)) +- fix build error ([6589ace](https://github.com/Pjaijai/Referalah/commit/6589acea24fcaf1c88ed94e05ed66b3c641350b1)) +- fix chat email link ([574692e](https://github.com/Pjaijai/Referalah/commit/574692ef542809df3a8431b259aab4710cb280f5)) +- fix chat room redirection in email content ([58a742d](https://github.com/Pjaijai/Referalah/commit/58a742d67186b7abce2f3a8ac54c90dfaa155745)) +- fix contact through post function ([d454821](https://github.com/Pjaijai/Referalah/commit/d4548219f2dcba5a4b8b3ccfddc375e83d07b549)) +- fix conversation exsist case ([948e855](https://github.com/Pjaijai/Referalah/commit/948e855381f5a7ac7e3acc6ba3abe6310393a835)) +- fix copy ([5d21da4](https://github.com/Pjaijai/Referalah/commit/5d21da41cbccc34003e963883bc6575a413994de)) +- fix import error ([93adafe](https://github.com/Pjaijai/Referalah/commit/93adafe9a06ab19919d994321fed4585e36427f1)) +- fix import path ([a6c491a](https://github.com/Pjaijai/Referalah/commit/a6c491a9e77b8945ef26ff311ccebe45e5d53bfc)) +- fix message icon in site header not redirect ([add2981](https://github.com/Pjaijai/Referalah/commit/add2981fcf4b8e007237a7c5e59d1d38da125a3e)) +- fix password email invalid text ([19d5c8e](https://github.com/Pjaijai/Referalah/commit/19d5c8e38327e0b7fe9df87138c2fa3df6b48e8a)) +- fix text ([b121e45](https://github.com/Pjaijai/Referalah/commit/b121e456c5c6d3d6793dd75ff24ef7a7bbe0f36b)) ## [1.5.0](https://github.com/Pjaijai/Referalah/compare/v1.4.1...v1.5.0) (2023-11-13) diff --git a/client/app/[locale]/post/referer/[uuid]/page.tsx b/client/app/[locale]/post/referer/[uuid]/page.tsx index b3752739..80e9d207 100644 --- a/client/app/[locale]/post/referer/[uuid]/page.tsx +++ b/client/app/[locale]/post/referer/[uuid]/page.tsx @@ -1,8 +1,26 @@ import React from "react" import ReferralPostDetailsPageTemplate from "@/modules/post/view/template" +import { getPostByUuid } from "@/utils/common/api" +import { getI18n } from "@/utils/services/internationalization/server" import CommonPageLayout from "@/components/layouts/common" +export async function generateMetadata({ + params, +}: { + params: { uuid: string } +}) { + const { uuid } = params + const t = await getI18n() + const res = await getPostByUuid(uuid) + return { + title: `${res.job_title} | ${t("page.post")}`, + } +} + +export const revalidate = false +export const fetchCache = "default-cache" + const RefererPostDetailsPage = ({ params }: { params: { uuid: string } }) => { return ( diff --git a/client/app/[locale]/profile/edit/page.tsx b/client/app/[locale]/profile/edit/page.tsx new file mode 100644 index 00000000..2d495b29 --- /dev/null +++ b/client/app/[locale]/profile/edit/page.tsx @@ -0,0 +1,36 @@ +import React from "react" +import EditProfileTemplate from "@/modules/profile/edit/template" +import { + getCityList, + getCountryList, + getIndustryList, + getProvinceList, +} from "@/utils/common/api" + +import CommonPageLayout from "@/components/layouts/common" +import AuthenticatedPageWrapper from "@/components/wrappers/authenticated" + +export const revalidate = false +export const fetchCache = "default-cache" + +const EditProfilePage = async () => { + const countryList = await getCountryList() + const provinceList = await getProvinceList() + const cityList = await getCityList() + const industryList = await getIndustryList() + + return ( + + + + + + ) +} + +export default EditProfilePage diff --git a/client/components/icons.tsx b/client/components/icons.tsx index 3c1aad81..c538c91a 100644 --- a/client/components/icons.tsx +++ b/client/components/icons.tsx @@ -3,6 +3,7 @@ import { Briefcase, Building2, CalendarClock, + CalendarDays, CheckCircle2, ChevronDown, ChevronLeft, @@ -19,6 +20,7 @@ import { Link, Linkedin, Loader, + LogOut, LucideProps, Mail, MapPin, @@ -45,6 +47,7 @@ export type Icon = typeof LucideIcon export const Icons = { arrowLeft: ArrowLeft, briefcase: Briefcase, + calendarDays: CalendarDays, messageSquareMore: MessageSquareMore, sun: SunMedium, moon: Moon, @@ -52,6 +55,7 @@ export const Icons = { user: User, link: Link, laptop: Laptop, + logOut: LogOut, mail: Mail, pencil: Pencil, personStanding: PersonStanding, diff --git a/client/config/site.ts b/client/config/site.ts index c77c0268..326294f1 100644 --- a/client/config/site.ts +++ b/client/config/site.ts @@ -15,6 +15,10 @@ export const siteConfig = { name: "Profile", href: "/profile", }, + editProfile: { + name: "Profile", + href: "/profile/edit", + }, signUp: { name: "auth", href: "/auth/sign-up", diff --git a/client/modules/profile/components/cards/Info.tsx b/client/modules/profile/components/cards/Info.tsx new file mode 100644 index 00000000..fda3b435 --- /dev/null +++ b/client/modules/profile/components/cards/Info.tsx @@ -0,0 +1,14 @@ +import React, { ReactNode } from "react" + +interface IInfoCardProps { + children: ReactNode +} +const InfoCard: React.FunctionComponent = ({ children }) => { + return ( +
+ {children} +
+ ) +} + +export default InfoCard diff --git a/client/modules/profile/edit/template.tsx b/client/modules/profile/edit/template.tsx index bf589fbe..89acf579 100644 --- a/client/modules/profile/edit/template.tsx +++ b/client/modules/profile/edit/template.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useMemo, useState } from "react" import { StaticImport } from "next/dist/shared/lib/get-img-props" +import { useRouter } from "next/navigation" import { useI18n } from "@/utils/services/internationalization/client" import { supabase } from "@/utils/services/supabase/config" import { zodResolver } from "@hookform/resolvers/zod" @@ -16,6 +17,8 @@ import { ICountryResponse } from "@/types/api/response/country" import { IIndustryResponse } from "@/types/api/response/industry" import { IProvinceResponse } from "@/types/api/response/province" import { EQueryKeyString } from "@/types/common/query-key-string" +import { siteConfig } from "@/config/site" +import useGetUserprofile from "@/hooks/api/user/get-user-profile" import useUpdateUserProfile from "@/hooks/api/user/update-user-profile" import useCityOptions from "@/hooks/common/options/city-options" import useCountryOptions from "@/hooks/common/options/country-options" @@ -35,22 +38,6 @@ import FormTextArea from "@/components/customized-ui/form/text-area" import { Icons } from "@/components/icons" interface IEdiProfileTemplate { - isProfileLoading: boolean - photoUrl?: string - username: string | null - description: string | null - company: string | null - jobTitle: string | null - yearOfExperience?: number | null - countryUuid: string | null - provinceUuid: string | null - industryUuid: string | null - cityUuid: string | null - // resumeUrl: string | null - socialMediaUrl: string | null - isReferer: boolean - isReferee: boolean - setIsEditMode: (value: boolean) => void countryList: ICountryResponse[] provinceList: IProvinceResponse[] cityList: ICityResponse[] @@ -58,28 +45,20 @@ interface IEdiProfileTemplate { } const EditProfileTemplate: React.FunctionComponent = ({ - photoUrl, - username, - description, - company, - jobTitle, - yearOfExperience, - countryUuid, - provinceUuid, - cityUuid, - industryUuid, - socialMediaUrl, - isReferer, - isReferee, - isProfileLoading, - setIsEditMode, countryList, provinceList, cityList, industryList, }) => { + const userUuid = useUserStore((state) => state.uuid) const t = useI18n() const queryClient = useQueryClient() + const router = useRouter() + const { data: profile, isLoading: isProfileLoading } = useGetUserprofile( + userUuid + // InitialProfile + ) + const formSchema = z .object({ photoUrl: z.any().optional(), @@ -197,24 +176,60 @@ const EditProfileTemplate: React.FunctionComponent = ({ const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: useMemo(() => { - return { - username: username || undefined, - description: description || undefined, - company: company || undefined, - jobTitle: jobTitle || undefined, - yearOfExperience: yearOfExperience?.toString() || "0", - countryUuid: countryUuid || undefined, - provinceUuid: provinceUuid || undefined, - cityUuid: cityUuid || undefined, - socialMediaUrl: socialMediaUrl || undefined, - isReferer: isReferer || false, - isReferee: isReferee || false, - industryUuid: industryUuid || undefined, + const res = { + username: profile?.username || undefined, + description: profile?.description || undefined, + company: profile?.company_name || undefined, + jobTitle: profile?.job_title || undefined, + yearOfExperience: profile?.year_of_experience?.toString() || "0", + countryUuid: profile?.country?.uuid || undefined, + provinceUuid: profile?.province?.uuid || undefined, + cityUuid: profile?.city?.uuid || undefined, + socialMediaUrl: profile?.social_media_url || undefined, + isReferer: profile?.is_referer || false, + isReferee: profile?.is_referee || false, + industryUuid: profile?.industry?.uuid || undefined, } - }, [isProfileLoading]), + + return res + }, [profile, isProfileLoading]), }) - const { watch, setValue } = form + const { watch, setValue, reset } = form + + useEffect(() => { + if (profile) { + const { + city, + company_name, + country, + description, + industry, + is_referee, + is_referer, + job_title, + username, + year_of_experience, + province, + social_media_url, + } = profile + + reset({ + username: username || undefined, + description: description || undefined, + company: company_name || undefined, + jobTitle: job_title || undefined, + yearOfExperience: year_of_experience?.toString() || "0", + countryUuid: country?.uuid || undefined, + provinceUuid: province?.uuid || undefined, + cityUuid: city?.uuid || undefined, + socialMediaUrl: social_media_url || undefined, + isReferer: is_referer || false, + isReferee: is_referee || false, + industryUuid: industry?.uuid || undefined, + }) + } + }, [profile, isProfileLoading]) const countryWatch = watch("countryUuid") const provinceWatch = watch("provinceUuid") @@ -224,8 +239,9 @@ const EditProfileTemplate: React.FunctionComponent = ({ const countryOptions = useCountryOptions(countryList) const provinceOptions = useProvinceOptions(provinceList, countryWatch) const cityOptions = useCityOptions(cityList, provinceWatch) + useEffect(() => { - if (provinceWatch !== provinceUuid) { + if (profile && provinceWatch !== profile.province?.uuid) { setValue("cityUuid", "") } }, [provinceOptions, provinceWatch]) @@ -322,7 +338,8 @@ const EditProfileTemplate: React.FunctionComponent = ({ queryClient.invalidateQueries({ queryKey: [EQueryKeyString.USER_PROFILE, { userUuid: user.uuid }], }) - setIsEditMode(false) + + router.push(`${siteConfig.page.profile.href}/${userUuid}`) }, onSettled: () => { setIsSubmitting(false) @@ -360,31 +377,26 @@ const EditProfileTemplate: React.FunctionComponent = ({ } return ( -
+
+
-
- -
-
{!base64Image && ( )} @@ -392,8 +404,8 @@ const EditProfileTemplate: React.FunctionComponent = ({ {base64Image && ( )} diff --git a/client/modules/profile/template.tsx b/client/modules/profile/template.tsx index 88585392..741a0b4c 100644 --- a/client/modules/profile/template.tsx +++ b/client/modules/profile/template.tsx @@ -33,7 +33,6 @@ const ProfileTemplate: React.FunctionComponent = ( const { cityList, countryList, industryList, provinceList, userUuid } = props const t = useI18n() const locale = useCurrentLocale() - const [isEditMode, setIsEditMode] = useState(false) const userStoreUuid = useUserStore((state) => state.uuid) const uuid = useMemo(() => { if (userUuid) { @@ -71,66 +70,39 @@ const ProfileTemplate: React.FunctionComponent = ( ) if (!isLoading && profile) return ( - - {!isEditMode && ( - - )} - - {isEditMode && ( - - )} + + ) diff --git a/client/modules/profile/view/template.tsx b/client/modules/profile/view/template.tsx index fd55650c..b8c976db 100644 --- a/client/modules/profile/view/template.tsx +++ b/client/modules/profile/view/template.tsx @@ -3,18 +3,19 @@ import React from "react" import Link from "next/link" import { useRouter } from "next/navigation" -import LinkTooltip from "@/modules/profile/components/tool-tip/link" +import InfoCard from "@/modules/profile/components/cards/Info" import { useI18n } from "@/utils/services/internationalization/client" import { supabase } from "@/utils/services/supabase/config" import { siteConfig } from "@/config/site" import { cn } from "@/lib/utils" import useUserStore from "@/hooks/state/user/store" -import { Badge } from "@/components/ui/badge" import { Button, buttonVariants } from "@/components/ui/button" import { Checkbox } from "@/components/ui/checkbox" +import { Separator } from "@/components/ui/separator" import { useToast } from "@/components/ui/use-toast" import BaseAvatar from "@/components/customized-ui/avatars/base" +import LocationDisplay from "@/components/customized-ui/info-display/location" import { Icons } from "@/components/icons" export interface IViewProfileTemplateProps { @@ -32,7 +33,6 @@ export interface IViewProfileTemplateProps { isReferer: boolean isReferee: boolean slug: string - setIsEditMode: (value: boolean) => void } const ViewProfileTemplate: React.FunctionComponent< IViewProfileTemplateProps @@ -47,7 +47,6 @@ const ViewProfileTemplate: React.FunctionComponent< province, city, socialMediaUrl, - setIsEditMode, industry, isReferer, isReferee, @@ -80,115 +79,142 @@ const ViewProfileTemplate: React.FunctionComponent< } } return ( -
-
-
- {socialMediaUrl && } - +
+ {isViewingOwnProfile && ( + - )} -
+ + + )} +
+
+ +
-
- -
+
{username}
-
{username}
+
+ {jobTitle &&
{jobTitle}
} + {company &&
@
} + {company &&
{company}
} +
-
- {jobTitle &&
{jobTitle}
} - {company &&
{company}
} -
+
  • + +
  • + +
    + {socialMediaUrl && ( + + + + )} +
    -
  • - {country && ( -
      - {country} -
    - )} - - {province && ( -
      - {province} -
    - )} - {city && ( -
      - {city} -
    - )} -
  • -
  • - {industry && ( -
      - {industry} -
    - )} - - {typeof yearOfExperience === "number" && yearOfExperience >= 0 && ( -
      - - {t("general.year_of_experience_count", { - count: yearOfExperience, - })} - -
    - )} -
  • - -
    -
    - - +
    + + {t("page.post_history")} +
    -
    - - + + +

    {t("general.user_type")}

    + +
    + + + +

    + {t("profile.form.is_referrer_description")} +

    +
    + + + + +

    + {t("profile.form.is_referee_description")} +

    +
    +
    + +

    + {t("general.work_experience")} +

    +
    + + +

    {industry}

    +
    + + {typeof yearOfExperience === "number" && yearOfExperience >= 0 && ( + + +

    + {t("general.year", { + count: yearOfExperience, + })} +

    +
    + )}
    -
    -
    -
    - {description} +

    + {t("general.personal_profile")} +

    +
    +
    + {description} +
    - {isViewingOwnProfile && ( - +
    + +
    )} -
    + ) } diff --git a/client/types/api/response/user.ts b/client/types/api/response/user.ts index b03e90ab..77a6b40a 100644 --- a/client/types/api/response/user.ts +++ b/client/types/api/response/user.ts @@ -1,7 +1,7 @@ export interface IUserResponse { - uuid: string | null - email: string | null - username: string | null + uuid: string + email: string + username: string status: string role: string avatar_url: string | null diff --git a/client/types/supabase.ts b/client/types/supabase.ts index a04c7cb5..34a9cf4c 100644 --- a/client/types/supabase.ts +++ b/client/types/supabase.ts @@ -36,26 +36,26 @@ export interface Database { Tables: { city: { Row: { - cantonese_name: string | null - english_name: string | null + cantonese_name: string + english_name: string id: number - province_uuid: string | null + province_uuid: string uuid: string value: string } Insert: { - cantonese_name?: string | null - english_name?: string | null + cantonese_name: string + english_name: string id?: number - province_uuid?: string | null + province_uuid: string uuid?: string value: string } Update: { - cantonese_name?: string | null - english_name?: string | null + cantonese_name?: string + english_name?: string id?: number - province_uuid?: string | null + province_uuid?: string uuid?: string value?: string } @@ -145,49 +145,49 @@ export interface Database { } country: { Row: { - cantonese_name: string | null - english_name: string | null + cantonese_name: string + english_name: string id: number uuid: string - value: string | null + value: string } Insert: { - cantonese_name?: string | null - english_name?: string | null + cantonese_name: string + english_name: string id?: number uuid?: string - value?: string | null + value: string } Update: { - cantonese_name?: string | null - english_name?: string | null + cantonese_name?: string + english_name?: string id?: number uuid?: string - value?: string | null + value?: string } Relationships: [] } industry: { Row: { - cantonese_name: string | null - english_name: string | null + cantonese_name: string + english_name: string id: number uuid: string - value: string | null + value: string } Insert: { - cantonese_name?: string | null - english_name?: string | null + cantonese_name: string + english_name: string id?: number uuid?: string - value?: string | null + value: string } Update: { - cantonese_name?: string | null - english_name?: string | null + cantonese_name?: string + english_name?: string id?: number uuid?: string - value?: string | null + value?: string } Relationships: [] } @@ -366,25 +366,25 @@ export interface Database { } province: { Row: { - cantonese_name: string | null - country_uuid: string | null - english_name: string | null + cantonese_name: string + country_uuid: string + english_name: string id: number uuid: string value: string } Insert: { - cantonese_name?: string | null - country_uuid?: string | null - english_name?: string | null + cantonese_name: string + country_uuid: string + english_name: string id?: number uuid?: string value: string } Update: { - cantonese_name?: string | null - country_uuid?: string | null - english_name?: string | null + cantonese_name?: string + country_uuid?: string + english_name?: string id?: number uuid?: string value?: string diff --git a/client/utils/services/internationalization/messages/en-ca.ts b/client/utils/services/internationalization/messages/en-ca.ts index a72d0d13..21a5176c 100644 --- a/client/utils/services/internationalization/messages/en-ca.ts +++ b/client/utils/services/internationalization/messages/en-ca.ts @@ -161,11 +161,9 @@ export default { "profile.form.avatar_description": "Accept JPG, JPEG, PNG, and a maximum of 1MB", "general.referrer": "Referrer", - "profile.form.is_referrer_description": - "Your data will be public (except email). If someone wants to join your company, they can reach out to you.", + "profile.form.is_referrer_description": "I refer/hire talents", "general.talent": "Talent", - "profile.form.is_referee_description": - "Your data will be public (except email) on talent list. If someone wants to refer you, they can reach out to you. ", + "profile.form.is_referee_description": "I am ready to contribute", "profile.form.personal_description_label": "Description", "profile.form.optional_company_label": "Company(Optional)", "profile.form.job_title_label": "Job Title", @@ -299,4 +297,11 @@ export default { "referral.form.contact.error.title": "Failed to send message", "referral.form.contact.error.description": "User has not accepted the conversation, or there is an issue on the server.", + + "general.user_type": "User Type", + "general.personal_profile": "Personal Profile", + "general.work_experience": "Work Experience", + "general.year#zero": "{count} years", + "general.year#one": "{count} year", + "general.year#other": "{count} years", } as const diff --git a/client/utils/services/internationalization/messages/zh-hk.ts b/client/utils/services/internationalization/messages/zh-hk.ts index a079b2ef..c6276228 100644 --- a/client/utils/services/internationalization/messages/zh-hk.ts +++ b/client/utils/services/internationalization/messages/zh-hk.ts @@ -145,11 +145,9 @@ export default { "profile.form.avatar_label": "你嘅嘜頭", "profile.form.avatar_description": "食到JPG,JPEG,PNG,最多1MB。", "general.referrer": "推薦人", - "profile.form.is_referrer_description": - "你嘅資料會被公開(Email不會),如果有人想入你間公司,就可以搵你幫手🙏🏻", + "profile.form.is_referrer_description": "我會推薦人/請人", "general.talent": "人才", - "profile.form.is_referee_description": - "你嘅資料會被公開(Email不會)係人才名單,如果有人想招你入佢間公司,就可以搵你,祝一切順利!", + "profile.form.is_referee_description": "我的訴求就是上班", "profile.form.personal_description_label": "個人簡介", "profile.form.optional_company_label": "公司名(選填)", "profile.form.job_title_label": "職位/工作名稱", @@ -275,4 +273,11 @@ export default { "The user has not accepted the conversation", "referral.form.contact.error.title": "傳送訊息失敗", "referral.form.contact.error.description": "對方未接受對話,或者Server壞咗。", + + "general.user_type": "用戶類型", + "general.personal_profile": "個人簡介", + "general.work_experience": "工作經驗", + "general.year#zero": "{count}年", + "general.year#one": "{count}年", + "general.year#other": "{count}年", } as const diff --git a/package.json b/package.json index 74c9c260..93ea7f9d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Referalah", "description": "An open source online platform for oversea Hong Kong People to connect each other", - "version": "1.10.1", + "version": "1.10.3", "license": "Apache-2.0", "scripts": { "prepare": "husky install .husky", diff --git a/supabase/migrations/20240217051241_fix_options_schema.sql b/supabase/migrations/20240217051241_fix_options_schema.sql new file mode 100644 index 00000000..9584ce93 --- /dev/null +++ b/supabase/migrations/20240217051241_fix_options_schema.sql @@ -0,0 +1,25 @@ +alter table "public"."city" alter column "cantonese_name" set not null; + +alter table "public"."city" alter column "english_name" set not null; + +alter table "public"."city" alter column "province_uuid" set not null; + +alter table "public"."country" alter column "cantonese_name" set not null; + +alter table "public"."country" alter column "english_name" set not null; + +alter table "public"."country" alter column "value" set not null; + +alter table "public"."industry" alter column "cantonese_name" set not null; + +alter table "public"."industry" alter column "english_name" set not null; + +alter table "public"."industry" alter column "value" set not null; + +alter table "public"."province" alter column "cantonese_name" set not null; + +alter table "public"."province" alter column "country_uuid" set not null; + +alter table "public"."province" alter column "english_name" set not null; + +