Skip to content
Open

Dev #42

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
f184488
dev test load menu with role permission
felix9611 Mar 21, 2025
41bc5b4
update for user permission test
felix9611 Mar 21, 2025
c861890
UPDATE user frontend access control in users
felix9611 Mar 21, 2025
94b0f61
Merge pull request #1 from felix9611/dev
felix9611 Mar 21, 2025
c4bde29
Merge pull request #2 from felix9611/dev
felix9611 Mar 21, 2025
3ac34a0
update for dept & menu page user access control
felix9611 Mar 21, 2025
c79d935
Merge pull request #3 from felix9611/dev
felix9611 Mar 21, 2025
5df42ab
Merge pull request #4 from felix9611/main
felix9611 Mar 21, 2025
9209f51
bugs fix
felix9611 Mar 21, 2025
582cf9c
add user access control
felix9611 Mar 22, 2025
83df37a
update user access control
felix9611 Mar 22, 2025
1ce6165
update user access control
felix9611 Mar 22, 2025
7749b78
add user access function control
felix9611 Mar 22, 2025
34ddc2a
add user access function control
felix9611 Mar 22, 2025
ea00799
fix
felix9611 Mar 22, 2025
9c18700
Merge pull request #5 from felix9611/dev
felix9611 Mar 22, 2025
4f52f70
ADD user access control
felix9611 Mar 22, 2025
a66abb5
remove useless files
felix9611 Mar 22, 2025
7f9927b
Merge pull request #6 from felix9611/dev
felix9611 Mar 22, 2025
64e2c84
Merge pull request #7 from felix9611/main
felix9611 Mar 22, 2025
62c6d1a
update and remove useless code
felix9611 Mar 22, 2025
a70906e
add xlxs function
felix9611 Mar 22, 2025
04001fe
Merge branch 'dev' of https://github.com/felix9611/nest-fixedasset-mo…
felix9611 Mar 22, 2025
b3743a9
Merge pull request #8 from felix9611/dev
felix9611 Mar 22, 2025
87ade64
ui update
felix9611 Mar 22, 2025
794683b
Merge pull request #9 from felix9611/dev
felix9611 Mar 22, 2025
187dc0b
access logic change
felix9611 Mar 22, 2025
8ae177f
add excel db field match module
felix9611 Mar 22, 2025
15e5c22
add method
felix9611 Mar 22, 2025
c0a0c40
update excel field match service
felix9611 Mar 22, 2025
683938e
add excel field match controller in backend
felix9611 Mar 22, 2025
a087376
add excel field setting frontend
felix9611 Mar 22, 2025
6309e30
style update
felix9611 Mar 22, 2025
4c90484
add api doc to budget
felix9611 Mar 22, 2025
46ea87a
Merge pull request #10 from felix9611/v1.0
felix9611 Mar 23, 2025
955c406
update excel helper
felix9611 Mar 23, 2025
d235c13
Merge branch 'dev' of https://github.com/felix9611/nest-fixedasset-mo…
felix9611 Mar 23, 2025
e915296
Merge pull request #11 from felix9611/dev
felix9611 Mar 23, 2025
9f6e93c
add download template and excel import function
felix9611 Mar 23, 2025
1265fe9
sys role & menu form update
felix9611 Mar 23, 2025
a9f785d
fix label
felix9611 Mar 23, 2025
942940a
Merge pull request #12 from felix9611/dev
felix9611 Mar 23, 2025
a461023
change user access function
felix9611 Mar 23, 2025
1bc7567
add new chart query
felix9611 Mar 23, 2025
d091929
add query
felix9611 Mar 23, 2025
d031658
Merge pull request #13 from felix9611/dev
felix9611 Mar 23, 2025
4675177
style update
felix9611 Mar 23, 2025
17bcb42
Merge pull request #14 from felix9611/dev
felix9611 Mar 23, 2025
ed02b6c
readme init's readme
felix9611 Mar 23, 2025
82ea287
Merge pull request #15 from felix9611/dev
felix9611 Mar 24, 2025
2af7077
update readme
felix9611 Mar 24, 2025
d41b708
Merge pull request #17 from felix9611/v1.0
felix9611 Mar 24, 2025
187f7a2
Update README.md
felix9611 Mar 24, 2025
6a95b00
add import data for tax information
felix9611 Mar 25, 2025
b9f7c9f
Merge branch 'dev' of https://github.com/felix9611/nest-fixedasset-mo…
felix9611 Mar 25, 2025
22a2310
add import api for location & department
felix9611 Mar 25, 2025
1d873ea
update asset type import data api
felix9611 Mar 25, 2025
1bee37d
add import api for budget
felix9611 Mar 25, 2025
71c1d4f
fix frontend a bit issue
felix9611 Mar 26, 2025
4f8dbf0
update tax info frontend
felix9611 Mar 26, 2025
bc6bfe3
keyword miss
felix9611 Mar 26, 2025
34cd269
update keyword
felix9611 Mar 26, 2025
3a3945e
add unit test
felix9611 Mar 26, 2025
f09b266
fixed and ran unit test in code type
felix9611 Mar 26, 2025
523b9e0
add unit test
felix9611 Mar 26, 2025
b1d1a55
add location & asset type unit text update
felix9611 Mar 26, 2025
a595481
add test case
felix9611 Mar 26, 2025
5f4b88c
add budget api unit test
felix9611 Mar 27, 2025
5923d78
unit test files res change & add action record unit test file with fi…
felix9611 Mar 27, 2025
c04e784
add test case in action record
felix9611 Mar 27, 2025
151039a
add new access guard
felix9611 Mar 27, 2025
5bd536c
add ngOnDestroy for subscribe menu of rights
felix9611 Mar 27, 2025
c3f525c
fallbback
felix9611 Mar 27, 2025
b15a5a6
FIX menu issue
felix9611 Mar 27, 2025
1a09896
add tax information data upload
felix9611 Mar 28, 2025
cd49f4a
add code type import upload data function
felix9611 Mar 28, 2025
70a892f
add asset type import upload data function
felix9611 Mar 28, 2025
993be7f
fix code type and add location import upload data function
felix9611 Mar 28, 2025
37b14d6
batch import service logic update
felix9611 Mar 29, 2025
904cdb2
all log
felix9611 Mar 29, 2025
acaa669
re test
felix9611 Mar 29, 2025
66483ac
fix
felix9611 Mar 29, 2025
028cce8
change sys menu logic
felix9611 Mar 29, 2025
96bb7ef
change sys menu logic
felix9611 Mar 29, 2025
900fb8b
add sysrole to sys menu module
felix9611 Mar 29, 2025
da4bd09
add comment
felix9611 Mar 29, 2025
ef20984
change to use DownloadExcelTemplateComponent for code type & asset type
felix9611 Mar 30, 2025
f876744
change to use DownloadExcelTemplateComponent for location
felix9611 Mar 30, 2025
37d04ca
change to use UploadDialogComponent for asset type
felix9611 Mar 30, 2025
bf58f37
update code type using new component
felix9611 Mar 30, 2025
98f5af3
change to use UploadDialogComponent for location
felix9611 Mar 30, 2025
73d3eb3
change to use UploadDialogComponent for tax-info
felix9611 Mar 30, 2025
adeaaa4
change to use new Component for vendor
felix9611 Mar 30, 2025
d513913
change to use new download template and upload Component for budget
felix9611 Mar 30, 2025
51f660e
upload asset list label
felix9611 Mar 30, 2025
32f0f3b
add asset list data upload
felix9611 Mar 30, 2025
ea81b88
update department import logic
felix9611 Mar 30, 2025
48a8444
JWT token expires time update
felix9611 Mar 31, 2025
731fad1
add upload excel function for department and fixed import issue
felix9611 Mar 31, 2025
61c0cac
import budget lists logic update
felix9611 Mar 31, 2025
70bd80b
add repair record import data api
felix9611 Mar 31, 2025
25292d5
ADD repair record upload funtion and fixed upload dialog
felix9611 Mar 31, 2025
509c1cb
Merge branch 'v1.0' into dev
felix9611 Mar 31, 2025
fedcdff
add asset list upload excel function & remove useless code
felix9611 Mar 31, 2025
95d1671
Update README.md
felix9611 Mar 31, 2025
5c55300
Merge branch 'dev' of https://github.com/felix9611/nest-fixedasset-mo…
felix9611 Mar 31, 2025
3b3b59c
Update license.txt
felix9611 Mar 31, 2025
f25715f
add back find for some count docs
felix9611 Mar 31, 2025
3d586bb
add info
felix9611 Mar 31, 2025
025985c
asset code sort fix
felix9611 Apr 1, 2025
546abdb
asset code sorting fo report
felix9611 Apr 1, 2025
806ed8e
sum name change
felix9611 Apr 1, 2025
8d9ce85
style update
felix9611 Apr 1, 2025
df33953
fix
felix9611 Apr 1, 2025
e50cf7c
fix blank area issue
felix9611 Apr 1, 2025
f48d25b
fix style
felix9611 Apr 2, 2025
7bdbe9f
Update content.component.ts
felix9611 Apr 2, 2025
f0fd8da
update select function
felix9611 Apr 4, 2025
3996a7e
update user form select
felix9611 Apr 4, 2025
10a5cbe
logic update for asset
felix9611 Apr 4, 2025
13df651
charts height
felix9611 Apr 7, 2025
9e0f41b
CSS update
felix9611 Apr 7, 2025
d2ae602
update readme
felix9611 Apr 17, 2025
fecb358
Update README.md
felix9611 Apr 17, 2025
436ad91
Update README.md
felix9611 Apr 19, 2025
32362b8
fix
felix9611 Apr 19, 2025
d5800fc
add api doc body
felix9611 Apr 20, 2025
1aacbbc
add document description
felix9611 Apr 21, 2025
a3a7a4c
hello world api close
felix9611 Apr 21, 2025
c969ce5
add vendor api doc
felix9611 Apr 21, 2025
5f2e448
add tax into & excel field api docs
felix9611 Apr 21, 2025
05a50ae
add asset list api doc
felix9611 Apr 21, 2025
a269be9
add write off & inv record api docs
felix9611 Apr 21, 2025
f7b89a0
app stock take api docs
felix9611 Apr 21, 2025
049e488
add system user api docs
felix9611 Apr 22, 2025
43eea87
label fix
felix9611 Apr 22, 2025
5727a79
Update README.md
felix9611 Apr 24, 2025
39bec0a
update sys user queries
felix9611 Apr 26, 2025
555cbed
fix label
felix9611 Apr 26, 2025
f84fbe9
update query
felix9611 Apr 27, 2025
0f7bf8e
Update tax-information.component.html
felix9611 May 3, 2025
eb52571
fix query
felix9611 May 4, 2025
bb6fcb0
remove one code
felix9611 May 10, 2025
d56d530
fix api link
felix9611 May 11, 2025
481ac0e
remove useless
felix9611 May 11, 2025
f243aa9
update excel field form
felix9611 May 31, 2025
e9ee590
fix api
felix9611 Jun 6, 2025
5cf892a
fix date format
felix9611 Aug 31, 2025
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
58 changes: 33 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@


