mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-21 16:09:12 +03:00
add recruit
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
d8f262df9f
commit
f67908b5b4
@ -21,6 +21,8 @@ specifiers:
|
||||
'@rush-temp/model-chunter': file:./projects/model-chunter.tgz
|
||||
'@rush-temp/model-contact': file:./projects/model-contact.tgz
|
||||
'@rush-temp/model-core': file:./projects/model-core.tgz
|
||||
'@rush-temp/model-demo': file:./projects/model-demo.tgz
|
||||
'@rush-temp/model-recruit': file:./projects/model-recruit.tgz
|
||||
'@rush-temp/model-rig': file:./projects/model-rig.tgz
|
||||
'@rush-temp/model-task': file:./projects/model-task.tgz
|
||||
'@rush-temp/model-view': file:./projects/model-view.tgz
|
||||
@ -30,6 +32,9 @@ specifiers:
|
||||
'@rush-temp/presentation': file:./projects/presentation.tgz
|
||||
'@rush-temp/prod': file:./projects/prod.tgz
|
||||
'@rush-temp/query': file:./projects/query.tgz
|
||||
'@rush-temp/recruit': file:./projects/recruit.tgz
|
||||
'@rush-temp/recruit-assets': file:./projects/recruit-assets.tgz
|
||||
'@rush-temp/recruit-resources': file:./projects/recruit-resources.tgz
|
||||
'@rush-temp/server': file:./projects/server.tgz
|
||||
'@rush-temp/server-core': file:./projects/server-core.tgz
|
||||
'@rush-temp/server-ws': file:./projects/server-ws.tgz
|
||||
@ -110,6 +115,8 @@ dependencies:
|
||||
'@rush-temp/model-chunter': file:projects/model-chunter.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/model-contact': file:projects/model-contact.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/model-core': file:projects/model-core.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/model-demo': file:projects/model-demo.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/model-recruit': file:projects/model-recruit.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/model-rig': file:projects/model-rig.tgz_6ab28797e7a22071465f7d680ae81ae5
|
||||
'@rush-temp/model-task': file:projects/model-task.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/model-view': file:projects/model-view.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
@ -119,6 +126,9 @@ dependencies:
|
||||
'@rush-temp/presentation': file:projects/presentation.tgz_c38cf1a7a413db8918b0b4754c21e4c5
|
||||
'@rush-temp/prod': file:projects/prod.tgz_9242e79bee31c899aa4d2de67405a771
|
||||
'@rush-temp/query': file:projects/query.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/recruit': file:projects/recruit.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/recruit-assets': file:projects/recruit-assets.tgz
|
||||
'@rush-temp/recruit-resources': file:projects/recruit-resources.tgz_c38cf1a7a413db8918b0b4754c21e4c5
|
||||
'@rush-temp/server': file:projects/server.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/server-core': file:projects/server-core.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/server-ws': file:projects/server-ws.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
@ -8532,7 +8542,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-all.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-3Gk3U4Oui5kzxzSFM5dM0KrTi9/lgFGV+lc5FcCbGfliwFUIBOJwxj3+nAu0qCWE/BsTAL/h9Oq3/kEre8j/qg==, tarball: file:projects/model-all.tgz}
|
||||
resolution: {integrity: sha512-9hTEKuheThP0pu/QIH2Czyg1FIVdSfcNBLQQD5yZPyn+Qw61dpHY68fBv5cKVlcNk/Zwm3e+bbJG3ylF4QvyjA==, tarball: file:projects/model-all.tgz}
|
||||
id: file:projects/model-all.tgz
|
||||
name: '@rush-temp/model-all'
|
||||
version: 0.0.0
|
||||
@ -8553,7 +8563,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-chunter.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-Fyp9PC9Hir9bpNLM0WzvSRduqiH4I7feu2A4QZzuk+Ezi6ddmHKTAwhjn1K/J9mY3iWyBpJp1FfQN/K2LWuJiw==, tarball: file:projects/model-chunter.tgz}
|
||||
resolution: {integrity: sha512-z+BvYl8lM7j/95oNcxYkOdOs47V01OyAkrSa7iZZ24+fDpPJvKIJ8Ty3MVITJCadprqD38WGPynWlAbjHvuOUA==, tarball: file:projects/model-chunter.tgz}
|
||||
id: file:projects/model-chunter.tgz
|
||||
name: '@rush-temp/model-chunter'
|
||||
version: 0.0.0
|
||||
@ -8604,6 +8614,40 @@ packages:
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/model-demo.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-PF4ieOchEaN7Zgzx5N5Xz1VaIZ6HkXj5v80T8wyRV0ClC2u2ViAzUdrg8mCeG9E1ttwoVPhXjNmxeEV+QgLAZQ==, tarball: file:projects/model-demo.tgz}
|
||||
id: file:projects/model-demo.tgz
|
||||
name: '@rush-temp/model-demo'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@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/model-recruit.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-ZTZfTwGPFLYQ5+Ev7IN4fZyBtlh8CrWpRoubFvTgo8HKh9aSs/hQ3NclNYf+1iwzoiJiPaXrGgc9AodNMrJhLw==, tarball: file:projects/model-recruit.tgz}
|
||||
id: file:projects/model-recruit.tgz
|
||||
name: '@rush-temp/model-recruit'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@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/model-rig.tgz_6ab28797e7a22071465f7d680ae81ae5:
|
||||
resolution: {integrity: sha512-dt7CdKGQAqmtNHpwxDSBqYX/VMBMzPwx1q0bw4EEcdg+GMnClODo7CkYL6VEB++jAFt71USv6AJicS6cdnF8Pg==, tarball: file:projects/model-rig.tgz}
|
||||
id: file:projects/model-rig.tgz
|
||||
@ -8762,7 +8806,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/prod.tgz_9242e79bee31c899aa4d2de67405a771:
|
||||
resolution: {integrity: sha512-7EQmn4HF+UC7i1Ia43tXlAiswU3iaa2E/OpX7QquArY63qNtKjR44PYrVb2a2q10kzXDHZv2hEhk6TZFsSNUBQ==, tarball: file:projects/prod.tgz}
|
||||
resolution: {integrity: sha512-KwU2YgWoCY4XohrdVNdX9DrLtDBkUwkU+lZIwzCfFWazzxTFtyUpiDPY9WLNT+7l9yePGsEpcCxbyDLQFppznA==, tarball: file:projects/prod.tgz}
|
||||
id: file:projects/prod.tgz
|
||||
name: '@rush-temp/prod'
|
||||
version: 0.0.0
|
||||
@ -8818,6 +8862,53 @@ packages:
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/recruit-assets.tgz:
|
||||
resolution: {integrity: sha512-vMhv0+mg/VEguAQ7zzIHr9ieE2F+3kf+lX+FvCpIN+CyDIluiDVzlxp2e2VQ/1pCA9Wkt+u6bwHklbwyU7WDFg==, tarball: file:projects/recruit-assets.tgz}
|
||||
name: '@rush-temp/recruit-assets'
|
||||
version: 0.0.0
|
||||
dev: false
|
||||
|
||||
file:projects/recruit-resources.tgz_c38cf1a7a413db8918b0b4754c21e4c5:
|
||||
resolution: {integrity: sha512-e8G+P/AxPPLmj7mbc0Jzoj9Isc8uZJx0QOhpKXdbVIfpVwBAqIBKLBHaZJW75iSnnXGuD6wZVwrvzCLIHBTPag==, tarball: file:projects/recruit-resources.tgz}
|
||||
id: file:projects/recruit-resources.tgz
|
||||
name: '@rush-temp/recruit-resources'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
sass: 1.37.5
|
||||
svelte: 3.42.1
|
||||
svelte-loader: 3.1.2_svelte@3.42.1
|
||||
svelte-preprocess: 4.7.4_c407529626dbb58d14a718f48c7fa84c
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- coffeescript
|
||||
- less
|
||||
- node-sass
|
||||
- postcss
|
||||
- postcss-load-config
|
||||
- pug
|
||||
- stylus
|
||||
- sugarss
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/recruit.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-kVE1YZLi0qv2//sqMhM3SSVew4V36r58Tk0xcA4cP91HeGuozqi4h0V9eYLJocVX2vk3555kQPgTVCNDKM2uwg==, tarball: file:projects/recruit.tgz}
|
||||
id: file:projects/recruit.tgz
|
||||
name: '@rush-temp/recruit'
|
||||
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-core.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-lHE4PAWrX+WKdM9/Yy1rYZW6rCacwLMkSUIJakrXZeyGlNytXXSvH20bgfocVn73grez3Zjy6qlNm7H7EClgDQ==, tarball: file:projects/server-core.tgz}
|
||||
id: file:projects/server-core.tgz
|
||||
|
@ -58,6 +58,9 @@
|
||||
"@anticrm/task-resources": "~0.6.0",
|
||||
"@anticrm/chunter": "~0.6.0",
|
||||
"@anticrm/chunter-assets": "~0.6.0",
|
||||
"@anticrm/chunter-resources": "~0.6.0"
|
||||
"@anticrm/chunter-resources": "~0.6.0",
|
||||
"@anticrm/recruit": "~0.6.0",
|
||||
"@anticrm/recruit-assets": "~0.6.0",
|
||||
"@anticrm/recruit-resources": "~0.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -22,8 +22,7 @@ import { viewId } from '@anticrm/view'
|
||||
import { taskId } from '@anticrm/task'
|
||||
import { contactId } from '@anticrm/contact'
|
||||
import { chunterId } from '@anticrm/chunter'
|
||||
// import { recruitId } from '@anticrm/recruit'
|
||||
// import { tableId } from '@anticrm/table'
|
||||
import { recruitId } from '@anticrm/recruit'
|
||||
|
||||
// import { chunterServerId } from '@anticrm/chunter-server'
|
||||
|
||||
@ -31,7 +30,7 @@ import '@anticrm/login-assets'
|
||||
import '@anticrm/task-assets'
|
||||
import '@anticrm/view-assets'
|
||||
import '@anticrm/chunter-assets'
|
||||
// import '@anticrm/recruit-assets'
|
||||
import '@anticrm/recruit-assets'
|
||||
|
||||
export function configurePlatform() {
|
||||
|
||||
@ -49,9 +48,8 @@ export function configurePlatform() {
|
||||
addLocation(taskId, () => import(/* webpackChunkName: "task" */ '@anticrm/task-resources'))
|
||||
addLocation(contactId, () => import(/* webpackChunkName: "contact" */ '@anticrm/contact-resources'))
|
||||
addLocation(chunterId, () => import(/* webpackChunkName: "chunter" */ '@anticrm/chunter-resources'))
|
||||
// // addLocation(recruitId, () => import(/* webpackChunkName: "recruit" */ '@anticrm/plugin-recruit'))
|
||||
// addLocation(tableId, () => import(/* webpackChunkName: "table" */ '@anticrm/table-resources'))
|
||||
|
||||
addLocation(recruitId, () => import(/* webpackChunkName: "recruit" */ '@anticrm/recruit-resources'))
|
||||
|
||||
// addLocation(chunterServerId, () => import(/* webpackChunkName: "chunter-server" */ '@anticrm/chunter-server'))
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -26,6 +26,8 @@
|
||||
"@anticrm/model-workbench": "~0.6.0",
|
||||
"@anticrm/model-contact": "~0.6.0",
|
||||
"@anticrm/model-task": "~0.6.0",
|
||||
"@anticrm/model-chunter": "~0.6.0"
|
||||
"@anticrm/model-chunter": "~0.6.0",
|
||||
"@anticrm/model-recruit": "~0.6.0",
|
||||
"@anticrm/model-demo": "~0.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -21,9 +21,9 @@ import { createModel as workbenchModel } from '@anticrm/model-workbench'
|
||||
import { createModel as contactModel } from '@anticrm/model-contact'
|
||||
import { createModel as taskModel } from '@anticrm/model-task'
|
||||
import { createModel as chunterModel } from '@anticrm/model-chunter'
|
||||
// import { createModel as recruitModel } from '@anticrm/model-recruit'
|
||||
import { createModel as recruitModel } from '@anticrm/model-recruit'
|
||||
|
||||
// import { createDemo } from '@anticrm/model-demo'
|
||||
import { createDemo } from '@anticrm/model-demo'
|
||||
|
||||
const builder = new Builder()
|
||||
|
||||
@ -33,8 +33,8 @@ workbenchModel(builder)
|
||||
contactModel(builder)
|
||||
chunterModel(builder)
|
||||
taskModel(builder)
|
||||
// recruitModel(builder)
|
||||
recruitModel(builder)
|
||||
|
||||
// createDemo(builder)
|
||||
createDemo(builder)
|
||||
|
||||
export default builder
|
||||
|
6
models/demo/.eslintrc.js
Normal file
6
models/demo/.eslintrc.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@anticrm/model-rig/profiles/default/config/eslint.config.json'],
|
||||
parserOptions: {
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
4
models/demo/.npmignore
Normal file
4
models/demo/.npmignore
Normal file
@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
18
models/demo/config/rig.json
Normal file
18
models/demo/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/model-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"
|
||||
}
|
25
models/demo/package.json
Normal file
25
models/demo/package.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@anticrm/model-demo",
|
||||
"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/model-rig":"~0.6.0",
|
||||
"@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.7",
|
||||
"@anticrm/model": "~0.6.0",
|
||||
"@anticrm/platform": "~0.6.3",
|
||||
"@anticrm/model-recruit":"~0.6.0"
|
||||
}
|
||||
}
|
37
models/demo/src/index.ts
Normal file
37
models/demo/src/index.ts
Normal file
@ -0,0 +1,37 @@
|
||||
//
|
||||
// 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 { Builder } from '@anticrm/model'
|
||||
|
||||
import recruit from '@anticrm/model-recruit'
|
||||
|
||||
export function createDemo (builder: Builder): void {
|
||||
builder.createDoc(recruit.class.Candidate, recruit.space.CandidatesPublic, {
|
||||
firstName: 'Andrey',
|
||||
lastName: 'P.',
|
||||
email: 'andrey@hc.engineering',
|
||||
phone: '+1 646 667 6832',
|
||||
city: 'Monte Carlo'
|
||||
})
|
||||
|
||||
builder.createDoc(recruit.class.Candidate, recruit.space.CandidatesPublic, {
|
||||
firstName: 'Marina',
|
||||
lastName: 'M.',
|
||||
email: 'marina@hc.engineering',
|
||||
phone: '+1 646 777 3333',
|
||||
city: 'Los Angeles'
|
||||
})
|
||||
}
|
8
models/demo/tsconfig.json
Normal file
8
models/demo/tsconfig.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./node_modules/@anticrm/model-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
}
|
||||
}
|
6
models/recruit/.eslintrc.js
Normal file
6
models/recruit/.eslintrc.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@anticrm/model-rig/profiles/default/config/eslint.config.json'],
|
||||
parserOptions: {
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
4
models/recruit/.npmignore
Normal file
4
models/recruit/.npmignore
Normal file
@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
18
models/recruit/config/rig.json
Normal file
18
models/recruit/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/model-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"
|
||||
}
|
32
models/recruit/package.json
Normal file
32
models/recruit/package.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "@anticrm/model-recruit",
|
||||
"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/model-rig":"~0.6.0",
|
||||
"@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.7",
|
||||
"@anticrm/model": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/contact": "~0.6.0",
|
||||
"@anticrm/platform": "~0.6.3",
|
||||
"@anticrm/model-core": "~0.6.0",
|
||||
"@anticrm/model-view": "~0.6.0",
|
||||
"@anticrm/model-workbench": "~0.6.0",
|
||||
"@anticrm/model-contact": "~0.6.0",
|
||||
"@anticrm/recruit": "~0.6.0",
|
||||
"@anticrm/recruit-resources": "~0.6.0"
|
||||
}
|
||||
}
|
112
models/recruit/src/index.ts
Normal file
112
models/recruit/src/index.ts
Normal file
@ -0,0 +1,112 @@
|
||||
//
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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 { IntlString } from '@anticrm/platform'
|
||||
import { Builder, Model, UX, Prop, TypeString } from '@anticrm/model'
|
||||
import type { Ref, FindOptions, Doc } from '@anticrm/core'
|
||||
import core, { TSpace, TDoc } from '@anticrm/model-core'
|
||||
import type { Vacancy, Candidates, Candidate, Applicant } from '@anticrm/recruit'
|
||||
|
||||
import workbench from '@anticrm/model-workbench'
|
||||
|
||||
import view from '@anticrm/model-view'
|
||||
import contact, { TPerson } from '@anticrm/model-contact'
|
||||
import recruit from './plugin'
|
||||
import { Person } from '@anticrm/contact'
|
||||
|
||||
@Model(recruit.class.Vacancy, core.class.Space)
|
||||
@UX(recruit.string.Vacancy, recruit.icon.Vacancy)
|
||||
export class TVacancy extends TSpace implements Vacancy {}
|
||||
|
||||
@Model(recruit.class.Candidates, core.class.Space)
|
||||
@UX(recruit.string.CandidatePools, recruit.icon.RecruitApplication)
|
||||
export class TCandidates extends TSpace implements Candidates {}
|
||||
|
||||
@Model(recruit.class.Candidate, contact.class.Person)
|
||||
@UX('Candidate' as IntlString)
|
||||
export class TCandidate extends TPerson implements Candidate {}
|
||||
|
||||
@Model(recruit.class.Applicant, core.class.Doc)
|
||||
export class TApplicant extends TDoc implements Applicant {
|
||||
@Prop(TypeString(), 'Candidate' as IntlString)
|
||||
candidate!: Ref<Person>
|
||||
}
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createModel(TVacancy, TCandidates, TCandidate, TApplicant)
|
||||
|
||||
builder.mixin(recruit.class.Vacancy, core.class.Class, workbench.mixin.SpaceView, {
|
||||
view: {
|
||||
class: recruit.class.Applicant,
|
||||
createItemDialog: recruit.component.CreateApplication
|
||||
}
|
||||
})
|
||||
|
||||
builder.mixin(recruit.class.Candidates, core.class.Class, workbench.mixin.SpaceView, {
|
||||
view: {
|
||||
class: recruit.class.Candidate,
|
||||
createItemDialog: recruit.component.CreateCandidate
|
||||
}
|
||||
})
|
||||
|
||||
builder.createDoc(workbench.class.Application, core.space.Model, {
|
||||
label: recruit.string.RecruitApplication,
|
||||
icon: recruit.icon.RecruitApplication,
|
||||
navigatorModel: {
|
||||
spaces: [
|
||||
{
|
||||
label: recruit.string.Vacancies,
|
||||
spaceClass: recruit.class.Vacancy,
|
||||
addSpaceLabel: recruit.string.CreateVacancy,
|
||||
createComponent: recruit.component.CreateVacancy
|
||||
},
|
||||
{
|
||||
label: recruit.string.CandidatePools,
|
||||
spaceClass: recruit.class.Candidates,
|
||||
addSpaceLabel: recruit.string.CreateCandidates,
|
||||
createComponent: recruit.component.CreateCandidates
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
builder.createDoc(recruit.class.Candidates, core.space.Model, {
|
||||
name: 'public',
|
||||
description: 'Public Candidates',
|
||||
private: false,
|
||||
members: []
|
||||
}, recruit.space.CandidatesPublic)
|
||||
|
||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
||||
attachTo: recruit.class.Candidate,
|
||||
descriptor: view.viewlet.Table,
|
||||
open: recruit.component.EditCandidate,
|
||||
config: ['', 'email', 'phone', 'city']
|
||||
})
|
||||
|
||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
||||
attachTo: recruit.class.Applicant,
|
||||
descriptor: view.viewlet.Table,
|
||||
open: recruit.component.EditCandidate,
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||
options: {
|
||||
lookup: {
|
||||
candidate: recruit.class.Candidate
|
||||
}
|
||||
} as FindOptions<Doc>,
|
||||
config: ['$lookup.candidate', '$lookup.candidate.email', '$lookup.candidate.city']
|
||||
})
|
||||
}
|
||||
|
||||
export { default } from './plugin'
|
40
models/recruit/src/plugin.ts
Normal file
40
models/recruit/src/plugin.ts
Normal file
@ -0,0 +1,40 @@
|
||||
//
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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 { mergeIds } from '@anticrm/platform'
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import type { Ref, Space } from '@anticrm/core'
|
||||
import type { AnyComponent } from '@anticrm/ui'
|
||||
import { recruitId } from '@anticrm/recruit'
|
||||
import recruit from '@anticrm/recruit-resources/src/plugin'
|
||||
|
||||
export default mergeIds(recruitId, recruit, {
|
||||
string: {
|
||||
RecruitApplication: '' as IntlString,
|
||||
Vacancies: '' as IntlString,
|
||||
CandidatePools: '' as IntlString,
|
||||
Vacancy: '' as IntlString
|
||||
},
|
||||
component: {
|
||||
CreateVacancy: '' as AnyComponent,
|
||||
CreateCandidates: '' as AnyComponent,
|
||||
CreateCandidate: '' as AnyComponent,
|
||||
CreateApplication: '' as AnyComponent,
|
||||
EditCandidate: '' as AnyComponent
|
||||
},
|
||||
space: {
|
||||
CandidatesPublic: '' as Ref<Space>
|
||||
}
|
||||
})
|
8
models/recruit/tsconfig.json
Normal file
8
models/recruit/tsconfig.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./node_modules/@anticrm/model-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
}
|
||||
}
|
27
plugins/recruit-assets/assets/icons.svg
Normal file
27
plugins/recruit-assets/assets/icons.svg
Normal file
@ -0,0 +1,27 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="chunter" viewBox="0 0 32 32">
|
||||
<path d="M25.9,14.6C25.7,9.8,21.9,6,17,5.7h-0.5c0,0,0,0,0,0c-1.4,0-2.9,0.3-4.2,1c-3.2,1.6-5.2,4.8-5.2,8.4c0,1.4,0.3,2.7,0.9,4 l-1.9,5.7c-0.1,0.2,0,0.5,0.1,0.6c0.1,0.1,0.3,0.2,0.4,0.2c0.1,0,0.1,0,0.2,0l5.7-1.9c1.2,0.6,2.6,0.9,4,0.9c0,0,0,0,0,0 c3.6,0,6.8-2,8.4-5.2c0.7-1.3,1-2.8,1-4.2L25.9,14.6z M24.7,15.1C24.7,15.1,24.7,15.1,24.7,15.1c0,1.3-0.3,2.5-0.9,3.7 c-1.4,2.8-4.2,4.5-7.3,4.5c0,0,0,0,0,0c-1.3,0-2.5-0.3-3.6-0.9c-0.1-0.1-0.3-0.1-0.5,0l-4.8,1.6l1.6-4.8c0.1-0.2,0-0.3,0-0.5 c-0.6-1.1-0.9-2.4-0.9-3.7c0-3.1,1.7-5.9,4.5-7.3c1.1-0.6,2.4-0.9,3.6-0.9c0,0,0,0,0,0l0.5,0c4.2,0.2,7.5,3.6,7.7,7.7V15.1z"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="hashtag" viewBox="0 0 16 16">
|
||||
<path d="M14,9.6h-3.2l0.4-3.2H14c0.3,0,0.6-0.3,0.6-0.6S14.3,5.2,14,5.2h-2.7l0.4-3.7c0-0.3-0.2-0.6-0.5-0.7 c-0.3,0-0.6,0.2-0.7,0.5l-0.4,3.8H6.9l0.4-3.7c0-0.3-0.2-0.6-0.5-0.7c-0.3,0-0.6,0.2-0.7,0.5L5.7,5.2H2.3C2,5.2,1.7,5.5,1.7,5.8 S2,6.4,2.3,6.4h3.2L5.2,9.6H2.3c-0.3,0-0.6,0.3-0.6,0.6s0.3,0.6,0.6,0.6h2.7l-0.4,3.7c0,0.3,0.2,0.6,0.5,0.7c0,0,0,0,0.1,0 c0.3,0,0.6-0.2,0.6-0.5l0.4-3.8h3.2L9,14.5c0,0.3,0.2,0.6,0.5,0.7c0,0,0,0,0.1,0c0.3,0,0.6-0.2,0.6-0.5l0.4-3.8H14 c0.3,0,0.6-0.3,0.6-0.6S14.3,9.6,14,9.6z M6.4,9.6l0.4-3.2h3.2L9.6,9.6H6.4z"/>
|
||||
</symbol>
|
||||
<symbol id="lock" viewBox="0 0 16 16">
|
||||
<path d="M13,6.9h-1.1V4.8c0-2.2-1.8-3.9-3.9-3.9c-2.2,0-3.9,1.8-3.9,3.9v2.1H3c-0.9,0-1.6,0.7-1.6,1.6v5.3 c0,0.9,0.7,1.6,1.6,1.6h10c0.9,0,1.6-0.7,1.6-1.6V8.5C14.6,7.6,13.9,6.9,13,6.9z M5.3,4.8c0-1.5,1.2-2.7,2.7-2.7s2.7,1.2,2.7,2.7 v2.1H5.3V4.8z M13.4,13.8c0,0.2-0.2,0.4-0.4,0.4H3c-0.2,0-0.4-0.2-0.4-0.4V8.5c0-0.2,0.2-0.4,0.4-0.4h10c0.2,0,0.4,0.2,0.4,0.4V13.8 z"/>
|
||||
</symbol>
|
||||
<symbol id="recruitment" viewBox="0 0 24 24">
|
||||
<g>
|
||||
<path d="M9.6,14.4c-1.8,0-7.4,0-7.4,3.4c0,3,4.2,3.4,7.4,3.4c1.8,0,7.4,0,7.4-3.4C17.1,14.7,12.8,14.4,9.6,14.4z M9.6,20c-4.1,0-6.2-0.7-6.2-2.2c0-1.5,2.1-2.2,6.2-2.2s6.2,0.7,6.2,2.2C15.9,19.2,13.8,20,9.6,20z"/>
|
||||
<path d="M9.6,12.4C9.6,12.4,9.7,12.4,9.6,12.4c1.4,0,2.6-0.5,3.5-1.5c0.9-0.9,1.4-2.2,1.4-3.5c0-2.7-2.2-5-5-5 c-2.7,0-5,2.2-5,5C4.7,10.1,6.9,12.4,9.6,12.4z M9.6,3.6c2.1,0,3.8,1.7,3.8,3.8c0,1-0.4,2-1.1,2.7c-0.7,0.7-1.7,1.1-2.7,1.1h0 c-2.1,0-3.8-1.7-3.8-3.8C5.9,5.3,7.6,3.6,9.6,3.6z"/>
|
||||
<path d="M16.5,10c-0.3,0-0.6,0.3-0.5,0.7c0,0.3,0.3,0.5,0.6,0.5c0,0,0.1,0,0.1,0C18.5,11,20,9.3,20,7.4 c0-1.9-1.4-3.5-3.3-3.8C16.4,3.5,16.1,3.7,16,4c-0.1,0.3,0.2,0.6,0.5,0.7c1.3,0.2,2.3,1.3,2.3,2.7C18.8,8.7,17.8,9.9,16.5,10z"/>
|
||||
<path d="M18.7,13.9c-0.3,0-0.6,0.2-0.7,0.5s0.2,0.6,0.5,0.7c2.1,0.3,2.1,1.1,2.1,1.3c0,0.3-0.1,0.7-0.9,1 c-0.3,0.1-0.5,0.5-0.3,0.8c0.1,0.2,0.3,0.4,0.6,0.4c0.1,0,0.1,0,0.2,0c1.4-0.5,1.7-1.5,1.7-2.1C21.9,15,20.8,14.2,18.7,13.9z"/>
|
||||
</g>
|
||||
</symbol>
|
||||
<symbol id="vacancy" viewBox="0 0 20 20">
|
||||
<g>
|
||||
<path d="M14.6,4.6h-1.5c-0.1-1.1-1-1.9-2.1-1.9H9c-1.1,0-2,0.9-2.1,1.9H5.4c-1.5,0-2.8,1.3-2.8,2.8V10 c0,0.2,0.1,0.3,0.2,0.4c2,1.2,4.5,1.8,7.1,1.8c2.6,0,5.2-0.6,7.1-1.8c0.2-0.1,0.2-0.3,0.2-0.4V7.4C17.4,5.8,16.1,4.6,14.6,4.6z M9,3.6H11c0.6,0,1,0.4,1.1,0.9H7.9C8,4,8.5,3.6,9,3.6z M16.4,9.7c-1.8,1-4,1.5-6.4,1.5c-2.3,0-4.6-0.5-6.4-1.5V7.4 c0-1,0.8-1.8,1.8-1.8h9.2c1,0,1.8,0.8,1.8,1.8V9.7z"/>
|
||||
<path d="M16.9,12.2c-0.3,0-0.5,0.2-0.5,0.5l-0.1,1.9c-0.1,1-0.9,1.8-1.9,1.8H5.7c-1,0-1.8-0.8-1.9-1.8l-0.1-1.9 c0-0.3-0.3-0.5-0.5-0.5c-0.3,0-0.5,0.3-0.5,0.5l0.1,1.9c0.1,1.5,1.4,2.7,2.9,2.7h8.6c1.5,0,2.8-1.2,2.9-2.7l0.1-1.9 C17.4,12.5,17.2,12.2,16.9,12.2z"/>
|
||||
</g>
|
||||
</symbol>
|
||||
|
||||
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
11
plugins/recruit-assets/lang/en.json
Normal file
11
plugins/recruit-assets/lang/en.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Vacancies": "Vacancies",
|
||||
"CandidatePools": "Candidates",
|
||||
"VacancyName": "Vacancy Title *",
|
||||
"VacancyDescription": "Vacancy Description",
|
||||
"CreateVacancy": "Create Vacancy",
|
||||
"CreateCandidate": "Create Candidate",
|
||||
"MakePrivate": "Make Private"
|
||||
}
|
||||
}
|
21
plugins/recruit-assets/package.json
Normal file
21
plugins/recruit-assets/package.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "@anticrm/recruit-assets",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"test": "echo 'no tests'",
|
||||
"lint": "ts-standard src",
|
||||
"lint:fix": "ts-standard --fix src",
|
||||
"format": "prettier --write 'src/**/*.{ts*,js*,yml}' && ts-standard --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform":"~0.6.3",
|
||||
"@anticrm/recruit":"~0.6.0"
|
||||
}
|
||||
}
|
25
plugins/recruit-assets/src/index.ts
Normal file
25
plugins/recruit-assets/src/index.ts
Normal file
@ -0,0 +1,25 @@
|
||||
//
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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 { loadMetadata, addStringsLoader } from '@anticrm/platform'
|
||||
import recruit, { recruitId } from '@anticrm/recruit'
|
||||
|
||||
const icons = require('../assets/icons.svg')
|
||||
loadMetadata(recruit.icon, {
|
||||
RecruitApplication: `${icons}#recruitment`,
|
||||
Vacancy: `${icons}#vacancy`
|
||||
})
|
||||
|
||||
addStringsLoader(recruitId, async (lang: string) => await import(`../lang/${lang}.json`))
|
15
plugins/recruit-assets/tsconfig.json
Normal file
15
plugins/recruit-assets/tsconfig.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"declaration": true,
|
||||
"outDir": "./lib",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom"
|
||||
]
|
||||
}
|
||||
}
|
32
plugins/recruit-resources/package.json
Normal file
32
plugins/recruit-resources/package.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "@anticrm/recruit-resources",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"test": "jest",
|
||||
"lint": "eslint src",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write 'src/**/*.{ts*,js*,yml}' && eslint --fix src",
|
||||
"svelte-check": "svelte-check"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader":"^3.1.2",
|
||||
"sass":"^1.37.5",
|
||||
"svelte-preprocess":"^4.7.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.0",
|
||||
"@anticrm/core": "~0.6.0",
|
||||
"svelte": "^3.37.0",
|
||||
"@anticrm/recruit": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.0",
|
||||
"@anticrm/text-editor": "~0.6.0",
|
||||
"@anticrm/chunter": "~0.6.0",
|
||||
"@anticrm/contact": "~0.6.0"
|
||||
}
|
||||
}
|
5
plugins/recruit-resources/postcss.config.js
Normal file
5
plugins/recruit-resources/postcss.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
83
plugins/recruit-resources/src/components/Card.svelte
Normal file
83
plugins/recruit-resources/src/components/Card.svelte
Normal file
@ -0,0 +1,83 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { Avatar } from '@anticrm/presentation'
|
||||
import LabelStatus from './LabelStatus.svelte'
|
||||
import Tag from './Tag.svelte'
|
||||
import File from './icons/File.svelte'
|
||||
|
||||
interface Person {
|
||||
firstName: string
|
||||
lastName: string
|
||||
email: string
|
||||
description: string
|
||||
city: string
|
||||
state: string
|
||||
}
|
||||
|
||||
export let user: Person
|
||||
|
||||
</script>
|
||||
|
||||
<div class="card-container">
|
||||
<div class="status"><LabelStatus label={user.state} color={'var(--primary-button-enabled)'} /></div>
|
||||
<div class="avatar"><Avatar size={88} /></div>
|
||||
<div class="name">{user.lastName} {user.firstName}</div>
|
||||
<div class="description">{user.description}</div>
|
||||
<div class="city">{user.city}</div>
|
||||
<Tag icon={File} label={'Application'} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.card-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 20px 24px;
|
||||
background-color: var(--theme-button-bg-enabled);
|
||||
border: 1px solid var(--theme-bg-accent-color);
|
||||
border-radius: 12px;
|
||||
|
||||
.status {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
width: 100%;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.avatar {
|
||||
height: 88px;
|
||||
}
|
||||
.name {
|
||||
margin: 16px 0 4px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
line-height: 150%;
|
||||
color: var(--theme-caption-color);
|
||||
}
|
||||
.description, .city {
|
||||
font-size: 12px;
|
||||
color: var(--theme-content-dark-color);
|
||||
}
|
||||
.city {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--theme-bg-accent-hover);
|
||||
box-shadow: 0px 12px 40px rgba(0, 0, 0, .15);
|
||||
}
|
||||
}
|
||||
</style>
|
74
plugins/recruit-resources/src/components/CardEmpty.svelte
Normal file
74
plugins/recruit-resources/src/components/CardEmpty.svelte
Normal file
@ -0,0 +1,74 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { Label } from '@anticrm/ui'
|
||||
import { IconAdd } from '@anticrm/ui'
|
||||
|
||||
export let label: IntlString
|
||||
</script>
|
||||
|
||||
<div class="card-container">
|
||||
<div class="circle">
|
||||
<div class="icon">
|
||||
<IconAdd size={'large'} />
|
||||
</div>
|
||||
</div>
|
||||
<Label {label} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.card-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 20px 24px;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
color: var(--theme-caption-color);
|
||||
background-color: var(--theme-button-bg-enabled);
|
||||
border: 1px solid var(--theme-bg-accent-color);
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
|
||||
.circle {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background-color: var(--theme-bg-accent-color);
|
||||
border-radius: 50%;
|
||||
|
||||
.icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
opacity: .6;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--theme-bg-accent-hover);
|
||||
box-shadow: 0px 12px 40px rgba(0, 0, 0, .15);
|
||||
|
||||
.circle .icon {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
60
plugins/recruit-resources/src/components/CardView.svelte
Normal file
60
plugins/recruit-resources/src/components/CardView.svelte
Normal file
@ -0,0 +1,60 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { ScrollBox } from '@anticrm/ui'
|
||||
import Card from './Card.svelte'
|
||||
import CardEmpty from './CardEmpty.svelte'
|
||||
|
||||
interface Person {
|
||||
firstName: string
|
||||
lastName: string
|
||||
email: string
|
||||
description: string
|
||||
city: string
|
||||
state: string
|
||||
}
|
||||
|
||||
const cards: Array<Person> = [
|
||||
{ firstName: 'Chen', lastName: 'Rosamund', email: 'rosamund@gmail.com', description: 'Software Engineer', city: 'San Francisco', state: 'Offered' },
|
||||
{ firstName: 'Chen', lastName: 'Rosamund', email: 'rosamund@gmail.com', description: 'Software Engineer', city: 'San Francisco', state: 'Hired' },
|
||||
{ firstName: 'Chen', lastName: 'Rosamund', email: 'rosamund@gmail.com', description: 'Software Engineer', city: 'San Francisco', state: 'Interview' },
|
||||
{ firstName: 'Chen', lastName: 'Rosamund', email: 'rosamund@gmail.com', description: 'Software Engineer', city: 'San Francisco', state: 'Submission' },
|
||||
{ firstName: 'Chen', lastName: 'Rosamund', email: 'rosamund@gmail.com', description: 'Software Engineer', city: 'San Francisco', state: 'Offered' },
|
||||
{ firstName: 'Chen', lastName: 'Rosamund', email: 'rosamund@gmail.com', description: 'Software Engineer', city: 'San Francisco', state: 'Hired' },
|
||||
{ firstName: 'Chen', lastName: 'Rosamund', email: 'rosamund@gmail.com', description: 'Software Engineer', city: 'San Francisco', state: 'Interview' },
|
||||
{ firstName: 'Chen', lastName: 'Rosamund', email: 'rosamund@gmail.com', description: 'Software Engineer', city: 'San Francisco', state: 'Submission' },
|
||||
{ firstName: 'Chen', lastName: 'Rosamund', email: 'rosamund@gmail.com', description: 'Software Engineer', city: 'San Francisco', state: 'Offered' }
|
||||
]
|
||||
|
||||
</script>
|
||||
|
||||
<ScrollBox vertical>
|
||||
<div class="cards-container">
|
||||
<CardEmpty label={'Create new task'} />
|
||||
{#each cards as card}
|
||||
<Card user={card} />
|
||||
{/each}
|
||||
</div>
|
||||
</ScrollBox>
|
||||
|
||||
<style lang="scss">
|
||||
.cards-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, auto));
|
||||
grid-auto-rows: minmax(280px, auto);
|
||||
grid-gap: 24px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,56 @@
|
||||
<!--
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import type { Ref, Space } from '@anticrm/core'
|
||||
import { DatePicker, EditBox, Dialog, Tabs, Section, Grid } from '@anticrm/ui'
|
||||
import { UserBox } from '@anticrm/presentation'
|
||||
import type { Person } from '@anticrm/contact'
|
||||
import File from './icons/File.svelte'
|
||||
import Address from './icons/Address.svelte'
|
||||
import Attachment from './icons/Attachment.svelte'
|
||||
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
|
||||
import recruit from '../plugin'
|
||||
|
||||
export let space: Ref<Space>
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let candidate: Ref<Person>
|
||||
|
||||
const client = getClient()
|
||||
|
||||
function createCandidate() {
|
||||
client.createDoc(recruit.class.Applicant, space, {
|
||||
candidate,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog label={'Create Application'}
|
||||
okLabel={'Create Application'}
|
||||
okAction={createCandidate}
|
||||
on:close={() => { dispatch('close') }}>
|
||||
<Tabs/>
|
||||
<Section icon={File} label={'General Information'}>
|
||||
<Grid>
|
||||
<UserBox _class={recruit.class.Candidate} title='Candidate' caption='Candidates' bind:value={candidate} show/>
|
||||
<DatePicker title={'Pick due date'} />
|
||||
</Grid>
|
||||
</Section>
|
||||
</Dialog>
|
@ -0,0 +1,73 @@
|
||||
<!--
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import type { Ref, Space } from '@anticrm/core'
|
||||
import { TextArea, EditBox, Dialog, Tabs, Section, Grid, DialogHeader } from '@anticrm/ui'
|
||||
import File from './icons/File.svelte'
|
||||
import Address from './icons/Address.svelte'
|
||||
import Attachment from './icons/Attachment.svelte'
|
||||
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
|
||||
import recruit from '../plugin'
|
||||
|
||||
export let space: Ref<Space>
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let firstName: string = ''
|
||||
let lastName: string = ''
|
||||
let email: string = ''
|
||||
let phone: string = ''
|
||||
let city: string = ''
|
||||
|
||||
const client = getClient()
|
||||
|
||||
function createCandidate() {
|
||||
client.createDoc(recruit.class.Candidate, space, {
|
||||
firstName,
|
||||
lastName,
|
||||
email,
|
||||
phone,
|
||||
city,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog label={recruit.string.CreateCandidate}
|
||||
okLabel={recruit.string.CreateCandidate}
|
||||
okAction={createCandidate}
|
||||
on:close={() => { dispatch('close') }}>
|
||||
<DialogHeader />
|
||||
<Tabs/>
|
||||
<Section icon={File} label={'Personal Information'}>
|
||||
<Grid>
|
||||
<EditBox label={'First name *'} placeholder={'John'} bind:value={firstName} focus/>
|
||||
<EditBox label={'Last name *'} placeholder={'Smith'} bind:value={lastName}/>
|
||||
<EditBox label={'Email *'} placeholder={'john.smith@gmail.com'} bind:value={email}/>
|
||||
<EditBox label={'Phone *'} placeholder={'+00 (000) 000 00'} bind:value={phone}/>
|
||||
</Grid>
|
||||
</Section>
|
||||
<Section icon={Address} label={'Address'}>
|
||||
<Grid>
|
||||
<EditBox label={'Street'} placeholder={'Broderick st'} />
|
||||
<EditBox label={'City *'} placeholder={'Los Angeles'} bind:value={city}/>
|
||||
<EditBox label={'ZIP / Postal code'} placeholder={'26892'} />
|
||||
<EditBox label={'Country'} placeholder={'United States'} />
|
||||
</Grid>
|
||||
</Section>
|
||||
</Dialog>
|
@ -0,0 +1,51 @@
|
||||
<!--
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { TextArea, EditBox, Dialog, ToggleWithLabel, Grid } from '@anticrm/ui'
|
||||
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
|
||||
import recruit from '../plugin'
|
||||
import core from '@anticrm/core'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let name: string = ''
|
||||
let description: string = ''
|
||||
|
||||
const client = getClient()
|
||||
|
||||
function createCandidates() {
|
||||
client.createDoc(recruit.class.Candidates, core.space.Model, {
|
||||
name,
|
||||
description,
|
||||
private: false,
|
||||
members: []
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog label={recruit.string.CreateCandidates}
|
||||
okLabel={recruit.string.CreateCandidates}
|
||||
okAction={createCandidates}
|
||||
on:close={() => { dispatch('close') }}>
|
||||
<Grid column={1}>
|
||||
<EditBox label={recruit.string.CandidatesName} bind:value={name} focus/>
|
||||
<TextArea label={recruit.string.CandidatesDescription} bind:value={description}/>
|
||||
<ToggleWithLabel label={recruit.string.MakePrivate} description={recruit.string.MakePrivateDescription}/>
|
||||
</Grid>
|
||||
</Dialog>
|
@ -0,0 +1,58 @@
|
||||
<!--
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { TextArea, EditBox, Dialog, ToggleWithLabel, Tabs, Section, Grid } from '@anticrm/ui'
|
||||
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
import File from './icons/File.svelte'
|
||||
import Recruiting from './icons/Recruiting.svelte'
|
||||
|
||||
import recruit from '../plugin'
|
||||
import core from '@anticrm/core'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let name: string = ''
|
||||
let description: string = ''
|
||||
|
||||
const client = getClient()
|
||||
|
||||
function createVacancy() {
|
||||
client.createDoc(recruit.class.Vacancy, core.space.Model, {
|
||||
name,
|
||||
description,
|
||||
private: false,
|
||||
members: []
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog label={recruit.string.CreateVacancy}
|
||||
okLabel={recruit.string.CreateVacancy}
|
||||
okAction={createVacancy}
|
||||
on:close={() => { dispatch('close') }}>
|
||||
<Tabs/>
|
||||
<Section icon={File} label={'General Information'}>
|
||||
<Grid column={1}>
|
||||
<EditBox label={recruit.string.VacancyName} bind:value={name} placeholder="Software Engineer" focus/>
|
||||
<TextArea label={recruit.string.VacancyDescription} bind:value={description} placeholder="Start typing..."/>
|
||||
<ToggleWithLabel label={recruit.string.MakePrivate} description={recruit.string.MakePrivateDescription}/>
|
||||
</Grid>
|
||||
</Section>
|
||||
<Section icon={Recruiting} label={'Vacancy Members'}>
|
||||
</Section>
|
||||
</Dialog>
|
@ -0,0 +1,97 @@
|
||||
<!--
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import type { Ref, Space, Doc } from '@anticrm/core'
|
||||
import { TextArea, EditBox, Dialog, Tabs, Section, Grid, DialogHeader, IconComments } from '@anticrm/ui'
|
||||
import { AttributeEditor, getClient, CommentViewer } from '@anticrm/presentation'
|
||||
import { ReferenceInput } from '@anticrm/text-editor'
|
||||
import type { Candidate } from '@anticrm/recruit'
|
||||
import type { Backlink } from '@anticrm/chunter'
|
||||
import { Backlink as BacklinkComponent } from '@anticrm/presentation'
|
||||
import File from './icons/File.svelte'
|
||||
import Address from './icons/Address.svelte'
|
||||
import Attachment from './icons/Attachment.svelte'
|
||||
|
||||
import { createQuery } from '@anticrm/presentation'
|
||||
|
||||
import recruit from '../plugin'
|
||||
import chunter from '@anticrm/chunter'
|
||||
import contact from '@anticrm/contact'
|
||||
|
||||
export let object: Candidate
|
||||
|
||||
let newValue = Object.assign({}, object)
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let backlinks: Backlink[]
|
||||
|
||||
const client = getClient()
|
||||
const query = createQuery()
|
||||
$: query.query(chunter.class.Backlink, { objectId: object._id }, result => { backlinks = result })
|
||||
|
||||
function save() {
|
||||
const attributes: Record<string, any> = {}
|
||||
for (const key in object) {
|
||||
if ((newValue as any)[key] !== (object as any)[key]) {
|
||||
attributes[key] = (newValue as any)[key]
|
||||
}
|
||||
}
|
||||
client.updateDoc(recruit.class.Candidate, object.space, object._id, attributes)
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog label={recruit.string.CreateCandidate}
|
||||
okLabel={recruit.string.CreateCandidate}
|
||||
okAction={save}
|
||||
on:close={() => { dispatch('close') }}>
|
||||
<DialogHeader />
|
||||
<Tabs/>
|
||||
<Section icon={File} label={'Personal Information'}>
|
||||
<Grid>
|
||||
<AttributeEditor _class={contact.class.Person} key={'firstName'} {newValue} oldValue={object} focus/>
|
||||
<AttributeEditor _class={contact.class.Person} key={'lastName'} {newValue} oldValue={object}/>
|
||||
<AttributeEditor _class={contact.class.Person} key={'email'} {newValue} oldValue={object}/>
|
||||
<AttributeEditor _class={contact.class.Person} key={'phone'} {newValue} oldValue={object}/>
|
||||
</Grid>
|
||||
</Section>
|
||||
<Section icon={Address} label={'Address'}>
|
||||
<Grid>
|
||||
<EditBox label={'Street'} placeholder={'Broderick st'} />
|
||||
<EditBox label={'City *'} placeholder={'Los Angeles'} bind:value={newValue.city}/>
|
||||
<EditBox label={'ZIP / Postal code'} placeholder={'26892'} />
|
||||
<EditBox label={'Country'} placeholder={'United States'} />
|
||||
</Grid>
|
||||
</Section>
|
||||
<Section icon={IconComments} label={'Comments'}>
|
||||
<CommentViewer />
|
||||
<div class="reference"><ReferenceInput /></div>
|
||||
</Section>
|
||||
{#if backlinks && backlinks.length > 0}
|
||||
<Section icon={Address} label={'Backlinks'}>
|
||||
{#each backlinks as backlink}
|
||||
<BacklinkComponent {backlink} />
|
||||
{/each}
|
||||
</Section>
|
||||
{/if}
|
||||
</Dialog>
|
||||
|
||||
<style lang="scss">
|
||||
.reference {
|
||||
margin-top: 24px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,51 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { IntlString, Asset } from '@anticrm/platform'
|
||||
import type { AnySvelteComponent } from '@anticrm/ui'
|
||||
import { Icon, Label } from '@anticrm/ui'
|
||||
|
||||
export let icon: Asset | AnySvelteComponent
|
||||
export let label: IntlString
|
||||
|
||||
</script>
|
||||
|
||||
<div class="label-container">
|
||||
<div class="icon">
|
||||
{#if typeof (icon) === 'string'}
|
||||
<Icon {icon} size={'large'}/>
|
||||
{:else}
|
||||
<svelte:component this={icon} size={'large'} />
|
||||
{/if}
|
||||
</div>
|
||||
<Label {label} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.label-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: var(--theme-caption-color);
|
||||
|
||||
.icon {
|
||||
margin-right: .5em;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
91
plugins/recruit-resources/src/components/KanbanCard.svelte
Normal file
91
plugins/recruit-resources/src/components/KanbanCard.svelte
Normal file
@ -0,0 +1,91 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { UserInfo } from '@anticrm/presentation'
|
||||
import { ActionIcon } from '@anticrm/ui'
|
||||
import IconWithLabel from './IconWithLabel.svelte'
|
||||
import Tag from './Tag.svelte'
|
||||
import File from './icons/File.svelte'
|
||||
import MoreH from './icons/MoreH.svelte'
|
||||
|
||||
interface ICard {
|
||||
_id: number
|
||||
firstName: string
|
||||
lastName: string
|
||||
description: string
|
||||
state: number
|
||||
}
|
||||
|
||||
export let card: ICard
|
||||
export let draggable: boolean
|
||||
|
||||
</script>
|
||||
|
||||
<div class="card-container" {draggable} class:draggable on:dragstart on:dragend>
|
||||
<div class="header">
|
||||
<UserInfo value={{firstName: card.firstName, lastName: card.lastName }} subtitle={'Candidate'} size={28} />
|
||||
<ActionIcon icon={MoreH} label={'More..'} direction={'left'} />
|
||||
</div>
|
||||
<div class="content">
|
||||
<IconWithLabel icon={File} label={'Team Interview'} />
|
||||
<div class="description">{card.description}</div>
|
||||
<div class="tags">
|
||||
<Tag icon={File} label={'Application'} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.card-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
background-color: var(--theme-button-bg-hovered);
|
||||
border: 1px solid var(--theme-bg-accent-color);
|
||||
border-radius: 12px;
|
||||
user-select: none;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 14px 16px;
|
||||
width: 100%;
|
||||
min-height: 60px;
|
||||
background-color: var(--theme-button-bg-focused);
|
||||
border-radius: 11px 11px 0 0;
|
||||
}
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
padding: 16px;
|
||||
|
||||
.description {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.tags {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
&.draggable {
|
||||
cursor: grab;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,59 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { Label } from '@anticrm/ui'
|
||||
import { IconAdd } from '@anticrm/ui'
|
||||
|
||||
export let label: IntlString
|
||||
</script>
|
||||
|
||||
<div class="card-container">
|
||||
<div class="icon">
|
||||
<IconAdd size={'small'} />
|
||||
</div>
|
||||
<Label {label} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.card-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 12px 24px 10px;
|
||||
font-size: 14px;
|
||||
color: var(--theme-content-dark-color);
|
||||
background-color: var(--theme-button-bg-hovered);
|
||||
border: 1px dotted var(--theme-bg-accent-color);
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
|
||||
.icon {
|
||||
margin-bottom: 4px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--theme-caption-color);
|
||||
.icon {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
80
plugins/recruit-resources/src/components/KanbanPanel.svelte
Normal file
80
plugins/recruit-resources/src/components/KanbanPanel.svelte
Normal file
@ -0,0 +1,80 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { Label, ScrollBox } from '@anticrm/ui'
|
||||
|
||||
export let label: IntlString
|
||||
export let color: string
|
||||
export let counter: number
|
||||
</script>
|
||||
|
||||
<div class="panel-container" on:dragover on:drop>
|
||||
<div class="header" style="background-color: {color}">
|
||||
<div class="title"><Label {label} /></div>
|
||||
<div class="counter">{counter}</div>
|
||||
</div>
|
||||
<div class="scroll">
|
||||
<ScrollBox vertical>
|
||||
<slot />
|
||||
</ScrollBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.panel-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
width: 320px;
|
||||
height: 100%;
|
||||
background-color: var(--theme-button-bg-enabled);
|
||||
border: 1px solid var(--theme-bg-accent-color);
|
||||
border-radius: 12px;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 12px;
|
||||
padding: 8px;
|
||||
min-height: 44px;
|
||||
font-weight: 500;
|
||||
border: 1px solid rgba(0, 0, 0, .1);
|
||||
border-radius: 8px;
|
||||
|
||||
.title {
|
||||
padding-left: 8px;
|
||||
color: var(--theme-caption-color);
|
||||
}
|
||||
.counter {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
color: var(--theme-contnet-accent-color);
|
||||
background-color: rgba(0, 0, 0, .08);
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll {
|
||||
margin: 8px 12px 12px;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,76 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { Label } from '@anticrm/ui'
|
||||
import { IconAdd } from '@anticrm/ui'
|
||||
|
||||
export let label: IntlString
|
||||
</script>
|
||||
|
||||
<div class="panel-container">
|
||||
<div class="circle">
|
||||
<div class="icon">
|
||||
<IconAdd size={'large'} />
|
||||
</div>
|
||||
</div>
|
||||
<Label {label} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.panel-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 320px;
|
||||
height: 100%;
|
||||
padding: 12px;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
color: var(--theme-caption-color);
|
||||
background-color: var(--theme-button-bg-enabled);
|
||||
border: 1px dotted var(--theme-bg-accent-color);
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
|
||||
.circle {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background-color: var(--theme-bg-accent-color);
|
||||
border-radius: 50%;
|
||||
|
||||
.icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
opacity: .6;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--theme-bg-accent-hover);
|
||||
box-shadow: 0px 12px 40px rgba(0, 0, 0, .15);
|
||||
|
||||
.circle .icon {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
80
plugins/recruit-resources/src/components/KanbanView.svelte
Normal file
80
plugins/recruit-resources/src/components/KanbanView.svelte
Normal file
@ -0,0 +1,80 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { ScrollBox } from '@anticrm/ui'
|
||||
import KanbanPanelEmpty from './KanbanPanelEmpty.svelte'
|
||||
import KanbanPanel from './KanbanPanel.svelte'
|
||||
import KanbanCardEmpty from './KanbanCardEmpty.svelte'
|
||||
import KanbanCard from './KanbanCard.svelte'
|
||||
|
||||
interface ICard {
|
||||
_id: number
|
||||
firstName: string
|
||||
lastName: string
|
||||
description: string
|
||||
state: number
|
||||
}
|
||||
|
||||
let dragCard: ICard
|
||||
|
||||
let states: Array<Object> = [
|
||||
{ _id: 0, label: 'In progress', color: '#7C6FCD' },
|
||||
{ _id: 1, label: 'Under review', color: '#6F7BC5' },
|
||||
{ _id: 2, label: 'Interview', color: '#A5D179' },
|
||||
{ _id: 3, label: 'Offer', color: '#77C07B' },
|
||||
{ _id: 4, label: 'Assigned', color: '#F28469' }
|
||||
]
|
||||
const cards: Array<ICard> = [
|
||||
{ _id: 0, firstName: 'Chen', lastName: 'Rosamund', description: '8:30AM, July 12 Voltron, San Francisco', state: 0 },
|
||||
{ _id: 1, firstName: 'Chen', lastName: 'Rosamund', description: '8:30AM, July 12 Voltron, San Francisco', state: 0 },
|
||||
{ _id: 2, firstName: 'Chen', lastName: 'Rosamund', description: '8:30AM, July 12 Voltron, San Francisco', state: 0 },
|
||||
{ _id: 3, firstName: 'Chen', lastName: 'Rosamund', description: '8:30AM, July 12 Voltron, San Francisco', state: 1 },
|
||||
{ _id: 4, firstName: 'Chen', lastName: 'Rosamund', description: '8:30AM, July 12 Voltron, San Francisco', state: 1 },
|
||||
{ _id: 5, firstName: 'Chen', lastName: 'Rosamund', description: '8:30AM, July 12 Voltron, San Francisco', state: 2 },
|
||||
{ _id: 6, firstName: 'Chen', lastName: 'Rosamund', description: '8:30AM, July 12 Voltron, San Francisco', state: 3 },
|
||||
]
|
||||
|
||||
</script>
|
||||
|
||||
<ScrollBox>
|
||||
{#each states as state}
|
||||
<KanbanPanel label={state.label} color={state.color} counter={4}
|
||||
on:dragover={(event) => {
|
||||
event.preventDefault()
|
||||
}}
|
||||
on:drop={(event) => {
|
||||
event.preventDefault()
|
||||
if (dragCard) {
|
||||
dragCard.state = state._id
|
||||
dragCard = undefined
|
||||
}
|
||||
}}
|
||||
>
|
||||
<KanbanCardEmpty label={'Create new application'} />
|
||||
{#each cards.filter((c) => c.state === state._id) as card}
|
||||
<KanbanCard {card} draggable={true}
|
||||
on:dragstart={() => {
|
||||
dragCard = card
|
||||
}}
|
||||
on:dragend={() => {
|
||||
dragCard = undefined
|
||||
}}
|
||||
/>
|
||||
{/each}
|
||||
</KanbanPanel>
|
||||
{/each}
|
||||
<KanbanPanelEmpty label={'Add new column'} />
|
||||
</ScrollBox>
|
47
plugins/recruit-resources/src/components/LabelStatus.svelte
Normal file
47
plugins/recruit-resources/src/components/LabelStatus.svelte
Normal file
@ -0,0 +1,47 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { Label } from '@anticrm/ui'
|
||||
|
||||
enum StatusColors {
|
||||
TURQUOISE = '#79C4CE',
|
||||
PURPLE = '#9D92C4',
|
||||
STINKYBLUE = '#72A6CC',
|
||||
GREEN = '#69B46D',
|
||||
ORANGE = '#C97661'
|
||||
}
|
||||
|
||||
export let label: IntlString
|
||||
export let color: string = StatusColors.TURQUOISE
|
||||
|
||||
</script>
|
||||
|
||||
<div class="label-container" style="background-color: {color}">
|
||||
<Label {label} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.label-container {
|
||||
padding: 4px 8px;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
border: 1px solid var(--theme-bg-accent-hover);
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
54
plugins/recruit-resources/src/components/Tag.svelte
Normal file
54
plugins/recruit-resources/src/components/Tag.svelte
Normal file
@ -0,0 +1,54 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { IntlString, Asset } from '@anticrm/platform'
|
||||
import type { AnySvelteComponent } from '@anticrm/ui'
|
||||
import { Icon, Label } from '@anticrm/ui'
|
||||
|
||||
export let icon: Asset | AnySvelteComponent
|
||||
export let label: IntlString
|
||||
|
||||
</script>
|
||||
|
||||
<div class="tag-container">
|
||||
<div class="icon">
|
||||
{#if typeof (icon) === 'string'}
|
||||
<Icon {icon} size={'small'}/>
|
||||
{:else}
|
||||
<svelte:component this={icon} size={'small'} />
|
||||
{/if}
|
||||
</div>
|
||||
<Label {label} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.tag-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 10px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
background-color: var(--theme-bg-accent-color);
|
||||
color: var(--theme-caption-color);
|
||||
border-radius: 8px;
|
||||
|
||||
.icon {
|
||||
margin-right: .3em;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,27 @@
|
||||
<!--
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { IconSize } from '@anticrm/ui'
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
const fill: string = 'var(--theme-caption-color)'
|
||||
</script>
|
||||
|
||||
<IconSize {size}>
|
||||
<svg {fill} xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.1,8.2c-0.3-0.6-0.8-1-1.6-1.8l-0.8-0.7c-1.6-1.4-2.5-2.1-3.6-2.1c-1.1,0-1.9,0.7-3.6,2.1L5.6,6.5 C4.7,7.2,4.2,7.6,3.9,8.2c-0.3,0.6-0.3,1.2-0.3,2.4v3.5c0,1.7,0,2.6,0.6,3.2C4.9,18,5.8,18,7.5,18h0.4c0,0,0,0,0,0s0,0,0,0h4.2 c0,0,0,0,0,0s0,0,0,0h0.4c1.7,0,2.6,0,3.2-0.6c0.6-0.6,0.6-1.5,0.6-3.2v-3.5C16.3,9.5,16.3,8.8,16.1,8.2z M11.6,17H8.4v-3.5 c0-0.3,0.2-0.5,0.5-0.5h2.2c0.3,0,0.5,0.2,0.5,0.5V17z M15.3,14.2c0,1.5,0,2.2-0.3,2.5C14.7,17,14,17,12.6,17v-3.5 c0-0.8-0.7-1.5-1.5-1.5H8.9c-0.8,0-1.5,0.7-1.5,1.5V17C6,17,5.3,17,5,16.7c-0.3-0.3-0.3-1-0.3-2.5v-3.5c0-1.1,0-1.6,0.2-2 s0.6-0.7,1.4-1.4l0.8-0.7C8.5,5.3,9.3,4.6,10,4.6s1.5,0.6,2.9,1.9l0.8,0.7c0.8,0.7,1.2,1,1.4,1.4s0.2,0.9,0.2,2V14.2z"/>
|
||||
</svg>
|
||||
</IconSize>
|
@ -0,0 +1,27 @@
|
||||
<!--
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { IconSize } from '@anticrm/ui'
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
const fill: string = 'var(--theme-caption-color)'
|
||||
</script>
|
||||
|
||||
<IconSize {size}>
|
||||
<svg {fill} xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.8,10.5l5.7-5.7c1.2-1.2,3.1-1.2,4.2,0s1.2,3.1,0,4.2L8,15.8c-0.6,0.6-1.5,0.6-2.1,0c-0.6-0.6-0.6-1.5,0-2.1l6-6 c0.2-0.2,0.2-0.5,0-0.7c-0.2-0.2-0.5-0.2-0.7,0l-6,6c-1,1-1,2.6,0,3.5c1,1,2.6,1,3.5,0l6.7-6.7c1.6-1.6,1.6-4.1,0-5.7 s-4.1-1.6-5.7,0L4.1,9.8c-0.2,0.2-0.2,0.5,0,0.7C4.3,10.7,4.6,10.7,4.8,10.5z"/>
|
||||
</svg>
|
||||
</IconSize>
|
27
plugins/recruit-resources/src/components/icons/File.svelte
Normal file
27
plugins/recruit-resources/src/components/icons/File.svelte
Normal file
@ -0,0 +1,27 @@
|
||||
<!--
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { IconSize } from '@anticrm/ui'
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
const fill: string = 'var(--theme-caption-color)'
|
||||
</script>
|
||||
|
||||
<IconSize {size}>
|
||||
<svg {fill} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
||||
<path d="M15.7,2.6C15.1,2,14.2,2,12.5,2H9.9C9.5,2,9.2,2,9,2.1S8.6,2.4,8.3,2.6l-4,4C4,6.9,3.9,7.1,3.8,7.3C3.7,7.6,3.7,7.8,3.7,8.2 v6c0,1.7,0,2.6,0.6,3.2S5.8,18,7.5,18h5c1.7,0,2.6,0,3.2-0.6s0.6-1.5,0.6-3.2V5.8C16.3,4.2,16.3,3.3,15.7,2.6z M5,7.4l4-4 C9.2,3.2,9.3,3.1,9.4,3c0,0,0.1,0,0.1,0v3.4c0,0.7,0,1.2-0.1,1.3C9.2,7.8,8.8,7.8,8.1,7.8H4.7c0,0,0-0.1,0-0.1 C4.7,7.7,4.8,7.5,5,7.4z M15.3,14.2c0,1.5,0,2.2-0.3,2.5S14,17,12.5,17h-5C6,17,5.3,17,5,16.7s-0.3-1-0.3-2.5V8.8h3.4 c1,0,1.6,0,2-0.4c0.4-0.4,0.4-1,0.4-2V3h2C14,3,14.7,3,15,3.3s0.3,1,0.3,2.5V14.2z"/>
|
||||
</svg>
|
||||
</IconSize>
|
27
plugins/recruit-resources/src/components/icons/Mail.svelte
Normal file
27
plugins/recruit-resources/src/components/icons/Mail.svelte
Normal file
@ -0,0 +1,27 @@
|
||||
<!--
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { IconSize } from '@anticrm/ui'
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
const fill: string = 'var(--theme-caption-color)'
|
||||
</script>
|
||||
|
||||
<IconSize {size}>
|
||||
<svg {fill} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<path d="M12.9,2.7H3.1c-1,0-1.7,0.8-1.7,1.7v7.5c0,1,0.8,1.7,1.7,1.7h9.9c1,0,1.7-0.8,1.7-1.7V4.4C14.7,3.5,13.9,2.7,12.9,2.7z M12.9,3.7c0.1,0,0.2,0,0.3,0.1L8,7.9L2.8,3.8c0.1,0,0.2-0.1,0.3-0.1H12.9z M12.9,12.6H3.1c-0.4,0-0.7-0.3-0.7-0.7V4.7L7.7,9 C7.8,9,7.9,9.1,8,9.1S8.2,9,8.3,9l5.4-4.3v7.2C13.7,12.3,13.3,12.6,12.9,12.6z"/>
|
||||
</svg>
|
||||
</IconSize>
|
13
plugins/recruit-resources/src/components/icons/MoreH.svelte
Normal file
13
plugins/recruit-resources/src/components/icons/MoreH.svelte
Normal file
@ -0,0 +1,13 @@
|
||||
<script lang="ts">
|
||||
import { IconSize } from '@anticrm/ui'
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
const fill: string = 'var(--theme-caption-color)'
|
||||
</script>
|
||||
|
||||
<IconSize {size}>
|
||||
<svg {fill} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.8,10.3c-1,0-1.8,0.8-1.8,1.7s0.8,1.7,1.8,1.7c1,0,1.8-0.8,1.8-1.7S12.7,10.3,11.8,10.3z" />
|
||||
<path d="M18,10.3c-1,0-1.8,0.8-1.8,1.7s0.8,1.7,1.8,1.7c1,0,1.8-0.8,1.8-1.7S18.9,10.3,18,10.3z" />
|
||||
<path d="M5.5,10.3c-1,0-1.8,0.8-1.8,1.7s0.8,1.7,1.8,1.7c1,0,1.8-0.8,1.8-1.7S6.5,10.3,5.5,10.3z" />
|
||||
</svg>
|
||||
</IconSize>
|
@ -0,0 +1,32 @@
|
||||
<!--
|
||||
// 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.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { IconSize } from '@anticrm/ui'
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
const fill: string = 'var(--theme-caption-color)'
|
||||
</script>
|
||||
|
||||
<IconSize {size}>
|
||||
<svg {fill} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<g>
|
||||
<path d="M9.6,14.4c-1.8,0-7.4,0-7.4,3.4c0,3,4.2,3.4,7.4,3.4c1.8,0,7.4,0,7.4-3.4C17.1,14.7,12.8,14.4,9.6,14.4z M9.6,20c-4.1,0-6.2-0.7-6.2-2.2c0-1.5,2.1-2.2,6.2-2.2s6.2,0.7,6.2,2.2C15.9,19.2,13.8,20,9.6,20z"/>
|
||||
<path d="M9.6,12.4C9.6,12.4,9.7,12.4,9.6,12.4c1.4,0,2.6-0.5,3.5-1.5c0.9-0.9,1.4-2.2,1.4-3.5c0-2.7-2.2-5-5-5 c-2.7,0-5,2.2-5,5C4.7,10.1,6.9,12.4,9.6,12.4z M9.6,3.6c2.1,0,3.8,1.7,3.8,3.8c0,1-0.4,2-1.1,2.7c-0.7,0.7-1.7,1.1-2.7,1.1h0 c-2.1,0-3.8-1.7-3.8-3.8C5.9,5.3,7.6,3.6,9.6,3.6z"/>
|
||||
<path d="M16.5,10c-0.3,0-0.6,0.3-0.5,0.7c0,0.3,0.3,0.5,0.6,0.5c0,0,0.1,0,0.1,0C18.5,11,20,9.3,20,7.4 c0-1.9-1.4-3.5-3.3-3.8C16.4,3.5,16.1,3.7,16,4c-0.1,0.3,0.2,0.6,0.5,0.7c1.3,0.2,2.3,1.3,2.3,2.7C18.8,8.7,17.8,9.9,16.5,10z"/>
|
||||
<path d="M18.7,13.9c-0.3,0-0.6,0.2-0.7,0.5s0.2,0.6,0.5,0.7c2.1,0.3,2.1,1.1,2.1,1.3c0,0.3-0.1,0.7-0.9,1 c-0.3,0.1-0.5,0.5-0.3,0.8c0.1,0.2,0.3,0.4,0.6,0.4c0.1,0,0.1,0,0.2,0c1.4-0.5,1.7-1.5,1.7-2.1C21.9,15,20.8,14.2,18.7,13.9z"/>
|
||||
</g>
|
||||
</svg>
|
||||
</IconSize>
|
30
plugins/recruit-resources/src/index.ts
Normal file
30
plugins/recruit-resources/src/index.ts
Normal file
@ -0,0 +1,30 @@
|
||||
//
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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 CreateVacancy from './components/CreateVacancy.svelte'
|
||||
import CreateCandidates from './components/CreateCandidates.svelte'
|
||||
import CreateCandidate from './components/CreateCandidate.svelte'
|
||||
import CreateApplication from './components/CreateApplication.svelte'
|
||||
import EditCandidate from './components/EditCandidate.svelte'
|
||||
|
||||
export default async () => ({
|
||||
component: {
|
||||
CreateVacancy,
|
||||
CreateCandidates,
|
||||
CreateCandidate,
|
||||
CreateApplication,
|
||||
EditCandidate
|
||||
},
|
||||
})
|
43
plugins/recruit-resources/src/plugin.ts
Normal file
43
plugins/recruit-resources/src/plugin.ts
Normal file
@ -0,0 +1,43 @@
|
||||
//
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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 { mergeIds } from '@anticrm/platform'
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import type { Ref, Class } from '@anticrm/core'
|
||||
import type { Applicant, Candidate, Candidates, Vacancy } from '@anticrm/recruit'
|
||||
import recruit, { recruitId } from '@anticrm/recruit'
|
||||
|
||||
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>>,
|
||||
},
|
||||
string: {
|
||||
CreateVacancy: '' as IntlString,
|
||||
VacancyName: '' as IntlString,
|
||||
VacancyDescription: '' as IntlString,
|
||||
MakePrivate: '' as IntlString,
|
||||
MakePrivateDescription: '' as IntlString,
|
||||
CreateCandidates: '' as IntlString,
|
||||
CandidatesName: '' as IntlString,
|
||||
CandidatesDescription: '' as IntlString,
|
||||
CreateCandidate: '' as IntlString,
|
||||
|
||||
FirstName: '' as IntlString,
|
||||
LastName: '' as IntlString,
|
||||
}
|
||||
})
|
5
plugins/recruit-resources/svelte.config.js
Normal file
5
plugins/recruit-resources/svelte.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
const sveltePreprocess = require('svelte-preprocess')
|
||||
|
||||
module.exports = {
|
||||
preprocess: sveltePreprocess()
|
||||
};
|
15
plugins/recruit-resources/tsconfig.json
Normal file
15
plugins/recruit-resources/tsconfig.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"declaration": true,
|
||||
"outDir": "./lib",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom"
|
||||
]
|
||||
}
|
||||
}
|
6
plugins/recruit/.eslintrc.js
Normal file
6
plugins/recruit/.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
plugins/recruit/.npmignore
Normal file
4
plugins/recruit/.npmignore
Normal file
@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
18
plugins/recruit/config/rig.json
Normal file
18
plugins/recruit/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"
|
||||
}
|
25
plugins/recruit/package.json
Normal file
25
plugins/recruit/package.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@anticrm/recruit",
|
||||
"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/platform":"~0.6.3",
|
||||
"@anticrm/core":"~0.6.0",
|
||||
"@anticrm/contact":"~0.6.0"
|
||||
}
|
||||
}
|
53
plugins/recruit/src/index.ts
Normal file
53
plugins/recruit/src/index.ts
Normal file
@ -0,0 +1,53 @@
|
||||
//
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// 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 { plugin } from '@anticrm/platform'
|
||||
import type { Plugin, Asset } from '@anticrm/platform'
|
||||
import type { Space, Doc, Ref } from '@anticrm/core'
|
||||
import type { Person } from '@anticrm/contact'
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface Vacancy extends Space {}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface Candidates extends Space {}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface Candidate extends Person {}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface Applicant extends Doc {
|
||||
candidate: Ref<Candidate>
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const recruitId = 'recruit' as Plugin
|
||||
|
||||
export default plugin(recruitId, {
|
||||
icon: {
|
||||
RecruitApplication: '' as Asset,
|
||||
Vacancy: '' as Asset
|
||||
}
|
||||
})
|
9
plugins/recruit/tsconfig.json
Normal file
9
plugins/recruit/tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"lib": ["esnext", "dom"]
|
||||
}
|
||||
}
|
25
rush.json
25
rush.json
@ -656,5 +656,30 @@
|
||||
"projectFolder": "models/chunter",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@anticrm/recruit",
|
||||
"projectFolder": "plugins/recruit",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@anticrm/recruit-assets",
|
||||
"projectFolder": "plugins/recruit-assets",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@anticrm/recruit-resources",
|
||||
"projectFolder": "plugins/recruit-resources",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@anticrm/model-recruit",
|
||||
"projectFolder": "models/recruit",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@anticrm/model-demo",
|
||||
"projectFolder": "models/demo",
|
||||
"shouldPublish": true
|
||||
},
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user