Skip to content

Commit 88d366c

Browse files
authored
Merge pull request #203 from chingu-x/dev
End of sprint 28 merge to main
2 parents be15ddf + b1efba6 commit 88d366c

File tree

69 files changed

+2553
-446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2553
-446
lines changed

CHANGELOG.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,29 @@ Another example [here](https://co-pilot.dev/changelog)
1616

1717
### Removed
1818

19+
20+
## [v1.0.1-alpha]
21+
22+
### Added
23+
- Add units tests for the teams controller & services([#189](https://github.com/chingu-x/chingu-dashboard-be/pull/189))
24+
- Add discord oauth and e2e test ([#194](https://github.com/chingu-x/chingu-dashboard-be/pull/194))
25+
- Add morgan middleware for request logging with custom logger ([#200](https://github.com/chingu-x/chingu-dashboard-be/pull/200))
26+
- Add CASL permissions for Team Sprint endpoint ([#193](https://github.com/chingu-x/chingu-dashboard-be/pull/193))
27+
- Add units tests for the teams resource controller & services([#201](https://github.com/chingu-x/chingu-dashboard-be/pull/201))
28+
29+
### Changed
30+
- updated changelog ([#195](https://github.com/chingu-x/chingu-dashboard-be/pull/195))
31+
- Update accepted localhost port and docker compose file for a custom network setup ([#199](https://github.com/chingu-x/chingu-dashboard-be/pull/199))
32+
33+
### Fixed
34+
- Fix seed data for alpha test (check in form question changes, gravatar) ([#190](https://github.com/chingu-x/chingu-dashboard-be/pull/190))
35+
- revised 2 checkin questions for alpha test ([#192](https://github.com/chingu-x/chingu-dashboard-be/pull/192))
36+
- Fix seed checkin form data for PO and SM , and voyage-role for team 6 ([#196](https://github.com/chingu-x/chingu-dashboard-be/pull/196))
37+
- Bug add check for team id in place memberId ([#197](https://github.com/chingu-x/chingu-dashboard-be/pull/197))
38+
- Update check-in form question ids validation (`checkQuestionsInFormById`) to accept an array of form titles ([#198](https://github.com/chingu-x/chingu-dashboard-be/pull/198))
39+
40+
### Removed
41+
1942
## [v1.0.0-alpha]
2043

2144
### Added
@@ -60,10 +83,11 @@ Another example [here](https://co-pilot.dev/changelog)
6083
- Add units tests for the users controller & services([#179](https://github.com/chingu-x/chingu-dashboard-be/pull/178))
6184
- Add CASL permissions for Team features endpoint ([#184](https://github.com/chingu-x/chingu-dashboard-be/pull/184))
6285
- Add production seed for alpha test ([#185](https://github.com/chingu-x/chingu-dashboard-be/pull/185))
86+
- Add types and validation to env variables ([#187](https://github.com/chingu-x/chingu-dashboard-be/pull/187))
87+
6388

6489

6590

66-
- Add units tests for the teams controller & services([#189](https://github.com/chingu-x/chingu-dashboard-be/pull/189))
6791

6892
### Changed
6993

@@ -105,8 +129,9 @@ Another example [here](https://co-pilot.dev/changelog)
105129
- Fix bug with reading roles after reseeding causes the db to not recognize the tokens stored by the user's browser ([#134](https://github.com/chingu-x/chingu-dashboard-be/pull/134))
106130
- Fix form responses giving error and not inserting values when the boolean value is false ([#156](https://github.com/chingu-x/chingu-dashboard-be/pull/156))
107131
- Fix a bug for check on voyageTeamMemberId ([#159](https://github.com/chingu-x/chingu-dashboard-be/pull/159))
108-
- Fix users unit test failing due to a schema change
109-
- Fix seed data for alpha test (check in form question changes, gravatar) ([#190](https://github.com/chingu-x/chingu-dashboard-be/pull/190))
132+
- Fix users unit test failing due to a schema change ([#182](https://github.com/chingu-x/chingu-dashboard-be/pull/182))
133+
134+
110135

111136
### Removed
112137

docker-compose.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.8"
21
services:
32
postgres:
43
container_name: postgres
@@ -57,7 +56,12 @@ services:
5756
- /usr/src/app/node_modules
5857
- .:/usr/src/app
5958
command: ['yarn', 'start:dev']
59+
6060
volumes:
6161
pgdata:
6262
pgdata-test:
6363
pgadmin-data:
64+
65+
networks:
66+
default:
67+
name: chingu-dashboard-be

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"start:prod": "node dist/main",
1515
"docker:down": "docker compose down",
1616
"docker:clean": "docker compose down -v --remove-orphans",
17-
"docker": "docker-compose up -d",
17+
"docker": "docker compose up -d",
1818
"migrate": "npx prisma migrate dev",
1919
"migrate:test": "dotenv -e ./.env.test npx prisma migrate dev",
2020
"migrate:test:docker": "dotenv -v DATABASE_URL=postgresql://chingu:chingu@postgres-test:5434/dashboard?schema=public -- npx prisma migrate dev",
@@ -46,7 +46,7 @@
4646
"@casl/ability": "^6.7.1",
4747
"@casl/prisma": "^1.4.1",
4848
"@nestjs/common": "^10.0.0",
49-
"@nestjs/config": "^3.0.1",
49+
"@nestjs/config": "^3.2.3",
5050
"@nestjs/core": "^10.0.0",
5151
"@nestjs/jwt": "^10.1.1",
5252
"@nestjs/passport": "^10.0.2",
@@ -60,6 +60,7 @@
6060
"cookie-parser": "^1.4.6",
6161
"dotenv": "^16.3.1",
6262
"lint-staged": "^15.1.0",
63+
"morgan": "^1.10.0",
6364
"node-mailjet": "^6.0.4",
6465
"passport": "^0.6.0",
6566
"passport-discord": "^0.1.4",
@@ -77,7 +78,9 @@
7778
"@types/cookie-parser": "^1.4.6",
7879
"@types/express": "^4.17.17",
7980
"@types/jest": "^29.5.2",
81+
"@types/morgan": "^1.9.9",
8082
"@types/node": "^20.3.1",
83+
"@types/node-mailjet": "^3.3.12",
8184
"@types/passport-discord": "^0.1.13",
8285
"@types/passport-jwt": "^3.0.11",
8386
"@types/passport-local": "^1.0.37",
@@ -93,6 +96,7 @@
9396
"jest": "^29.5.0",
9497
"jest-extended": "^4.0.2",
9598
"jest-mock-extended": "^3.0.7",
99+
"joi": "^17.13.3",
96100
"prettier": "^3.0.0",
97101
"prisma": "^5.16.1",
98102
"source-map-support": "^0.5.21",

prisma/production-seed/users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { prisma } from "../seed/prisma-client";
2-
import { hashPassword } from "../../src/utils/auth";
2+
import { hashPassword } from "../../src/global/auth/utils";
33
import { getRoleId } from "../seed/users";
44
import { generateGravatarUrl } from "../seed/utils";
55

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default [
2+
{
3+
name: "discord",
4+
},
5+
];

prisma/seed/forms/checkinformPO.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const populateCheckinFormPO = async () => {
1616
questions: {
1717
create: [
1818
{
19-
order: 1,
19+
order: 101,
2020
inputType: {
2121
connect: {
2222
name: "checkbox",
@@ -73,7 +73,7 @@ export const populateCheckinFormPO = async () => {
7373
},
7474
},
7575
{
76-
order: 2,
76+
order: 102,
7777
inputType: {
7878
connect: {
7979
name: "text",

prisma/seed/forms/checkinformSM.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const populateCheckinFormSM = async () => {
1616
questions: {
1717
create: [
1818
{
19-
order: 1,
19+
order: 201,
2020
inputType: {
2121
connect: {
2222
name: "boolean",
@@ -26,7 +26,7 @@ export const populateCheckinFormSM = async () => {
2626
answerRequired: true,
2727
},
2828
{
29-
order: 2,
29+
order: 202,
3030
inputType: {
3131
connect: {
3232
name: "boolean",
@@ -36,7 +36,7 @@ export const populateCheckinFormSM = async () => {
3636
answerRequired: true,
3737
},
3838
{
39-
order: 3,
39+
order: 203,
4040
inputType: {
4141
connect: {
4242
name: "boolean",
@@ -46,7 +46,7 @@ export const populateCheckinFormSM = async () => {
4646
answerRequired: true,
4747
},
4848
{
49-
order: 4,
49+
order: 204,
5050
inputType: {
5151
connect: {
5252
name: "text",

prisma/seed/tables.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import InputTypes from "./data/input-types";
1111
import OptionGroups from "./data/option-groups";
1212
import Roles from "./data/roles";
1313
import { prisma } from "./prisma-client";
14+
import OauthProviders from "./data/oauth-providers";
1415

1516
const populateTable = async (tableName: string, data) => {
1617
await prisma[tableName].createMany({
@@ -19,6 +20,7 @@ const populateTable = async (tableName: string, data) => {
1920
console.log(`${tableName} table populated.`);
2021
};
2122

23+
// These are basic data table that will be used in both dev and prod
2224
export const populateTables = async () => {
2325
await populateTable("tier", Tiers);
2426
await populateTable("gender", Genders);
@@ -30,4 +32,5 @@ export const populateTables = async () => {
3032
await populateTable("formType", FormTypes);
3133
await populateTable("inputType", InputTypes);
3234
await populateTable("optionGroup", OptionGroups);
35+
await populateTable("oAuthProvider", OauthProviders);
3336
};

prisma/seed/users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { hashPassword } from "../../src/utils/auth";
1+
import { hashPassword } from "../../src/global/auth/utils";
22
import { prisma } from "./prisma-client";
33
import { generateGravatarUrl } from "./utils";
44

prisma/seed/voyage-teams.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ export const populateVoyageTeams = async () => {
487487
},
488488
voyageRole: {
489489
connect: {
490-
name: voyageRoles[2].name,
490+
name: voyageRoles[1].name,
491491
},
492492
},
493493
status: {

0 commit comments

Comments
 (0)