Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New UI #47

Merged
merged 43 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a582ffc
feat!(frontend): Setup primereact
Jul 20, 2024
cdf76db
Merge branch 'main' into frontend
Jul 22, 2024
c12633b
chore(frontend): Fix merging error
Jul 22, 2024
750623e
chore(frontend): Refactor
Jul 22, 2024
f6148ca
feat(frontend): Add templates and Navigation
Jul 22, 2024
c84db60
fix(frontend): App logo
Jul 23, 2024
778b867
feat(frontend): Error pages
Jul 23, 2024
338f69e
chore(frontend): Formatting
Jul 23, 2024
92a86dc
fix(frontend): Fix double redirect
Jul 23, 2024
478d579
chore(frontend): Add toasts
Jul 23, 2024
2037a6a
fix(frontend): Fix domain code
Jul 23, 2024
9e1533e
feat(frontend): New logo
Jul 23, 2024
b64d029
fix(backend): Remove identity db
Jul 23, 2024
33c3ce4
Merge branch 'main' into frontend
Jul 23, 2024
43cb41d
fix(frontend): API call authentication
Jul 23, 2024
a212760
chore(frontend): Remove old code
Jul 24, 2024
ad42539
feat(frontend): Use tailwind
Jul 24, 2024
ea1f5fd
feat!: Set list page
Jul 25, 2024
50db726
chore: Update editorconfig
Jul 25, 2024
3e0f663
ci: Fix eslint workflow
Jul 25, 2024
47adbcb
ci:: Fix eslint workflow
Jul 25, 2024
843412c
ci: Fix eslint workflow
Jul 25, 2024
ccae105
ci: Fix eslint workflow
Jul 25, 2024
f884ebf
chore: Fix eclint errors
Jul 25, 2024
8d14928
ci: Fix eslint workflow
Jul 25, 2024
cfe3362
ci: Fix eslint workflow
Jul 25, 2024
07ccb39
chore(frontend): Refactor
Jul 25, 2024
254e343
fix: DataView not updating
Jul 26, 2024
ec484de
fix: Page templates
Jul 26, 2024
02c5525
fix: Set loading
Jul 26, 2024
2069851
feat: Add set overview page
Jul 26, 2024
079068e
fix: Use router navigation in menus
Jul 26, 2024
6676843
feat: Add button to delete set
Jul 26, 2024
8ebcbac
chore: Remove IDE config
bennetrr Aug 1, 2024
ee000d6
chore: Reinit IDEs
bennetrr Aug 1, 2024
153c546
fix: Visual bugs
bennetrr Aug 4, 2024
97fed98
chore: Fix naming
bennetrr Aug 4, 2024
54414f4
feat: Part list
bennetrr Aug 4, 2024
e378566
chore: IDE settings
bennetrr Aug 4, 2024
adfce95
fix(backend): Fix wrong part counts in sets
bennetrr Aug 11, 2024
2baebe4
ci: Add prettier check
bennetrr Aug 11, 2024
b0b4a66
chore: Fix code style
bennetrr Aug 11, 2024
b840c47
chore: Fix code style
bennetrr Aug 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@ indent_size = 4
charset = unset
indent_size = unset
indent_style = unset

[src/backend/Bennetr.BrickInv.Api/Bennetr.BrickInv.Api/Services/Email/*.cs]
indent_size = unset
trim_trailing_whitespace = false
31 changes: 23 additions & 8 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,24 @@ jobs:
run: |
npx eclint check .

prettier:
name: Lint frontend with prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run prettier
working-directory: src/frontend
run: |
npx prettier --check .

eslint:
name: Lint frontend with eslint
runs-on: ubuntu-latest
permissions:
security-events: write
pull-requests: write
checks: write
contents: read
steps:
- uses: actions/checkout@v4
Expand All @@ -36,18 +49,20 @@ jobs:
with:
node-version-file: src/frontend/package.json
cache-dependency-path: src/frontend/pnpm-lock.yaml
cache: 'pnpm'
cache: pnpm

- name: Install dependencies
working-directory: src/frontend
run: |
pnpm install
pnpm install --frozen-lockfile

- name: Run eslint
uses: sibiraj-s/action-eslint@v3.0.1
working-directory: src/frontend
run: |
pnpm lint --format json --output-file result.json

- name: Upload eslint results
if: always()
uses: ldiego73/eslint-report-action@v1.1
with:
working-directory: src/frontend
token: ${{ secrets.GITHUB_TOKEN }}
all-files: true
eslint-args: '--report-unused-disable-directives --max-warnings 0'
annotations: true
report: src/frontend/result.json
6 changes: 0 additions & 6 deletions .idea/GitLink.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/brickinv.iml

This file was deleted.

36 changes: 1 addition & 35 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

5 changes: 1 addition & 4 deletions setup.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
CREATE
DATABASE IF NOT EXISTS identity;
CREATE
DATABASE IF NOT EXISTS brickinv;
CREATE DATABASE IF NOT EXISTS brickinv;
5 changes: 0 additions & 5 deletions src/backend/Bennetr.BrickInv.Api/.config/dotnet-tools.json

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Bennetr.RebrickableDotNet.Models.Minifigs;
using Bennetr.RebrickableDotNet.Models.Parts;
using Bennetr.RebrickableDotNet.Models.Sets;
using Clerk.Net.Client;
using Mapster;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
Expand Down Expand Up @@ -128,7 +127,6 @@ public async Task<ActionResult<SetDto>> CreateSet([FromBody] CreateSetRequest re
SetName = rebrickableSet.Name,
ReleaseYear = rebrickableSet.Year,
ImageUri = new Uri(rebrickableSet.SetImgUrl),
TotalParts = rebrickableSet.NumParts,
PresentParts = 0,
Finished = false,
ForSale = request.ForSale,
Expand All @@ -149,20 +147,22 @@ public async Task<ActionResult<SetDto>> CreateSet([FromBody] CreateSetRequest re
ImageUri = x.Part.PartImgUrl is null ? null : new Uri(x.Part.PartImgUrl),
TotalCount = x.Quantity,
PresentCount = 0
}).Concat(
rebrickableMinifigs.Results
.Select(x => new Part
{
Id = Guid.NewGuid().ToString(),
Set = set,
Created = DateTime.Now,
Updated = DateTime.Now,
PartId = x.SetNum,
PartName = x.SetName,
ImageUri = new Uri(x.SetImgUrl),
TotalCount = x.Quantity,
PresentCount = 0
}));
})
.Concat(rebrickableMinifigs.Results.Select(x => new Part
{
Id = Guid.NewGuid().ToString(),
Set = set,
Created = DateTime.Now,
Updated = DateTime.Now,
PartId = x.SetNum,
PartName = x.SetName,
ImageUri = new Uri(x.SetImgUrl),
TotalCount = x.Quantity,
PresentCount = 0
}))
.ToList();

set.TotalParts = parts.Select(x => x.TotalCount).Sum();

context.Sets.Add(set);
context.Parts.AddRange(parts);
Expand Down
Loading
Loading