Skip to content

Commit

Permalink
Merge branch 'main' into 1495-implement-image-upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaehyeon1020 committed May 14, 2024
2 parents dbc5dfc + 0c7d501 commit cedef4a
Show file tree
Hide file tree
Showing 32 changed files with 2,155 additions and 2,053 deletions.
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
"hashicorp.terraform",
"ms-azuretools.vscode-docker",
"prisma.prisma"
]
],
"settings": {
"extensions.verifySignature": false
}
}
},
"features": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:

- name: Terraform Init
working-directory: ./apps/infra/deploy
run: terraform init
run: terraform init -upgrade

# TODO: plan in the other job, and reuse the plan file
- name: Terraform Plan
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
scripts/deploy.sh
.env.stage
apps/infra/stage/Caddyfile
grafana-logs/promtail/promtail-config.yml
apps/grafana-logs/promtail/promtail-config.yml
- name: Load dotenv from secret
run: |
Expand Down
4 changes: 2 additions & 2 deletions apps/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### BUILDER ###
ARG target=client

FROM node:20.12.2-alpine AS builder
FROM node:20.13.0-alpine AS builder
ARG target

COPY . /build
Expand All @@ -18,7 +18,7 @@ RUN npx prisma generate
RUN npm run build ${target}

### PRODUCTION ###
FROM node:20.12.2-alpine
FROM node:20.13.0-alpine
ARG target