<h1>Fixed Asset Management System</h1>
<p><strong>Nest.js & Angular | Cloud-based Web Application for Asset Management</strong></p>
<p>Current version: V1.0 Branch </p>
<p><strong>Nest.js & Angular SSR | Cloud-based Web Application for Asset Management</strong></p>
<p>Current version: V1.5 Branch </p>
<p>Next version function: Unit test and Excel Data Export </p>
<p>If you find this project helpful, please click ⭐ Star! This helps more people discover it.</p>

<h2>🌟 Project Overview</h2>
<p>This is a full-stack <strong>Fixed Asset Management System</strong> built with <strong>Spring Boot</strong> and <strong>Vue.js</strong>, designed for managing fixed assets within facilities. The system includes:</p>
<p>This is a full-stack <strong>Fixed Asset Management System</strong> built with <strong>Nest.js</strong> and <strong>Angular SSR</strong>, designed for managing fixed assets within facilities. The system includes:</p>
<ul>
<li>Purchase and maintenance record management</li>
<li>Asset write-off tracking</li>
<li>Status monitoring and reporting</li>
</ul>
<p>The system is <strong>cloud-based</strong>, significantly reducing IT infrastructure costs and improving usability, with no installation required.</p>
<!--
<p>🔗 <strong><a href="https://felix-fixedasset.web.app/login" target="_blank">Online Demo</a></strong></p>

