mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
initial server-recruit-resources
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
65b57b1f42
commit
e2632a5d14
@ -53,6 +53,7 @@ specifiers:
|
||||
'@rush-temp/server-chunter': file:./projects/server-chunter.tgz
|
||||
'@rush-temp/server-chunter-resources': file:./projects/server-chunter-resources.tgz
|
||||
'@rush-temp/server-core': file:./projects/server-core.tgz
|
||||
'@rush-temp/server-recruit-resources': file:./projects/server-recruit-resources.tgz
|
||||
'@rush-temp/server-ws': file:./projects/server-ws.tgz
|
||||
'@rush-temp/task': file:./projects/task.tgz
|
||||
'@rush-temp/task-assets': file:./projects/task-assets.tgz
|
||||
@ -120,7 +121,6 @@ specifiers:
|
||||
sass-loader: ^12.1.0
|
||||
simplytyped: ^3.3.0
|
||||
style-loader: ^3.2.1
|
||||
svelte-check: ^2.2.5
|
||||
svelte-preprocess: ^4.7.4
|
||||
svgo-loader: ^3.0.0
|
||||
toposort: ^2.0.2
|
||||
@ -185,6 +185,7 @@ dependencies:
|
||||
'@rush-temp/server-chunter': file:projects/server-chunter.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/server-chunter-resources': file:projects/server-chunter-resources.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/server-core': file:projects/server-core.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/server-recruit-resources': file:projects/server-recruit-resources.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/server-ws': file:projects/server-ws.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/task': file:projects/task.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/task-assets': file:projects/task-assets.tgz
|
||||
@ -252,7 +253,6 @@ dependencies:
|
||||
sass-loader: 12.1.0_sass@1.37.5+webpack@5.48.0
|
||||
simplytyped: 3.3.0_typescript@4.3.5
|
||||
style-loader: 3.2.1_webpack@5.48.0
|
||||
svelte-check: 2.2.5_8d5e7d8774dfc5d41599a7408187eba0
|
||||
svelte-preprocess: 4.7.4_50400bf9937d80c38e5edf397791f1b6
|
||||
svgo-loader: 3.0.0
|
||||
toposort: 2.0.2
|
||||
@ -8171,34 +8171,6 @@ packages:
|
||||
supports-color: 7.2.0
|
||||
dev: false
|
||||
|
||||
/svelte-check/2.2.5_8d5e7d8774dfc5d41599a7408187eba0:
|
||||
resolution: {integrity: sha512-EstDoqxjqWStWELh7Z0qytqUDl/ikdNEr21dveNc4fUDnhnqO2F2jHEufqoNnC3GfBji3GIUHvoXsp/I5lMbCg==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
svelte: ^3.24.0
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
chokidar: 3.4.3
|
||||
glob: 7.1.7
|
||||
import-fresh: 3.3.0
|
||||
minimist: 1.2.5
|
||||
sade: 1.7.4
|
||||
source-map: 0.7.3
|
||||
svelte-preprocess: 4.7.4_50400bf9937d80c38e5edf397791f1b6
|
||||
typescript: 4.3.5
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- coffeescript
|
||||
- less
|
||||
- node-sass
|
||||
- postcss
|
||||
- postcss-load-config
|
||||
- pug
|
||||
- sass
|
||||
- stylus
|
||||
- sugarss
|
||||
dev: false
|
||||
|
||||
/svelte-check/2.2.6_635b56cd8c077c5dd126b6e20db90d4b:
|
||||
resolution: {integrity: sha512-oJux/afbmcZO+N+ADXB88h6XANLie8Y2rh2qBlhgfkpr2c3t/q/T0w2JWrHqagaDL8zeNwO8a8RVFBkrRox8gg==}
|
||||
hasBin: true
|
||||
@ -9908,7 +9880,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-recruit.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-ylv971t0n3lj8VGA0t6gjli0YgZ/JGfIYq0sEHEz6eiStCzNU/0JmvuNBVXNkzikP082v92hFoqTM5YSOp5b9g==, tarball: file:projects/model-recruit.tgz}
|
||||
resolution: {integrity: sha512-KMPiYvEBiBkv3eI+7SoWS9T517ad6A+UX665xJq9qW3Woit47y2EdKpapWps2Pgb91Z33q3sfVY/bXC/y7sQ4A==, tarball: file:projects/model-recruit.tgz}
|
||||
id: file:projects/model-recruit.tgz
|
||||
name: '@rush-temp/model-recruit'
|
||||
version: 0.0.0
|
||||
@ -10069,7 +10041,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/panel.tgz_c38cf1a7a413db8918b0b4754c21e4c5:
|
||||
resolution: {integrity: sha512-qi/4kQnD9wGgk340sL69M3J1yRd6ffnE1khsB3cHG9csUoI1GiCYiP5pXsi1292rRhO7aEjuJfuylHhYbvdLdw==, tarball: file:projects/panel.tgz}
|
||||
resolution: {integrity: sha512-5z0G2tL0kPAetlvgPy7DuUV65vgcUvDVrr4L5dxztgbWxCp6v6zR2QfWKoPKHCtj/szm+s1XwbLKcF0ETmZU/w==, tarball: file:projects/panel.tgz}
|
||||
id: file:projects/panel.tgz
|
||||
name: '@rush-temp/panel'
|
||||
version: 0.0.0
|
||||
@ -10166,7 +10138,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/presentation.tgz_c38cf1a7a413db8918b0b4754c21e4c5:
|
||||
resolution: {integrity: sha512-40ahmahal+a+1hgyBS7oEkNiw/KUOxVlUjK/lT3isHWjdrjkU81GiX6Bs1MQqpptXh+HImYoJ8TLCRPryCztJA==, tarball: file:projects/presentation.tgz}
|
||||
resolution: {integrity: sha512-mX/Fwzm3x155pv36+PFu0pFe2fVU6bKwBV9GvEJtuVKlyaTL1QIyQ0QRt+/qHKVQcDkwtZ5RqS0hQsP2FoseNw==, tarball: file:projects/presentation.tgz}
|
||||
id: file:projects/presentation.tgz
|
||||
name: '@rush-temp/presentation'
|
||||
version: 0.0.0
|
||||
@ -10356,6 +10328,24 @@ packages:
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/server-recruit-resources.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-NpUKAVVdcoS+8SN0/6ZFQABo2NvkgGBC77SOdmXEU6kt5xXHIZK0HzE6LNNbY3GRtjLgh/JSEWlYigYPTp8uiA==, tarball: file:projects/server-recruit-resources.tgz}
|
||||
id: file:projects/server-recruit-resources.tgz
|
||||
name: '@rush-temp/server-recruit-resources'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@types/heft-jest': 1.0.2
|
||||
'@typescript-eslint/eslint-plugin': 4.28.5_a8e83fcad666e1ba86be4b2e27a20aea
|
||||
eslint: 7.32.0
|
||||
eslint-plugin-import: 2.23.4_eslint@7.32.0
|
||||
eslint-plugin-node: 11.1.0_eslint@7.32.0
|
||||
eslint-plugin-promise: 4.3.1
|
||||
transitivePeerDependencies:
|
||||
- '@typescript-eslint/parser'
|
||||
- supports-color
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/server-ws.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-2g/EdTVTXnGA98667Tow9pXEthXzrp4PnkDiic31vMJHuEMTdQ4CUBdF2N+lDz6OiFXDP8/Ak0MfSKNawXY3Ug==, tarball: file:projects/server-ws.tgz}
|
||||
id: file:projects/server-ws.tgz
|
||||
|
@ -29,8 +29,7 @@ export default mergeIds(recruitId, recruit, {
|
||||
class: {
|
||||
Vacancy: '' as Ref<Class<Vacancy>>,
|
||||
Candidates: '' as Ref<Class<Candidates>>,
|
||||
Candidate: '' as Ref<Class<Candidate>>,
|
||||
Applicant: '' as Ref<Class<Applicant>>,
|
||||
Candidate: '' as Ref<Class<Candidate>>
|
||||
},
|
||||
string: {
|
||||
CreateVacancy: '' as IntlString,
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import { plugin } from '@anticrm/platform'
|
||||
import type { Plugin, Asset } from '@anticrm/platform'
|
||||
import type { Space, SpaceWithStates, Doc, Ref, State, Bag } from '@anticrm/core'
|
||||
import type { Space, SpaceWithStates, Doc, Ref, State, Bag, Class } from '@anticrm/core'
|
||||
import type { Person } from '@anticrm/contact'
|
||||
import type { Attachment } from '@anticrm/chunter'
|
||||
|
||||
@ -51,6 +51,9 @@ export interface Applicant extends Doc {
|
||||
export const recruitId = 'recruit' as Plugin
|
||||
|
||||
export default plugin(recruitId, {
|
||||
class: {
|
||||
Applicant: '' as Ref<Class<Applicant>>
|
||||
},
|
||||
icon: {
|
||||
RecruitApplication: '' as Asset,
|
||||
Vacancy: '' as Asset
|
||||
|
@ -721,6 +721,11 @@
|
||||
"projectFolder": "server/chunter-resources",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@anticrm/server-recruit-resources",
|
||||
"projectFolder": "server/recruit-resources",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@anticrm/mongo",
|
||||
"projectFolder": "server/mongo",
|
||||
|
6
server/recruit-resources/.eslintrc.js
Normal file
6
server/recruit-resources/.eslintrc.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'],
|
||||
parserOptions: {
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
4
server/recruit-resources/.npmignore
Normal file
4
server/recruit-resources/.npmignore
Normal file
@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
18
server/recruit-resources/config/rig.json
Normal file
18
server/recruit-resources/config/rig.json
Normal file
@ -0,0 +1,18 @@
|
||||
// The "rig.json" file directs tools to look for their config files in an external package.
|
||||
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
|
||||
/**
|
||||
* (Required) The name of the rig package to inherit from.
|
||||
* It should be an NPM package name with the "-rig" suffix.
|
||||
*/
|
||||
"rigPackageName": "@anticrm/platform-rig"
|
||||
|
||||
/**
|
||||
* (Optional) Selects a config profile from the rig package. The name must consist of
|
||||
* lowercase alphanumeric words separated by hyphens, for example "sample-profile".
|
||||
* If omitted, then the "default" profile will be used."
|
||||
*/
|
||||
// "rigProfile": "your-profile-name"
|
||||
}
|
26
server/recruit-resources/package.json
Normal file
26
server/recruit-resources/package.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "@anticrm/server-recruit-resources",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "heft build",
|
||||
"lint:fix": "eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@anticrm/platform-rig":"~0.6.0",
|
||||
"@types/heft-jest":"^1.0.2",
|
||||
"@typescript-eslint/eslint-plugin":"4",
|
||||
"eslint-plugin-import":"2",
|
||||
"eslint-plugin-promise":"4",
|
||||
"eslint-plugin-node":"11",
|
||||
"eslint":"^7.32.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/core": "~0.6.11",
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"@anticrm/server-core": "~0.6.0",
|
||||
"@anticrm/recruit": "~0.6.0"
|
||||
}
|
||||
}
|
43
server/recruit-resources/src/index.ts
Normal file
43
server/recruit-resources/src/index.ts
Normal file
@ -0,0 +1,43 @@
|
||||
//
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
// Copyright © 2021 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import type { Tx, TxCreateDoc, TxFactory } from '@anticrm/core'
|
||||
import type { Applicant } from '@anticrm/recruit'
|
||||
|
||||
import recruit from '@anticrm/recruit'
|
||||
import core from '@anticrm/core'
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export async function OnApplication (tx: Tx, txFactory: TxFactory): Promise<Tx[]> {
|
||||
if (tx._class === core.class.TxCreateDoc) {
|
||||
const createTx = tx as TxCreateDoc<Applicant>
|
||||
if (createTx.objectClass === recruit.class.Applicant) {
|
||||
// const candidate = createTx.attributes.candidate
|
||||
// return txFactory.createTxUpdateDoc(recruit.class.Candidate)
|
||||
return []
|
||||
}
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export default async () => ({
|
||||
trigger: {
|
||||
OnApplication
|
||||
}
|
||||
})
|
8
server/recruit-resources/tsconfig.json
Normal file
8
server/recruit-resources/tsconfig.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user