ENV NODE_ENV=production
Expand Down
32 changes: 16 additions & 16 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
},
"dependencies": {
"@apollo/server": "^4.10.4",
"@aws-sdk/client-s3": "^3.567.0",
"@aws-sdk/client-ses": "^3.567.0",
"@aws-sdk/credential-provider-node": "^3.567.0",
"@aws-sdk/client-s3": "^3.572.0",
"@aws-sdk/client-ses": "^3.572.0",
"@aws-sdk/credential-provider-node": "^3.572.0",
"@golevelup/nestjs-rabbitmq": "^5.3.0",
"@nestjs-modules/mailer": "^1.11.2",
"@nestjs-modules/mailer": "^2.0.2",
"@nestjs/apollo": "^12.1.0",
"@nestjs/axios": "^3.0.2",
"@nestjs/cache-manager": "^2.2.2",
Expand All @@ -36,16 +36,16 @@
"@nestjs/platform-express": "^10.3.8",
"@nestjs/swagger": "^7.3.1",
"@opentelemetry/api": "~1.8.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.51.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.51.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.51.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.51.1",
"@opentelemetry/host-metrics": "^0.35.1",
"@opentelemetry/instrumentation-express": "^0.38.0",
"@opentelemetry/instrumentation-http": "^0.51.0",
"@opentelemetry/resources": "^1.24.0",
"@opentelemetry/sdk-metrics": "^1.24.0",
"@opentelemetry/sdk-node": "^0.51.0",
"@opentelemetry/sdk-trace-node": "^1.24.0",
"@opentelemetry/semantic-conventions": "^1.24.0",
"@opentelemetry/instrumentation-http": "^0.51.1",
"@opentelemetry/resources": "^1.24.1",
"@opentelemetry/sdk-metrics": "^1.24.1",
"@opentelemetry/sdk-node": "^0.51.1",
"@opentelemetry/sdk-trace-node": "^1.24.1",
"@opentelemetry/semantic-conventions": "^1.24.1",
"@prisma/client": "^5.13.0",
"@prisma/instrumentation": "~5.13.0",
"argon2": "^0.40.1",
Expand Down Expand Up @@ -76,7 +76,7 @@
"pino-pretty": "^11.0.0",
"reflect-metadata": "^0.2.1",
"sql-formatter": "^15.3.1",
"zod": "^3.23.5"
"zod": "^3.23.8"
},
"devDependencies": {
"@faker-js/faker": "^8.4.1",
Expand All @@ -85,12 +85,12 @@
"@nestjs/schematics": "^10.1.1",
"@nestjs/testing": "^10.3.8",
"@types/cache-manager": "^4.0.6",
"@types/chai": "^4.3.15",
"@types/chai": "^4.3.16",
"@types/chai-as-promised": "^7.1.8",
"@types/express": "^4.17.21",
"@types/graphql-upload": "8.0.12",
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.8",
"@types/node": "^20.12.11",
"@types/nodemailer": "^6.4.15",
"@types/passport-jwt": "^4.0.1",
"@types/proxyquire": "^1.3.31",
Expand All @@ -102,7 +102,7 @@
"prisma": "^5.13.0",
"prisma-nestjs-graphql": "^20.0.2",
"proxyquire": "^2.1.3",
"sinon": "^17.0.1",
"sinon": "^17.0.2",
"source-map-support": "^0.5.21",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
Expand Down
49 changes: 26 additions & 23 deletions apps/frontend/app/admin/_components/GroupSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
Command,
CommandEmpty,
CommandGroup,
CommandItem
CommandItem,
CommandList
} from '@/components/ui/command'
import {
Popover,
Expand Down Expand Up @@ -56,28 +57,30 @@ export default function GroupSelect() {
</PopoverTrigger>
<PopoverContent className="mx-2 w-48 p-0 font-semibold">
<Command>
<CommandEmpty>No group found.</CommandEmpty>
<CommandGroup>
{groups.map((framework) => (
<CommandItem
key={framework.id}
value={framework.id}
className="text-slate-600"
onSelect={(currentValue) => {
setValue(currentValue === value ? '' : currentValue)
setOpen(false)
}}
>
<Check
className={cn(
'mr-2 h-4 w-4',
value === framework.id ? 'opacity-100' : 'opacity-0'
)}
/>
{framework.label}
</CommandItem>
))}
</CommandGroup>
<CommandList>
<CommandEmpty>No group found.</CommandEmpty>
<CommandGroup>
{groups.map((framework) => (
<CommandItem
key={framework.id}
value={framework.id}
className="text-slate-600"
onSelect={(currentValue) => {
setValue(currentValue === value ? '' : currentValue)
setOpen(false)
}}
>
<Check
className={cn(
'mr-2 h-4 w-4',
value === framework.id ? 'opacity-100' : 'opacity-0'
)}
/>
{framework.label}
</CommandItem>
))}
</CommandGroup>
</CommandList>
</Command>
</PopoverContent>
</Popover>
Expand Down
29 changes: 16 additions & 13 deletions apps/frontend/components/CheckboxSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
Command,
CommandEmpty,
CommandGroup,
CommandItem
CommandItem,
CommandList
} from '@/components/ui/command'
import {
Popover,
Expand Down Expand Up @@ -91,18 +92,20 @@ export default function LanguageSelect<T extends string>({

<PopoverContent className="w-[115px] p-0" align="start">
<Command>
<CommandEmpty>No language found.</CommandEmpty>
<CommandGroup>
{options.map((option) => (
<CommandItem key={option} value={option} className="gap-x-2">
<Checkbox
checked={selectedValues.includes(option)}
onCheckedChange={() => handleCheckboxChange(option)}
></Checkbox>
{option}
</CommandItem>
))}
</CommandGroup>
<CommandList>
<CommandEmpty>No language found.</CommandEmpty>
<CommandGroup>
{options.map((option) => (
<CommandItem key={option} value={option} className="gap-x-2">
<Checkbox
checked={selectedValues.includes(option)}
onCheckedChange={() => handleCheckboxChange(option)}
></Checkbox>
{option}
</CommandItem>
))}
</CommandGroup>
</CommandList>
</Command>
</PopoverContent>
</Popover>
Expand Down
49 changes: 26 additions & 23 deletions apps/frontend/components/DataTableLangFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
Command,
CommandEmpty,
CommandGroup,
CommandItem
CommandItem,
CommandList
} from '@/components/ui/command'
import {
Popover,
Expand Down Expand Up @@ -73,28 +74,30 @@ export default function DataTableLangFilter<TData, TValue>({

<PopoverContent className="w-[115px] p-0" align="start">
<Command>
<CommandEmpty>No language found.</CommandEmpty>
<CommandGroup>
{options.map((option) => (
<CommandItem key={option} value={option} className="gap-x-2">
<Checkbox
checked={selectedValues.has(option)}
onCheckedChange={() => {
if (selectedValues.has(option)) {
selectedValues.delete(option)
} else {
selectedValues.add(option)
}
const filterValues = Array.from(selectedValues)
column?.setFilterValue(
filterValues.length ? filterValues : undefined
)
}}
/>
{option}
</CommandItem>
))}
</CommandGroup>
<CommandList>
<CommandEmpty>No language found.</CommandEmpty>
<CommandGroup>
{options.map((option) => (
<CommandItem key={option} value={option} className="gap-x-2">
<Checkbox
checked={selectedValues.has(option)}
onCheckedChange={() => {
if (selectedValues.has(option)) {
selectedValues.delete(option)
} else {
selectedValues.add(option)
}
const filterValues = Array.from(selectedValues)
column?.setFilterValue(
filterValues.length ? filterValues : undefined
)
}}
/>
{option}
</CommandItem>
))}
</CommandGroup>
</CommandList>
</Command>
</PopoverContent>
</Popover>
Expand Down
5 changes: 4 additions & 1 deletion apps/frontend/components/auth/SignUpRegister.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default function SignUpRegister() {
const [inputFocus, setInputFocus] = useState<number>(0)
const [disableUsername, setDisableUsername] = useState<boolean>(false)
const [usernameVerify, setUsernameVerify] = useState<boolean>(false)
const [signUpDisable, setSignUpDisable] = useState<boolean>(false)

const {
handleSubmit,
Expand All @@ -75,6 +76,7 @@ export default function SignUpRegister() {
username: string
}) => {
try {
setSignUpDisable(true)
await fetch(baseUrl + '/user/sign-up', {
method: 'POST',
headers: {
Expand All @@ -94,6 +96,7 @@ export default function SignUpRegister() {
})
} catch {
toast.error('Sign up failed!')
setSignUpDisable(false)
}
}
const validation = async (field: string) => {
Expand Down Expand Up @@ -269,7 +272,7 @@ export default function SignUpRegister() {
</div>

<Button
disabled={!isValid || !disableUsername}
disabled={!isValid || !disableUsername || signUpDisable}
className={cn(isValid && disableUsername ? '' : 'bg-gray-400')}
type="submit"
>
Expand Down
Loading

0 comments on commit cedef4a

Please sign in to comment.