@tomei/rental 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.commitlintrc.json +22 -22
- package/.eslintrc +16 -16
- package/.eslintrc.js +35 -35
- package/.gitlab-ci.yml +16 -16
- package/.husky/commit-msg +15 -15
- package/.husky/pre-commit +7 -7
- package/.prettierrc +4 -4
- package/Jenkinsfile +51 -51
- package/README.md +8 -8
- package/dist/src/components/agreement/agreement.d.ts +3 -1
- package/dist/src/components/agreement/agreement.js +1 -0
- package/dist/src/components/agreement/agreement.js.map +1 -1
- package/dist/src/components/rental/rental.js +15 -15
- package/dist/src/enum/aggrement-status.enum.d.ts +5 -0
- package/dist/src/enum/aggrement-status.enum.js +10 -0
- package/dist/src/enum/aggrement-status.enum.js.map +1 -0
- package/dist/src/enum/index.d.ts +2 -1
- package/dist/src/enum/index.js +3 -1
- package/dist/src/enum/index.js.map +1 -1
- package/dist/src/interfaces/agreement-attr.interface.d.ts +3 -1
- package/dist/src/models/agreement.entity.d.ts +3 -1
- package/dist/src/models/agreement.entity.js +8 -0
- package/dist/src/models/agreement.entity.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/jest.config.js +10 -10
- package/migrations/booking-table-migration.js +79 -79
- package/migrations/joint-hirer-table-migration.js +52 -52
- package/migrations/rental-aggrement-table-migration.js +26 -22
- package/migrations/rental-price-table-migration.js +32 -32
- package/migrations/rental-table-migrations.js +96 -96
- package/package.json +75 -75
- package/sonar-project.properties +12 -12
- package/src/components/agreement/agreement.repository.ts +54 -54
- package/src/components/agreement/agreement.ts +46 -43
- package/src/components/booking/booking.repository.ts +51 -51
- package/src/components/booking/booking.ts +291 -291
- package/src/components/joint-hirer/joint-hirer.repository.ts +54 -54
- package/src/components/rental/rental.repository.ts +51 -51
- package/src/components/rental/rental.ts +722 -722
- package/src/components/rental-price/rental-price.repository.ts +54 -54
- package/src/components/rental-price/rental-price.ts +100 -100
- package/src/database.ts +27 -27
- package/src/enum/account-type.enum.ts +4 -4
- package/src/enum/aggrement-status.enum.ts +5 -0
- package/src/enum/booking.enum.ts +5 -5
- package/src/enum/index.ts +11 -5
- package/src/enum/rental-status.enum.ts +39 -39
- package/src/index.ts +28 -28
- package/src/interfaces/agreement-attr.interface.ts +6 -4
- package/src/interfaces/booking-attr.interface.ts +19 -19
- package/src/interfaces/index.ts +13 -13
- package/src/interfaces/joint-hirer-attr.interface.ts +10 -10
- package/src/interfaces/rental-attr.interface.ts +25 -25
- package/src/interfaces/rental-find-all-search-attr.interface.ts +11 -11
- package/src/interfaces/rental-price-attr.interface.ts +7 -7
- package/src/models/agreement.entity.ts +33 -26
- package/src/models/booking.entity.ts +105 -105
- package/src/models/index.ts +13 -13
- package/src/models/joint-hirer.entity.ts +63 -63
- package/src/models/rental-price.entity.ts +38 -38
- package/src/models/rental.entity.ts +133 -133
- package/tsconfig.build.json +5 -5
- package/tsconfig.json +23 -23
package/.commitlintrc.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"@commitlint/config-conventional"
|
|
4
|
-
],
|
|
5
|
-
"rules": {
|
|
6
|
-
"header-max-length": [ 2, "always", 120 ],
|
|
7
|
-
"type-enum": [
|
|
8
|
-
2,
|
|
9
|
-
"always",
|
|
10
|
-
[
|
|
11
|
-
"breaking",
|
|
12
|
-
"feat",
|
|
13
|
-
"fix",
|
|
14
|
-
"refactor",
|
|
15
|
-
"config",
|
|
16
|
-
"test",
|
|
17
|
-
"docs",
|
|
18
|
-
"chore"
|
|
19
|
-
]
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"@commitlint/config-conventional"
|
|
4
|
+
],
|
|
5
|
+
"rules": {
|
|
6
|
+
"header-max-length": [ 2, "always", 120 ],
|
|
7
|
+
"type-enum": [
|
|
8
|
+
2,
|
|
9
|
+
"always",
|
|
10
|
+
[
|
|
11
|
+
"breaking",
|
|
12
|
+
"feat",
|
|
13
|
+
"fix",
|
|
14
|
+
"refactor",
|
|
15
|
+
"config",
|
|
16
|
+
"test",
|
|
17
|
+
"docs",
|
|
18
|
+
"chore"
|
|
19
|
+
]
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
package/.eslintrc
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"parser": "@typescript-eslint/parser",
|
|
3
|
-
"parserOptions": {
|
|
4
|
-
"ecmaVersion": "latest",
|
|
5
|
-
"sourceType": "module" // Allows for the use of imports
|
|
6
|
-
},
|
|
7
|
-
"extends": ["plugin:@typescript-eslint/recommended"],
|
|
8
|
-
"env": {
|
|
9
|
-
"node": true // Enable Node.js global variables
|
|
10
|
-
},
|
|
11
|
-
"rules": {
|
|
12
|
-
"no-console": "off",
|
|
13
|
-
"import/prefer-default-export": "off",
|
|
14
|
-
"@typescript-eslint/no-unused-vars": "warn"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"parserOptions": {
|
|
4
|
+
"ecmaVersion": "latest",
|
|
5
|
+
"sourceType": "module" // Allows for the use of imports
|
|
6
|
+
},
|
|
7
|
+
"extends": ["plugin:@typescript-eslint/recommended"],
|
|
8
|
+
"env": {
|
|
9
|
+
"node": true // Enable Node.js global variables
|
|
10
|
+
},
|
|
11
|
+
"rules": {
|
|
12
|
+
"no-console": "off",
|
|
13
|
+
"import/prefer-default-export": "off",
|
|
14
|
+
"@typescript-eslint/no-unused-vars": "warn"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/.eslintrc.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
parser: "@typescript-eslint/parser",
|
|
3
|
-
plugins: ["@typescript-eslint"],
|
|
4
|
-
|
|
5
|
-
parserOptions: {
|
|
6
|
-
ecmaVersion: "latest", // Allows the use of modern ECMAScript features
|
|
7
|
-
sourceType: "module", // Allows for the use of imports
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
|
11
|
-
env: {
|
|
12
|
-
node: true, // Enable Node.js global variables
|
|
13
|
-
},
|
|
14
|
-
rules: {
|
|
15
|
-
"no-console": "off",
|
|
16
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
17
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
18
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
19
|
-
"import/prefer-default-export": "off",
|
|
20
|
-
"@typescript-eslint/no-unused-vars": "warn",
|
|
21
|
-
"no-useless-catch": "off",
|
|
22
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
23
|
-
"@typescript-eslint/no-empty-function": "off",
|
|
24
|
-
"@typescript-eslint/no-empty-interface": "off",
|
|
25
|
-
"@typescript-eslint/no-inferrable-types": "off",
|
|
26
|
-
"@typescript-eslint/no-namespace": "off",
|
|
27
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
28
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
29
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
|
30
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
31
|
-
"@typescript-eslint/no-unsafe-return": "off",
|
|
32
|
-
"@typescript-eslint/restrict-template-expressions": "off",
|
|
33
|
-
"no-useless-escape": "off",
|
|
34
|
-
},
|
|
35
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: "@typescript-eslint/parser",
|
|
3
|
+
plugins: ["@typescript-eslint"],
|
|
4
|
+
|
|
5
|
+
parserOptions: {
|
|
6
|
+
ecmaVersion: "latest", // Allows the use of modern ECMAScript features
|
|
7
|
+
sourceType: "module", // Allows for the use of imports
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
|
11
|
+
env: {
|
|
12
|
+
node: true, // Enable Node.js global variables
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
"no-console": "off",
|
|
16
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
17
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
18
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
19
|
+
"import/prefer-default-export": "off",
|
|
20
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
21
|
+
"no-useless-catch": "off",
|
|
22
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
23
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
24
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
25
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
26
|
+
"@typescript-eslint/no-namespace": "off",
|
|
27
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
28
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
29
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
30
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
31
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
32
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
33
|
+
"no-useless-escape": "off",
|
|
34
|
+
},
|
|
35
|
+
};
|
package/.gitlab-ci.yml
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
variables:
|
|
2
|
-
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
|
|
3
|
-
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
|
|
4
|
-
sonarcloud-check:
|
|
5
|
-
image:
|
|
6
|
-
name: sonarsource/sonar-scanner-cli:latest
|
|
7
|
-
entrypoint: [""]
|
|
8
|
-
cache:
|
|
9
|
-
key: "${CI_JOB_NAME}"
|
|
10
|
-
paths:
|
|
11
|
-
- .sonar/cache
|
|
12
|
-
script:
|
|
13
|
-
- sonar-scanner
|
|
14
|
-
only:
|
|
15
|
-
- merge_requests
|
|
16
|
-
- main
|
|
1
|
+
variables:
|
|
2
|
+
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
|
|
3
|
+
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
|
|
4
|
+
sonarcloud-check:
|
|
5
|
+
image:
|
|
6
|
+
name: sonarsource/sonar-scanner-cli:latest
|
|
7
|
+
entrypoint: [""]
|
|
8
|
+
cache:
|
|
9
|
+
key: "${CI_JOB_NAME}"
|
|
10
|
+
paths:
|
|
11
|
+
- .sonar/cache
|
|
12
|
+
script:
|
|
13
|
+
- sonar-scanner
|
|
14
|
+
only:
|
|
15
|
+
- merge_requests
|
|
16
|
+
- main
|
package/.husky/commit-msg
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
npx commitlint --edit $1
|
|
5
|
-
message="$(cat $1)"
|
|
6
|
-
echo "$message"
|
|
7
|
-
a=($(echo "$message" | tr ':' '\n'))
|
|
8
|
-
echo "${a[0]}"
|
|
9
|
-
if [ "${a[0]}" = "feat" ];
|
|
10
|
-
then
|
|
11
|
-
npm version --commit-hooks false --no-git-tag-version minor
|
|
12
|
-
else
|
|
13
|
-
npm version --commit-hooks false --no-git-tag-version patch
|
|
14
|
-
fi
|
|
15
|
-
git add .
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
npx commitlint --edit $1
|
|
5
|
+
message="$(cat $1)"
|
|
6
|
+
echo "$message"
|
|
7
|
+
a=($(echo "$message" | tr ':' '\n'))
|
|
8
|
+
echo "${a[0]}"
|
|
9
|
+
if [ "${a[0]}" = "feat" ];
|
|
10
|
+
then
|
|
11
|
+
npm version --commit-hooks false --no-git-tag-version minor
|
|
12
|
+
else
|
|
13
|
+
npm version --commit-hooks false --no-git-tag-version patch
|
|
14
|
+
fi
|
|
15
|
+
git add .
|
|
16
16
|
git commit -m "$message" --no-verify
|
package/.husky/pre-commit
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
npm run lint
|
|
5
|
-
npm run format
|
|
6
|
-
npm run build
|
|
7
|
-
git add .
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
npm run lint
|
|
5
|
+
npm run format
|
|
6
|
+
npm run build
|
|
7
|
+
git add .
|
package/.prettierrc
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"singleQuote": true,
|
|
3
|
-
"trailingComma": "all",
|
|
4
|
-
"endOfLine": "auto"
|
|
1
|
+
{
|
|
2
|
+
"singleQuote": true,
|
|
3
|
+
"trailingComma": "all",
|
|
4
|
+
"endOfLine": "auto"
|
|
5
5
|
}
|
package/Jenkinsfile
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
pipeline {
|
|
2
|
-
agent {
|
|
3
|
-
kubernetes {
|
|
4
|
-
label 'jenkins-agent'
|
|
5
|
-
namespace 'devops-tools'
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
tools {nodejs "node18"}
|
|
9
|
-
stages {
|
|
10
|
-
stage('Install') {
|
|
11
|
-
steps {
|
|
12
|
-
echo 'Install Dependencies..'
|
|
13
|
-
sh 'npm install'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
stage('Test') {
|
|
17
|
-
steps {
|
|
18
|
-
echo 'Testing..'
|
|
19
|
-
// sh 'npm run test'
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
stage('Build') {
|
|
23
|
-
steps {
|
|
24
|
-
echo 'Building..'
|
|
25
|
-
sh 'npm run build'
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
stage('Publish') {
|
|
29
|
-
steps {
|
|
30
|
-
sh "npm publish"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
post {
|
|
36
|
-
success {
|
|
37
|
-
script {
|
|
38
|
-
def gitAuthor = sh(returnStdout: true, script: 'git log -1 --pretty=format:%an').trim()
|
|
39
|
-
discordSend description: "Git Commit: ${env.GIT_COMMIT}\nGit Branch: ${env.GIT_BRANCH}\nGit URL: ${env.GIT_URL}\nGit Author: ${gitAuthor}", footer: '', image: '', link: env.BUILD_URL, result: 'SUCCESS', scmWebUrl: '', thumbnail: '', title: "${env.JOB_NAME} Build #${env.BUILD_NUMBER} Success", webhookURL: 'https://discord.com/api/webhooks/1166358157166125076/AquDPsQ6L5piq_TfiSfLGOujmVqgHhxfK8yVEfJZrWfhgT6g-j5gJ3xhuXGFZUjRhhlo'
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
failure {
|
|
44
|
-
script {
|
|
45
|
-
def gitAuthor = sh(returnStdout: true, script: 'git log -1 --pretty=format:%an').trim()
|
|
46
|
-
discordSend description: "Git Commit: ${env.GIT_COMMIT}\nGit Branch: ${env.GIT_BRANCH}\nGit URL: ${env.GIT_URL}\nGit Author: ${gitAuthor}", footer: '', image: '', link: env.BUILD_URL, result: 'FAILURE', scmWebUrl: '', thumbnail: '', title: "${env.JOB_NAME} Build #${env.BUILD_NUMBER} Failed", webhookURL: 'https://discord.com/api/webhooks/1166358157166125076/AquDPsQ6L5piq_TfiSfLGOujmVqgHhxfK8yVEfJZrWfhgT6g-j5gJ3xhuXGFZUjRhhlo'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}
|
|
1
|
+
pipeline {
|
|
2
|
+
agent {
|
|
3
|
+
kubernetes {
|
|
4
|
+
label 'jenkins-agent'
|
|
5
|
+
namespace 'devops-tools'
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
tools {nodejs "node18"}
|
|
9
|
+
stages {
|
|
10
|
+
stage('Install') {
|
|
11
|
+
steps {
|
|
12
|
+
echo 'Install Dependencies..'
|
|
13
|
+
sh 'npm install'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
stage('Test') {
|
|
17
|
+
steps {
|
|
18
|
+
echo 'Testing..'
|
|
19
|
+
// sh 'npm run test'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
stage('Build') {
|
|
23
|
+
steps {
|
|
24
|
+
echo 'Building..'
|
|
25
|
+
sh 'npm run build'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
stage('Publish') {
|
|
29
|
+
steps {
|
|
30
|
+
sh "npm publish"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
post {
|
|
36
|
+
success {
|
|
37
|
+
script {
|
|
38
|
+
def gitAuthor = sh(returnStdout: true, script: 'git log -1 --pretty=format:%an').trim()
|
|
39
|
+
discordSend description: "Git Commit: ${env.GIT_COMMIT}\nGit Branch: ${env.GIT_BRANCH}\nGit URL: ${env.GIT_URL}\nGit Author: ${gitAuthor}", footer: '', image: '', link: env.BUILD_URL, result: 'SUCCESS', scmWebUrl: '', thumbnail: '', title: "${env.JOB_NAME} Build #${env.BUILD_NUMBER} Success", webhookURL: 'https://discord.com/api/webhooks/1166358157166125076/AquDPsQ6L5piq_TfiSfLGOujmVqgHhxfK8yVEfJZrWfhgT6g-j5gJ3xhuXGFZUjRhhlo'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
failure {
|
|
44
|
+
script {
|
|
45
|
+
def gitAuthor = sh(returnStdout: true, script: 'git log -1 --pretty=format:%an').trim()
|
|
46
|
+
discordSend description: "Git Commit: ${env.GIT_COMMIT}\nGit Branch: ${env.GIT_BRANCH}\nGit URL: ${env.GIT_URL}\nGit Author: ${gitAuthor}", footer: '', image: '', link: env.BUILD_URL, result: 'FAILURE', scmWebUrl: '', thumbnail: '', title: "${env.JOB_NAME} Build #${env.BUILD_NUMBER} Failed", webhookURL: 'https://discord.com/api/webhooks/1166358157166125076/AquDPsQ6L5piq_TfiSfLGOujmVqgHhxfK8yVEfJZrWfhgT6g-j5gJ3xhuXGFZUjRhhlo'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
}
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
## Package Template
|
|
2
|
-
|
|
3
|
-
### How to use
|
|
4
|
-
- run `npm i`
|
|
5
|
-
- create a `components` folder in the root of your project
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
## Package Template
|
|
2
|
+
|
|
3
|
+
### How to use
|
|
4
|
+
- run `npm i`
|
|
5
|
+
- create a `components` folder in the root of your project
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ObjectBase } from '@tomei/general';
|
|
2
2
|
import { IAgreementAttr } from '../../interfaces/agreement-attr.interface';
|
|
3
|
+
import { AggrementStatusEnum } from '../../enum/aggrement-status.enum';
|
|
3
4
|
export declare class Agreement extends ObjectBase {
|
|
4
5
|
ObjectId: string;
|
|
5
6
|
ObjectName: string;
|
|
6
7
|
ObjectType: string;
|
|
7
8
|
TableName: string;
|
|
8
|
-
Status:
|
|
9
|
+
Status: AggrementStatusEnum;
|
|
10
|
+
DateSigned: Date;
|
|
9
11
|
private static _Repo;
|
|
10
12
|
get AgreementNo(): string;
|
|
11
13
|
set AgreementNo(value: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agreement.js","sourceRoot":"","sources":["../../../../src/components/agreement/agreement.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA4C;AAE5C,iEAA6D;
|
|
1
|
+
{"version":3,"file":"agreement.js","sourceRoot":"","sources":["../../../../src/components/agreement/agreement.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA4C;AAE5C,iEAA6D;AAG7D,MAAa,SAAU,SAAQ,oBAAU;IASvC,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,WAAW,CAAC,KAAa;QAC3B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,YAAsB,aAA8B;QAClD,KAAK,EAAE,CAAC;QAfV,eAAU,GAAW,WAAW,CAAC;QACjC,cAAS,GAAG,kBAAkB,CAAC;QAe7B,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,WAAW,CAAC;YAC1C,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC;YACnC,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC;SAC5C;IACH,CAAC;IAEM,MAAM,CAAO,IAAI,CACtB,WAAoB,EACpB,aAAmB;;YAEnB,IAAI;gBACF,IAAI,WAAW,EAAE;oBACf,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;oBACxE,OAAO,IAAI,SAAS,CAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;iBACvD;gBACD,OAAO,IAAI,SAAS,EAAE,CAAC;aACxB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;;AAvCH,8BAwCC;AAjCgB,eAAK,GAAG,IAAI,0CAAmB,EAAE,CAAC"}
|
|
@@ -397,21 +397,21 @@ class Rental extends general_1.ObjectBase {
|
|
|
397
397
|
if (!isPrivileged) {
|
|
398
398
|
throw new general_1.ClassError('Rental', 'RentalErrMsg01', "You do not have 'Rental - View' privilege.");
|
|
399
399
|
}
|
|
400
|
-
const query = `
|
|
401
|
-
SELECT
|
|
402
|
-
r.*
|
|
403
|
-
FROM
|
|
404
|
-
rental_Rental r
|
|
405
|
-
LEFT JOIN
|
|
406
|
-
rental_JointHirer jh ON r.RentalId = jh.RentalId
|
|
407
|
-
WHERE
|
|
408
|
-
r.Status = 'Active'
|
|
409
|
-
AND (
|
|
410
|
-
r.CustomerId = '${CustomerId}'
|
|
411
|
-
OR jh.CustomerId = '${CustomerId}'
|
|
412
|
-
)
|
|
413
|
-
GROUP BY
|
|
414
|
-
r.RentalId
|
|
400
|
+
const query = `
|
|
401
|
+
SELECT
|
|
402
|
+
r.*
|
|
403
|
+
FROM
|
|
404
|
+
rental_Rental r
|
|
405
|
+
LEFT JOIN
|
|
406
|
+
rental_JointHirer jh ON r.RentalId = jh.RentalId
|
|
407
|
+
WHERE
|
|
408
|
+
r.Status = 'Active'
|
|
409
|
+
AND (
|
|
410
|
+
r.CustomerId = '${CustomerId}'
|
|
411
|
+
OR jh.CustomerId = '${CustomerId}'
|
|
412
|
+
)
|
|
413
|
+
GROUP BY
|
|
414
|
+
r.RentalId
|
|
415
415
|
`;
|
|
416
416
|
const db = rentalDb.getConnection();
|
|
417
417
|
const result = yield db.query(query, {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AggrementStatusEnum = void 0;
|
|
4
|
+
var AggrementStatusEnum;
|
|
5
|
+
(function (AggrementStatusEnum) {
|
|
6
|
+
AggrementStatusEnum["NOT_GENERATED"] = "Not Generated";
|
|
7
|
+
AggrementStatusEnum["GENERATED"] = "Generated";
|
|
8
|
+
AggrementStatusEnum["SIGNED"] = "Signed";
|
|
9
|
+
})(AggrementStatusEnum = exports.AggrementStatusEnum || (exports.AggrementStatusEnum = {}));
|
|
10
|
+
//# sourceMappingURL=aggrement-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggrement-status.enum.js","sourceRoot":"","sources":["../../../src/enum/aggrement-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,sDAA+B,CAAA;IAC/B,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;AACnB,CAAC,EAJW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAI9B"}
|
package/dist/src/enum/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RentalStatusEnum } from './rental-status.enum';
|
|
2
2
|
import { BookingStatusEnum } from './booking.enum';
|
|
3
3
|
import { RentalAccountTypeEnum } from './account-type.enum';
|
|
4
|
-
|
|
4
|
+
import { AggrementStatusEnum } from './aggrement-status.enum';
|
|
5
|
+
export { RentalStatusEnum, BookingStatusEnum, RentalAccountTypeEnum, AggrementStatusEnum, };
|
package/dist/src/enum/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RentalAccountTypeEnum = exports.BookingStatusEnum = exports.RentalStatusEnum = void 0;
|
|
3
|
+
exports.AggrementStatusEnum = exports.RentalAccountTypeEnum = exports.BookingStatusEnum = exports.RentalStatusEnum = void 0;
|
|
4
4
|
const rental_status_enum_1 = require("./rental-status.enum");
|
|
5
5
|
Object.defineProperty(exports, "RentalStatusEnum", { enumerable: true, get: function () { return rental_status_enum_1.RentalStatusEnum; } });
|
|
6
6
|
const booking_enum_1 = require("./booking.enum");
|
|
7
7
|
Object.defineProperty(exports, "BookingStatusEnum", { enumerable: true, get: function () { return booking_enum_1.BookingStatusEnum; } });
|
|
8
8
|
const account_type_enum_1 = require("./account-type.enum");
|
|
9
9
|
Object.defineProperty(exports, "RentalAccountTypeEnum", { enumerable: true, get: function () { return account_type_enum_1.RentalAccountTypeEnum; } });
|
|
10
|
+
const aggrement_status_enum_1 = require("./aggrement-status.enum");
|
|
11
|
+
Object.defineProperty(exports, "AggrementStatusEnum", { enumerable: true, get: function () { return aggrement_status_enum_1.AggrementStatusEnum; } });
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/enum/index.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/enum/index.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;AAMtD,iGANO,qCAAgB,OAMP;AALlB,iDAAmD;AAMjD,kGANO,gCAAiB,OAMP;AALnB,2DAA4D;AAM1D,sGANO,yCAAqB,OAMP;AALvB,mEAA8D;AAM5D,oGANO,2CAAmB,OAMP"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
2
|
import { RentalModel } from './rental.entity';
|
|
3
|
+
import { AggrementStatusEnum } from '../enum/aggrement-status.enum';
|
|
3
4
|
export declare class AgreementModel extends Model {
|
|
4
5
|
AgreementNo: string;
|
|
5
|
-
Status:
|
|
6
|
+
Status: AggrementStatusEnum;
|
|
7
|
+
DateSigned: Date;
|
|
6
8
|
Rentals: RentalModel[];
|
|
7
9
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AgreementModel = void 0;
|
|
13
13
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
14
|
const rental_entity_1 = require("./rental.entity");
|
|
15
|
+
const aggrement_status_enum_1 = require("../enum/aggrement-status.enum");
|
|
15
16
|
let AgreementModel = class AgreementModel extends sequelize_typescript_1.Model {
|
|
16
17
|
};
|
|
17
18
|
__decorate([
|
|
@@ -29,6 +30,13 @@ __decorate([
|
|
|
29
30
|
}),
|
|
30
31
|
__metadata("design:type", String)
|
|
31
32
|
], AgreementModel.prototype, "Status", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, sequelize_typescript_1.Column)({
|
|
35
|
+
allowNull: true,
|
|
36
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", Date)
|
|
39
|
+
], AgreementModel.prototype, "DateSigned", void 0);
|
|
32
40
|
__decorate([
|
|
33
41
|
(0, sequelize_typescript_1.HasMany)(() => rental_entity_1.RentalModel),
|
|
34
42
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agreement.entity.js","sourceRoot":"","sources":["../../../src/models/agreement.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA+E;AAC/E,mDAA8C;
|
|
1
|
+
{"version":3,"file":"agreement.entity.js","sourceRoot":"","sources":["../../../src/models/agreement.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA+E;AAC/E,mDAA8C;AAC9C,yEAAoE;AAQ7D,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,4BAAK;CAsBxC,CAAA;AArBC;IAAC,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;mDACkB;AAEpB;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;8CAC0B;AAE5B;IAAC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,IAAI;KACpB,CAAC;8BACU,IAAI;kDAAC;AAEjB;IAAC,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,2BAAW,CAAC;;+CACJ;AArBZ,cAAc;IAN1B,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,kBAAkB;QAC7B,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,KAAK;KAClB,CAAC;GACW,cAAc,CAsB1B;AAtBY,wCAAc"}
|