diff --git a/backend/package.json b/backend/package.json index ca184b2..976a113 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "evora-backend", - "version": "1.4.3", + "version": "1.4.4", "description": "Evora connects customers with event organizers quickly through detailed online booking.", "repository": "https://github.com/bakaqc/evora-17c", "author": "Quốc Chương", diff --git a/backend/src/domains/parties/parties.controller.ts b/backend/src/domains/parties/parties.controller.ts index da6be84..e34d27f 100644 --- a/backend/src/domains/parties/parties.controller.ts +++ b/backend/src/domains/parties/parties.controller.ts @@ -29,9 +29,8 @@ export class PartiesController { return await this.partiesService.create(createPartyDto); } - @Roles(Role.SUPER_ADMIN) @Public() - @ApiOperation({ summary: 'Fetch all parties - Super Admin only' }) + @ApiOperation({ summary: 'Fetch all parties' }) @Get() async getAll() { return await this.partiesService.getAll(); diff --git a/backend/src/domains/reviews/reviews.controller.ts b/backend/src/domains/reviews/reviews.controller.ts index d982d64..665c0f8 100644 --- a/backend/src/domains/reviews/reviews.controller.ts +++ b/backend/src/domains/reviews/reviews.controller.ts @@ -10,8 +10,6 @@ import { import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { Public } from '@/domains/auth/decorators/public.decorator'; -import { Roles } from '@/domains/auth/decorators/roles.decorator'; -import { Role } from '@/domains/auth/enums/role.enum'; import { CreateReviewDto } from '@/domains/reviews/dto/createReview.dto'; import { UpdateReviewDto } from '@/domains/reviews/dto/updateReview.dto'; import { ReviewsService } from '@/domains/reviews/reviews.service'; @@ -28,9 +26,8 @@ export class ReviewsController { return await this.reviewsService.create(createReviewDto); } - @Roles(Role.SUPER_ADMIN) @Public() - @ApiOperation({ summary: 'Fetch all reviews - Super Admin only' }) + @ApiOperation({ summary: 'Fetch all reviews' }) @Get() async getAll() { return await this.reviewsService.getAll(); diff --git a/backend/src/domains/users/dto/updateUser.dto.ts b/backend/src/domains/users/dto/updateUser.dto.ts index 015f77b..0d6ae46 100644 --- a/backend/src/domains/users/dto/updateUser.dto.ts +++ b/backend/src/domains/users/dto/updateUser.dto.ts @@ -36,20 +36,4 @@ export class UpdateUserDto { @ApiPropertyOptional({ description: 'User avatar' }) avatar?: string; - - @ApiPropertyOptional({ description: 'User role' }) - @ValidateIf((o) => o.role !== undefined) - @IsIn(['user', 'admin', 'super-admin'], { - message: 'Role must be user, admin or super-admin', - }) - role?: string; - - @ApiPropertyOptional({ description: 'User verification code' }) - verificationCode?: string; - - @ApiPropertyOptional({ description: 'User verification code expires' }) - verificationCodeExpires?: Date; - - @ApiPropertyOptional({ description: 'User is verified' }) - isVerified?: boolean; } diff --git a/frontend/package.json b/frontend/package.json index 451dbea..5481c37 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,17 +15,17 @@ "react": "18.3.1", "react-dom": "18.3.1", "react-icon": "1.0.0", - "react-icons": "^5.4.0", - "react-redux": "^9.2.0", - "react-router-dom": "^7.1.0", - "slick-carousel": "^1.8.1" + "react-icons": "5.4.0", + "react-redux": "9.2.0", + "react-router-dom": "7.1.0", + "slick-carousel": "1.8.1" }, "devDependencies": { "@eslint/js": "9.17.0", "@types/react": "18.3.17", "@types/react-dom": "18.3.5", "@vitejs/plugin-react-swc": "3.5.0", - "autoprefixer": "^10.4.20", + "autoprefixer": "10.4.20", "eslint": "9.17.0", "eslint-plugin-react-hooks": "5.0.0", "eslint-plugin-react-refresh": "0.4.16", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 220f773..68d9a12 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -24,16 +24,16 @@ importers: specifier: 1.0.0 version: 1.0.0(babel-runtime@5.8.38)(react@18.3.1) react-icons: - specifier: ^5.4.0 + specifier: 5.4.0 version: 5.4.0(react@18.3.1) react-redux: - specifier: ^9.2.0 + specifier: 9.2.0 version: 9.2.0(@types/react@18.3.17)(react@18.3.1)(redux@5.0.1) react-router-dom: - specifier: ^7.1.0 + specifier: 7.1.0 version: 7.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) slick-carousel: - specifier: ^1.8.1 + specifier: 1.8.1 version: 1.8.1(jquery@3.7.1) devDependencies: '@eslint/js': @@ -49,7 +49,7 @@ importers: specifier: 3.5.0 version: 3.5.0(vite@6.0.3(jiti@1.21.7)(yaml@2.6.1)) autoprefixer: - specifier: ^10.4.20 + specifier: 10.4.20 version: 10.4.20(postcss@8.4.49) eslint: specifier: 9.17.0 diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 5e44e0b..05888a1 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -7,6 +7,7 @@ import { LoginAdmin, LoginUser, RegisterUser, + VerifyOTP, } from '@/containers/public'; import { path } from '@/ultils/constant'; @@ -20,6 +21,7 @@ const App: React.FC = () => { } /> } /> } /> + } /> ); diff --git a/frontend/src/components/Contact.tsx b/frontend/src/components/Contact.tsx deleted file mode 100644 index 866aca8..0000000 --- a/frontend/src/components/Contact.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { text } from '../ultils/dataContact'; -import React from 'react'; - -interface Contact { - text: string; - phone: string; - zalo: string; -} - -const Contacts: React.FC = () => { - return ( -
- thumbnail -

{text.content}

-
- {text.contact.map((item: Contact) => { - return ( -
- - {item.text} - - - {item.phone} - - - {item.zalo} - -
- ); - })} -
-
- ); -}; - -export default Contacts; diff --git a/frontend/src/components/index.ts b/frontend/src/components/index.ts index 0f32271..5a67721 100644 --- a/frontend/src/components/index.ts +++ b/frontend/src/components/index.ts @@ -1,6 +1,5 @@ export { default as Button } from './Button'; export { default as Intro } from './Intro'; -export { default as Contact } from './Contact'; export { default as List } from './List'; export { default as Item } from './Item'; export { default as TopBar } from './TopBar'; diff --git a/frontend/src/containers/public/Home.tsx b/frontend/src/containers/public/Home.tsx index 0ba80c6..340d593 100644 --- a/frontend/src/containers/public/Home.tsx +++ b/frontend/src/containers/public/Home.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Outlet } from 'react-router-dom'; -import { Banner, Contact, Intro, TopBar } from '@/components'; +import { Banner, Intro, TopBar } from '@/components'; import { Footer, Navigation } from '@/containers/public'; const Home: React.FC = () => { @@ -15,10 +15,8 @@ const Home: React.FC = () => { -