diff --git a/README.md b/README.md index 6b5968c..1fadc40 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,37 @@
Nest.js & Angular | Cloud-based Web Application for Asset Management
+Nest.js & Angular SSR | Cloud-based Web Application for Asset Management
Current version: V1.0 Branch
This is a full-stack Fixed Asset Management System built with Spring Boot and Vue.js, designed for managing fixed assets within facilities. The system includes:
+This is a full-stack Fixed Asset Management System built with Spring Boot and Angular SSR, designed for managing fixed assets within facilities. The system includes:
The system is cloud-based, significantly reducing IT infrastructure costs and improving usability, with no installation required.
- + +
+
+
+
+
+
+
+
A progressive Node.js framework for building efficient and scalable server-side applications.
- - - -## Description - -[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. - -## Project setup - -```bash -$ yarn install -``` - -## Compile and run the project - -```bash -# development -$ yarn run start - -# watch mode -$ yarn run start:dev - -# production mode -$ yarn run start:prod -``` - -## Run tests - -```bash -# unit tests -$ yarn run test - -# e2e tests -$ yarn run test:e2e - -# test coverage -$ yarn run test:cov -``` - -## Deployment - -When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information. - -If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps: - -```bash -$ yarn install -g mau -$ mau deploy -``` - -With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure. - -## Resources - -Check out a few resources that may come in handy when working with NestJS: - -- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework. -- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy). -- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/). -- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks. -- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com). -- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com). -- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs). -- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com). - -## Support - -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). - -## Stay in touch - -- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec) -- Website - [https://nestjs.com](https://nestjs.com/) -- Twitter - [@nestframework](https://twitter.com/nestframework) - -## License - -Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE). diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index 26ed04a..5eab8f7 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -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: [ @@ -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], diff --git a/backend/src/module/InvRecord/InvRecord.service.ts b/backend/src/module/InvRecord/InvRecord.service.ts index 7e28559..b76a3f8 100644 --- a/backend/src/module/InvRecord/InvRecord.service.ts +++ b/backend/src/module/InvRecord/InvRecord.service.ts @@ -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, diff --git a/backend/src/module/action-record/actionRecord.controller.spec.ts b/backend/src/module/action-record/actionRecord.controller.spec.ts new file mode 100644 index 0000000..1a90034 --- /dev/null +++ b/backend/src/module/action-record/actionRecord.controller.spec.ts @@ -0,0 +1,108 @@ +import { Test, TestingModule } from '@nestjs/testing' +import { ActionRecordController } from './actionRecord.controller' +import { ActionRecordService } from './actionRecord.service' +import { AuthGuard } from '../auth/AuthGuard' +import { ActionRecord, ActionRecordSchema } from './actionRecord.schame' +import { Model } from 'mongoose' +import { getModelToken } from '@nestjs/mongoose' + +describe('ActionRecordController', () => { + let controller: ActionRecordController + let service: ActionRecordService + + const mockActionRecordService = { + listAndPage: jest.fn() + } + + beforeEach(async () => { + const module: TestingModule = await Test.createTestingModule({ + controllers: [ActionRecordController], + providers: [ + { + provide: ActionRecordService, + useValue: mockActionRecordService, + }, + ], + }) + .overrideGuard(AuthGuard) + .useValue({ canActivate: jest.fn(() => true) }) + .compile(); + + controller = module.getClick or drag file to this area to upload
++ Support for a single or bulk upload. Strictly prohibit from uploading company data or other band files +
+