<p>🔗 <strong><a href="https://pos.felix9611.com/login" target="_blank">Online Demo Front from Cloudflare DNS Tunnel and my Raspberry Pi5 server</a></strong></p>
<p><strong>Username:</strong> <code>Demo</code><br>
<strong>Password:</strong> <code>888888</code></p>
<p><em>Note: Backend & Database hosted on Koyeb, Frontend on Firebase. Initial data load may take a few seconds. If cannot load the verification code, please click the "Reset" button.</em></p>
--><!--
<p><em>Note: Backend and Frontend both hosted on self-hosted Raspberry Pi5 with Cloudflare</em></p>

<h2>📸 Example Screenshots</h2>
--><!--
<h3>Dashboard Overview</h3>
<img src="https://github.com/felix9611/springboot-fixedasset-vue-2/blob/main/image/fixedasset-1.png" alt="Dashboard Overview">
--><!--
<h3>Asset List View</h3>
<img src="https://github.com/felix9611/springboot-fixedasset-vue-2/blob/main/image/fixedasset-2.png" alt="Asset List View">
--><!--
<h3>Asset Maintenance Records</h3>
<img src="https://github.com/felix9611/springboot-fixedasset-vue-2/blob/main/image/fixedasset-3.png" alt="Maintenance Records">
--><!--
<h3>Asset Write-Off Management</h3>
<img src="https://github.com/felix9611/springboot-fixedasset-vue-2/blob/main/image/fixedasset-4.png" alt="Write-Off Management">
-->

