From c02748e3dd498be2ac5dc2c904e686c9f72537bc Mon Sep 17 00:00:00 2001 From: Salim DELLALI Date: Fri, 11 Nov 2022 12:18:58 +0100 Subject: [PATCH 1/2] updated project description in package.json, updates date and time formats, added client comments to jobber profiles --- package.json | 2 +- src/modules/client/client.service.ts | 28 +++++++++++--- src/modules/jobber/jobber.service.ts | 57 +++++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index e92b97d..f69011a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "yassir-hackathon-backend", "version": "1.0.0", - "description": "", + "description": "YASSIR Home Services, A platform in which users easily find reliable service providers to meet their needs", "author": "salim dellali", "license": "Apache-2.0", "main": "index.js", diff --git a/src/modules/client/client.service.ts b/src/modules/client/client.service.ts index c8c2366..c18ef3c 100644 --- a/src/modules/client/client.service.ts +++ b/src/modules/client/client.service.ts @@ -25,7 +25,10 @@ export default class ClientService { decription: 'I have a stack of 3 sweaters and 2 pants that needs to be ironed', address: "2 Rue Larbi Ben M'hidi, Alger Centre, Alger", - postedAt: '2022-10-11T07:00:00.000Z', + postedAt: { + date: '2022/10/11', + time: '07:00', + }, isProfessionalRequested: false, jobStatus: 'accepted', }, @@ -35,7 +38,10 @@ export default class ClientService { subCategory: 'Car washing', decription: 'I have a car to wash, inside and outside', address: "2 Rue Larbi Ben M'hidi, Alger Centre, Alger", - postedAt: '2022-10-10T08:30:00.000Z', + postedAt: { + date: '2022/10/10', + time: '08:30', + }, isProfessionalRequested: true, jobStatus: 'canceled', }, @@ -45,7 +51,10 @@ export default class ClientService { subCategory: 'Carpet & sofa cleaning', decription: 'I have a 10 windows to be washed', address: 'Cité 1 Mai, Blida, Blida', - postedAt: '2022-10-09T18:30:00.000Z', + postedAt: { + date: '2022/10/09', + time: '18:30', + }, isProfessionalRequested: false, jobStatus: 'completed', }, @@ -55,7 +64,10 @@ export default class ClientService { subCategory: 'Home Cleaning', decription: 'I have 1 floor that need to be cleaned', address: 'Cité 1 Mai, Blida, Blida', - postedAt: '2022-10-10T18:30:00.000Z', + postedAt: { + date: '2022/10/11', + time: '18:30', + }, isProfessionalRequested: false, jobStatus: 'open', }, @@ -81,13 +93,19 @@ export default class ClientService { decription: 'I have a stack of 3 sweaters and 2 pants that needs to be ironed', address: "2 Rue Larbi Ben M'hidi, Alger Centre, Alger", - postedAt: '2022-10-11T07:00:00.000Z', + postedAt: { + date: '2022/10/11', + time: '07:00', + }, isProfessionalRequested: false, jobStatus: 'accepted', }, jobberOffer: [ { + _id: 'jo_1', proposedPrice: 3000, + message: + 'I have an expertise of 10 years in ironing, quality garanteed', jobber: { _id: 'j_1', fullName: 'John Doe', diff --git a/src/modules/jobber/jobber.service.ts b/src/modules/jobber/jobber.service.ts index 0cf482d..bdd5db1 100644 --- a/src/modules/jobber/jobber.service.ts +++ b/src/modules/jobber/jobber.service.ts @@ -13,6 +13,50 @@ export default class JobberService { rating: 5, reviews: 123, jobsDone: 320, + comments: [ + { + _id: 'cm_1', + rating: 5, + postedAt: { + date: '2022/10/06', + time: '19:00', + }, + message: 'does clean work, definetly worth recommending', + client: { + c_id: 'c_2', + fullName: 'Herbert Ramirez', + profilePicture: + 'https://randomuser.me/api/portraits/men/85.jpg', + phone: '+213681000081', + email: 'herbert@gmail.com', + adresses: [ + 'Rue de la gare, Boumerdes, Boumerdes', + 'Rue de la Méditerranée, Tipaza, Tipaza', + ], + requests: [], + }, + }, + { + _id: 'cm_2', + rating: 4, + postedAt: { + date: '2022/10/05', + time: '10:00', + }, + message: + 'overall work is done good, some minor improvements needed', + client: { + c_id: 'c_3', + fullName: 'Kylie Mendoza', + profilePicture: + 'https://randomuser.me/api/portraits/women/12.jpg', + phone: '+213653303030', + email: 'kylie@gmail.com', + adresses: ["Rue de l'université, Bab Ezzouar, Alger"], + requests: ['cr_5'], + }, + }, + ], } return JOBBER @@ -26,7 +70,10 @@ export default class JobberService { subCategory: 'Ironing', decription: 'I have 5 napkins to be ironed', address: "Rue de l'université, Bab Ezzouar, Alger", - postedAt: '2022-10-11T15:00:00.000Z', + postedAt: { + date: '2022/10/11', + time: '15:00', + }, isProfessionalRequested: false, jobStatus: 'open', }, @@ -46,13 +93,19 @@ export default class JobberService { decription: 'I have a stack of 3 sweaters and 2 pants that needs to be ironed', address: "2 Rue Larbi Ben M'hidi, Alger Centre, Alger", - postedAt: '2022-10-11T07:00:00.000Z', + postedAt: { + date: '2022/10/11', + time: '07:00', + }, isProfessionalRequested: false, jobStatus: 'accepted', }, jobberOffer: [ { + _id: 'jo_1', proposedPrice: 3000, + message: + 'I have an expertise of 10 years in ironing, quality garanteed', jobber: { _id: 'j_1', fullName: 'John Doe', From 681020dd38fdf4e500485bf4ad68aadc496a8892 Mon Sep 17 00:00:00 2001 From: Salim DELLALI Date: Fri, 11 Nov 2022 12:48:09 +0100 Subject: [PATCH 2/2] added missing comments on jobbers profiles --- src/modules/client/client.service.ts | 47 +++++++++++ src/modules/jobber/jobber.service.ts | 119 +++++++++++++++++++++++++++ 2 files changed, 166 insertions(+) diff --git a/src/modules/client/client.service.ts b/src/modules/client/client.service.ts index c18ef3c..a72aff1 100644 --- a/src/modules/client/client.service.ts +++ b/src/modules/client/client.service.ts @@ -120,6 +120,53 @@ export default class ClientService { rating: 5, reviews: 123, jobsDone: 320, + comments: [ + { + _id: 'cm_1', + rating: 5, + postedAt: { + date: '2022/10/06', + time: '19:00', + }, + message: + 'does clean work, definetly worth recommending', + client: { + c_id: 'c_2', + fullName: 'Herbert Ramirez', + profilePicture: + 'https://randomuser.me/api/portraits/men/85.jpg', + phone: '+213681000081', + email: 'herbert@gmail.com', + adresses: [ + 'Rue de la gare, Boumerdes, Boumerdes', + 'Rue de la Méditerranée, Tipaza, Tipaza', + ], + requests: [], + }, + }, + { + _id: 'cm_2', + rating: 4, + postedAt: { + date: '2022/10/05', + time: '10:00', + }, + message: + 'overall work is done good, some minor improvements needed', + client: { + c_id: 'c_3', + fullName: 'Kylie Mendoza', + profilePicture: + 'https://randomuser.me/api/portraits/women/12.jpg', + phone: '+213653303030', + email: 'kylie@gmail.com', + adresses: [ + "Rue de l'université, Bab Ezzouar, Alger", + ], + requests: ['cr_5'], + }, + }, + ], }, }, ], diff --git a/src/modules/jobber/jobber.service.ts b/src/modules/jobber/jobber.service.ts index bdd5db1..12c0f49 100644 --- a/src/modules/jobber/jobber.service.ts +++ b/src/modules/jobber/jobber.service.ts @@ -120,6 +120,53 @@ export default class JobberService { rating: 5, reviews: 123, jobsDone: 320, + comments: [ + { + _id: 'cm_1', + rating: 5, + postedAt: { + date: '2022/10/06', + time: '19:00', + }, + message: + 'does clean work, definetly worth recommending', + client: { + c_id: 'c_2', + fullName: 'Herbert Ramirez', + profilePicture: + 'https://randomuser.me/api/portraits/men/85.jpg', + phone: '+213681000081', + email: 'herbert@gmail.com', + adresses: [ + 'Rue de la gare, Boumerdes, Boumerdes', + 'Rue de la Méditerranée, Tipaza, Tipaza', + ], + requests: [], + }, + }, + { + _id: 'cm_2', + rating: 4, + postedAt: { + date: '2022/10/05', + time: '10:00', + }, + message: + 'overall work is done good, some minor improvements needed', + client: { + c_id: 'c_3', + fullName: 'Kylie Mendoza', + profilePicture: + 'https://randomuser.me/api/portraits/women/12.jpg', + phone: '+213653303030', + email: 'kylie@gmail.com', + adresses: [ + "Rue de l'université, Bab Ezzouar, Alger", + ], + requests: ['cr_5'], + }, + }, + ], }, }, ], @@ -146,6 +193,53 @@ export default class JobberService { rating: 5, reviews: 123, jobsDone: 320, + comments: [ + { + _id: 'cm_1', + rating: 5, + postedAt: { + date: '2022/10/06', + time: '19:00', + }, + message: + 'does clean work, definetly worth recommending', + client: { + c_id: 'c_2', + fullName: 'Herbert Ramirez', + profilePicture: + 'https://randomuser.me/api/portraits/men/85.jpg', + phone: '+213681000081', + email: 'herbert@gmail.com', + adresses: [ + 'Rue de la gare, Boumerdes, Boumerdes', + 'Rue de la Méditerranée, Tipaza, Tipaza', + ], + requests: [], + }, + }, + { + _id: 'cm_2', + rating: 4, + postedAt: { + date: '2022/10/05', + time: '10:00', + }, + message: + 'overall work is done good, some minor improvements needed', + client: { + c_id: 'c_3', + fullName: 'Kylie Mendoza', + profilePicture: + 'https://randomuser.me/api/portraits/women/12.jpg', + phone: '+213653303030', + email: 'kylie@gmail.com', + adresses: [ + "Rue de l'université, Bab Ezzouar, Alger", + ], + requests: ['cr_5'], + }, + }, + ], }, { _id: 'j_2', @@ -160,6 +254,31 @@ export default class JobberService { rating: 4, reviews: 88, jobsDone: 120, + comments: [ + { + _id: 'cm_3', + rating: 4, + postedAt: { + date: '2022/10/05', + time: '11:00', + }, + message: + 'teacher with working experience and pedagogical approach', + client: { + c_id: 'c_2', + fullName: 'Herbert Ramirez', + profilePicture: + 'https://randomuser.me/api/portraits/men/85.jpg', + phone: '+213681000081', + email: 'herbert@gmail.com', + adresses: [ + 'Rue de la gare, Boumerdes, Boumerdes', + 'Rue de la Méditerranée, Tipaza, Tipaza', + ], + requests: [], + }, + }, + ], }, ]