<h3>Tax Information</h3>
<img src="https://github.com/felix9611/nest-fixedasset-mongo-angular/blob/dev/image/fixedasset-1.png" alt="Dashboard Overview">

<h3>Asset Form View</h3>
<img src="https://github.com/felix9611/nest-fixedasset-mongo-angular/blob/dev/image/fixedasset-2.png" alt="Asset List View">

<h3>User Info</h3>
<img src="https://github.com/felix9611/nest-fixedasset-mongo-angular/blob/dev/image/fixedasset-3.png" alt="Maintenance Records">

<h3>Dashboard</h3>
<img src="https://github.com/felix9611/nest-fixedasset-mongo-angular/blob/dev/image/fixedasset-4.png" alt="Write-Off Management">

<h2>🚀 Key Features</h2>
<ul>
<li><strong>Comprehensive Asset Management:</strong> Manage asset status, purchase records, maintenance schedules, and write-offs.</li>
Expand Down Expand Up @@ -62,7 +64,9 @@
<ul>
<li><strong>Asset Registration & Tracking:</strong> Record and track fixed assets with detailed status and information.</li>
<li><strong>Expenditure & Maintenance Management:</strong> Log asset purchase, maintenance, and write-off records for better financial control.</li>
<li><strong>Dynamic Reporting:</strong> Showing chart graphs and generate PDF and Excel reports for easy analysis and sharing.</li>
<li><strong>Dynamic Reporting:</strong> Showing chart graphs for easy analysis and sharing.</li>
<li><strong>Role Permission:</strong> Unit by per role with menu page permission, customization user group(s) to actionable functions</li>
<li><strong>Excel Data Import:</strong> Batch upload data increases efficiency</li>
</ul>

<h2>📋 How to Run the Project</h2>
Expand Down Expand Up @@ -109,13 +113,17 @@ yarn start
npm run build:uat or build:prod
// or
yarn build:uat or build:prod

// Preview URL
http://localhost:4200
</code></pre>
<!---

<h2>🌐 Deployment</h2>
<ul>
<li><strong>Backend:</strong> Koyeb (Spring Boot)</li>
<li><strong>Frontend:</strong> Firebase Hosting</li>
</ul>-->
<li><strong>Database:</strong><strong>New experiment!</strong> Self-hosted in My Raspberry Pi5 server</li>
<li><strong>Backend:</strong><strong>New experiment!</strong> Fullset self-hosted server power by my Raspberry Pi5 server</li>
<li><strong>Frontend:</strong>Cloudflare Tunnel DNS + Raspberry Pi5 runing in Angualr SSR</li>
</ul>

<h2>📈 Business Impact</h2>
<ul>
Expand Down
98 changes: 0 additions & 98 deletions backend/README.md

This file was deleted.

4 changes: 2 additions & 2 deletions backend/src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { AppService } from './app.service';
export class AppController {
constructor(private readonly appService: AppService) {}

@Get()
/* @Get()
getHello(): string {
return this.appService.getHello();
}
} */
}
6 changes: 5 additions & 1 deletion backend/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { WriteOffModule } from './module/write-off/write-off.module'
import { SysMenuMoudule } from './module/sys-menu/sys-menu.module'
import { RepairRecordMoudule } from './module/repair-record/repair-record.module'
import { StockTakeMoudule } from './module/stock-take/stcok-take.module'
import { ExcelFieldMatchModule } from './module/excelFieldMatch/excelFieldMatch.module'
import { SysUserSchema } from './module/sys-user/sysUser.schame'

@Module({
imports: [
Expand All @@ -44,10 +46,12 @@ import { StockTakeMoudule } from './module/stock-take/stcok-take.module'
SysRoleMoudule,
SysUserMoudule,
SysMenuMoudule,
ExcelFieldMatchModule,
MongooseModule.forRoot('mongodb://localhost/fixedasset'),
MongooseModule.forFeature([
{ name: 'SysRoles', schema: SysRoleSchema },
{ name: 'Department', schema: DepartmentSchema }
{ name: 'Department', schema: DepartmentSchema },
{ name: 'SysUser', schema: SysUserSchema }
])
],
controllers: [AppController],
Expand Down
6 changes: 5 additions & 1 deletion backend/src/module/InvRecord/InvRecord.controller.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { Body, Controller, Post } from '@nestjs/common'
import { InvRecordService } from './InvRecord.service'
import { ListRecordReqDto } from './InvRecord.dto'
import { ListInvRecordResponse, ListRecordReqBody, ListRecordReqDto } from './InvRecord.dto'
import { ApiBody, ApiOperation, ApiResponse } from '@nestjs/swagger'

@Controller('sys/inv-record')
export class InvRecordController {
constructor(private invReocrdService: InvRecordService) {}

@ApiOperation({ summary: 'Page and list'})
@ApiBody({ type: ListRecordReqBody })
@ApiResponse({ description: 'If successful', status: 201, type: ListInvRecordResponse })
@Post('list')
async list(@Body() query: ListRecordReqDto) {
return await this.invReocrdService.listRecord(query)
Expand Down
47 changes: 47 additions & 0 deletions backend/src/module/InvRecord/InvRecord.dto.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { ApiProperty } from "@nestjs/swagger"
import { AssetListBody } from "../asset-list/asset-list.dto"
import { LocationBody } from "../location/location.dto"
import { CommonPageAndList, CommonPageAndListResponse } from "src/tool/open-api-body"
import { IsOptional } from "@nestjs/class-validator"

export interface CreateInvRecordDto {
assetCode: string
placeFrom: string
Expand All @@ -9,4 +15,45 @@ export interface ListRecordReqDto {
limit: number
assetCode?: string
dateRange?: string[]
}

export class InvRecordBody {
@ApiProperty({ description: 'Data Id' })
_id: string

@ApiProperty({ description: 'Asset Code' })
assetCode: string

@ApiProperty({ description: 'Place From Id' })
placeFrom: string

@ApiProperty({ description: 'Place To Id' })
placeTo: string

@ApiProperty({ description: 'Created At' })
createdAt: string

@ApiProperty({ description: 'Asset List Data', type: AssetListBody })
assetList: AssetListBody

@ApiProperty({ description: 'Place From Date', type: LocationBody })
placeFromData: LocationBody

@ApiProperty({ description: 'Place To Date', type: LocationBody })
placeToData: LocationBody
}

export class ListRecordReqBody extends CommonPageAndList {
@ApiProperty({ description: 'Asset Code' })
@IsOptional()
assetCode: string

@ApiProperty({ description: 'Date Range', isArray: true })
@IsOptional()
dateRange: string[]
}

export class ListInvRecordResponse extends CommonPageAndListResponse {
@ApiProperty({ description: 'Data List', type: InvRecordBody, isArray: true })
data: InvRecordBody[]
}
2 changes: 1 addition & 1 deletion backend/src/module/InvRecord/InvRecord.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class InvRecordService {
{ $limit: limit },
]).exec()

const total = await this.invRecordModel.find(finalFilter).countDocuments()
const total = await this.invRecordModel.find(finalFilter).countDocuments().exec()

return {
total,
Expand Down
Loading