Skip to content

Commit

Permalink
Merge pull request #7740 from ever-co/feat/job-proposal-template-plugin
Browse files Browse the repository at this point in the history
[Feat] Employee Job Proposal Template Plugin
  • Loading branch information
rahul-rocket authored Apr 11, 2024
2 parents 5d66368 + 2539558 commit 0dd364c
Show file tree
Hide file tree
Showing 41 changed files with 256 additions and 134 deletions.
2 changes: 2 additions & 0 deletions .deploy/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ COPY --chown=node:node packages/plugins/product-reviews/package.json ./packages/
COPY --chown=node:node packages/plugins/knowledge-base/package.json ./packages/plugins/knowledge-base/
COPY --chown=node:node packages/plugins/changelog/package.json ./packages/plugins/changelog/
COPY --chown=node:node packages/plugins/job-search/package.json ./packages/plugins/job-search/
COPY --chown=node:node packages/plugins/job-proposal-template/package.json ./packages/plugins/job-proposal-template/

# We do not build here Wakatime plugin, because it used in Desktop Apps for now
# COPY --chown=node:node packages/plugins/integration-wakatime/package.json ./packages/plugins/integration-wakatime/
Expand Down Expand Up @@ -217,6 +218,7 @@ COPY --chown=node:node packages/plugins/product-reviews/package.json ./packages/
COPY --chown=node:node packages/plugins/knowledge-base/package.json ./packages/plugins/knowledge-base/
COPY --chown=node:node packages/plugins/changelog/package.json ./packages/plugins/changelog/
COPY --chown=node:node packages/plugins/job-search/package.json ./packages/plugins/job-search/
COPY --chown=node:node packages/plugins/job-proposal-template/package.json ./packages/plugins/job-proposal-template/

# We do not build here Wakatime plugin, because it used in Desktop Apps for now
# COPY --chown=node:node packages/plugins/integration-wakatime/package.json ./packages/plugins/integration-wakatime/
Expand Down
1 change: 1 addition & 0 deletions .deploy/webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ COPY --chown=node:node packages/plugins/job-search/package.json ./packages/plugi
COPY --chown=node:node packages/plugins/product-reviews/package.json ./packages/plugins/product-reviews/
COPY --chown=node:node packages/plugins/knowledge-base/package.json ./packages/plugins/knowledge-base/
COPY --chown=node:node packages/plugins/changelog/package.json ./packages/plugins/changelog/
COPY --chown=node:node packages/plugins/job-proposal-template/package.json ./packages/plugins/job-proposal-template/

# We do not build here Wakatime plugin, because it used in Desktop Apps for now
# COPY --chown=node:node packages/plugins/integration-wakatime/package.json ./packages/plugins/integration-wakatime/
Expand Down
7 changes: 4 additions & 3 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@
"seed:prod:build": "yarn ng run api:seed -c=production"
},
"dependencies": {
"@gauzy/core": "^0.1.0",
"@gauzy/changelog-plugin": "^0.1.0",
"@gauzy/knowledge-base-plugin": "^0.1.0",
"@gauzy/core": "^0.1.0",
"@gauzy/jitsu-analytics-plugin": "^0.1.0",
"@gauzy/sentry-plugin": "^0.1.0",
"@gauzy/job-proposal-template-plugin": "^0.1.0",
"@gauzy/job-search-plugin": "^0.1.0",
"@gauzy/knowledge-base-plugin": "^0.1.0",
"@gauzy/sentry-plugin": "^0.1.0",
"dotenv": "^16.0.3",
"yargs": "^17.5.0"
},
Expand Down
19 changes: 11 additions & 8 deletions apps/api/src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ChangelogPlugin } from '@gauzy/changelog-plugin';
import { JitsuAnalyticsPlugin } from '@gauzy/jitsu-analytics-plugin';
import { KnowledgeBasePlugin } from '@gauzy/knowledge-base-plugin';
import { JobSearchPlugin } from '@gauzy/job-search-plugin';
import { JobProposalTemplatePlugin } from '@gauzy/job-proposal-template-plugin';
import { SentryTracing as SentryPlugin } from './sentry';

const { jitsu, sentry } = environment;
Expand All @@ -11,12 +12,8 @@ const { jitsu, sentry } = environment;
* An array of plugins to be included or used in the codebase.
*/
export const plugins = [
// Indicates the inclusion or intention to use the JobSearchPlugin in the codebase.
JobSearchPlugin,
// Indicates the inclusion or intention to use the ChangelogPlugin in the codebase.
ChangelogPlugin,
// Indicates the inclusion or intention to use the KnowledgeBasePlugin in the codebase.
KnowledgeBasePlugin,
// Includes the SentryPlugin based on the presence of Sentry configuration.
...(sentry && sentry.dsn ? [SentryPlugin] : []),
// Initializes the Jitsu Analytics Plugin by providing a configuration object.
JitsuAnalyticsPlugin.init({
config: {
Expand All @@ -26,6 +23,12 @@ export const plugins = [
echoEvents: jitsu.echoEvents
}
}),
// Includes the SentryPlugin based on the presence of Sentry configuration.
...(sentry && sentry.dsn ? [SentryPlugin] : []),
// Indicates the inclusion or intention to use the ChangelogPlugin in the codebase.
ChangelogPlugin,
// Indicates the inclusion or intention to use the KnowledgeBasePlugin in the codebase.
KnowledgeBasePlugin,
// Indicates the inclusion or intention to use the JobSearchPlugin in the codebase.
JobSearchPlugin,
// Indicates the inclusion or intention to use the JobProposalTemplatePlugin in the codebase.
JobProposalTemplatePlugin
];
14 changes: 8 additions & 6 deletions apps/desktop/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"../../../packages/plugins/changelog",
"../../../packages/plugins/jitsu-analytics",
"../../../packages/plugins/sentry-tracing",
"../../../packages/plugins/job-search"
"../../../packages/plugins/job-search",
"../../../packages/plugins/job-proposal-template"
]
},
"build": {
Expand Down Expand Up @@ -144,8 +145,9 @@
"@gauzy/desktop-libs": "^0.1.0",
"@gauzy/desktop-window": "^0.1.0",
"@gauzy/jitsu-analytics-plugin": "^0.1.0",
"@gauzy/knowledge-base-plugin": "^0.1.0",
"@gauzy/job-proposal-template-plugin": "^0.1.0",
"@gauzy/job-search-plugin": "^0.1.0",
"@gauzy/knowledge-base-plugin": "^0.1.0",
"@gauzy/sentry-plugin": "^0.1.0",
"@nestjs/platform-express": "^10.3.7",
"@sentry/electron": "^4.18.0",
Expand All @@ -160,28 +162,28 @@
"electron-store": "^8.1.0",
"electron-updater": "^6.1.7",
"electron-util": "^0.17.2",
"embedded-queue": "^0.0.11",
"ffi-napi": "^4.0.3",
"form-data": "^3.0.0",
"htmlparser2": "^8.0.2",
"iconv": "^3.0.1",
"knex": "^3.1.0",
"locutus": "^2.0.30",
"mac-screen-capture-permissions": "^2.1.0",
"moment": "^2.29.4",
"node-fetch": "^2.6.7",
"node-notifier": "^8.0.0",
"node-static": "^0.7.11",
"pdfmake": "^0.2.0",
"pg-query-stream": "^4.5.4",
"pg": "^8.11.4",
"screenshot-desktop": "^1.15.0",
"sound-play": "1.1.0",
"sqlite3": "^5.1.7",
"squirrelly": "^8.0.8",
"tslib": "^2.3.0",
"twing": "^5.0.2",
"locutus": "^2.0.30",
"underscore": "^1.13.3",
"screenshot-desktop": "^1.15.0",
"mac-screen-capture-permissions": "^2.1.0",
"embedded-queue": "^0.0.11",
"undici": "^6.10.2"
},
"optionalDependencies": {
Expand Down
10 changes: 6 additions & 4 deletions apps/server/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"../../../packages/plugins/changelog",
"../../../packages/plugins/jitsu-analytics",
"../../../packages/plugins/sentry-tracing",
"../../../packages/plugins/job-search"
"../../../packages/plugins/job-search",
"../../../packages/plugins/job-proposal-template"
]
},
"build": {
Expand Down Expand Up @@ -142,8 +143,9 @@
"@gauzy/desktop-libs": "^0.1.0",
"@gauzy/desktop-window": "^0.1.0",
"@gauzy/jitsu-analytics-plugin": "^0.1.0",
"@gauzy/knowledge-base-plugin": "^0.1.0",
"@gauzy/job-proposal-template-plugin": "^0.1.0",
"@gauzy/job-search-plugin": "^0.1.0",
"@gauzy/knowledge-base-plugin": "^0.1.0",
"@gauzy/sentry-plugin": "^0.1.0",
"@nestjs/platform-express": "^10.3.7",
"@sentry/electron": "^4.18.0",
Expand All @@ -163,6 +165,7 @@
"htmlparser2": "^8.0.2",
"iconv": "^3.0.1",
"knex": "^3.1.0",
"locutus": "^2.0.30",
"moment": "^2.29.4",
"node-fetch": "^2.6.7",
"node-notifier": "^8.0.0",
Expand All @@ -175,7 +178,6 @@
"squirrelly": "^8.0.8",
"tslib": "^2.3.0",
"twing": "^5.0.2",
"locutus": "^2.0.30",
"underscore": "^1.13.3",
"undici": "^6.10.2"
},
Expand All @@ -196,4 +198,4 @@
"node16-win-x64"
]
}
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"build:package:plugin:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugin build",
"build:package:plugins:pre": "yarn run build:package:plugin:integration-ai && yarn run build:package:plugin:integration-hubstaff && yarn run build:package:plugin:integration-upwork && yarn run build:package:plugin:integration-github && yarn run build:package:plugin:integration-jira",
"build:package:plugins:pre:prod": "yarn run build:package:plugin:integration-ai:prod && yarn run build:package:plugin:integration-hubstaff:prod && yarn run build:package:plugin:integration-upwork:prod && yarn run build:package:plugin:integration-github:prod && yarn run build:package:plugin:integration-jira:prod",
"build:package:plugins:post": "yarn run build:package:plugin:sentry && yarn run build:package:plugin:jitsu-analytic && yarn run build:package:plugin:product-reviews && yarn run build:package:plugin:job-search && yarn run build:package:plugin:knowledge-base && yarn run build:package:plugin:changelog",
"build:package:plugins:post": "yarn run build:package:plugin:sentry && yarn run build:package:plugin:jitsu-analytic && yarn run build:package:plugin:product-reviews && yarn run build:package:plugin:job-search && yarn run build:package:plugin:job-proposal-template && yarn run build:package:plugin:knowledge-base && yarn run build:package:plugin:changelog",
"build:package:plugins:post:prod": "yarn run build:package:plugin:sentry:prod && yarn run build:package:plugin:jitsu-analytic:prod && yarn run build:package:plugin:product-reviews:prod && yarn run build:package:plugin:job-search:prod && yarn run build:package:plugin:knowledge-base:prod && yarn run build:package:plugin:changelog:prod",
"build:package:plugin:integration-ai": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/integration-ai build",
"build:package:plugin:integration-ai:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/integration-ai build",
Expand All @@ -153,6 +153,8 @@
"build:package:plugin:product-reviews:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/product-reviews build",
"build:package:plugin:job-search": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-search build",
"build:package:plugin:job-search:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-search build",
"build:package:plugin:job-proposal-template": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-proposal-template build",
"build:package:plugin:job-proposal-template:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-proposal-template build",
"build:package:plugin:knowledge-base": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/knowledge-base build",
"build:package:plugin:knowledge-base:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/knowledge-base build",
"build:package:plugin:changelog": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/changelog build",
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ import { GoalKpiTemplateModule } from './goal-kpi-template/goal-kpi-template.mod
import { TenantSettingModule } from './tenant/tenant-setting/tenant-setting.module';
import { EmployeeJobPresetModule } from './employee-job-preset/employee-job-preset.module';
import { ReportModule } from './reports/report.module';
import { EmployeeProposalTemplateModule } from './employee-proposal-template/employee-proposal-template.module';
import { CustomSmtpModule } from './custom-smtp/custom-smtp.module';
import { FeatureModule } from './feature/feature.module';
import { ImageAssetModule } from './image-asset/image-asset.module';
Expand Down Expand Up @@ -363,7 +362,6 @@ if (environment.THROTTLE_ENABLED) {
ImportModule,
EmployeeSettingModule,
EmployeeJobPresetModule,
EmployeeProposalTemplateModule,
EmployeeStatisticsModule,
EmployeeAppointmentModule,
AppointmentEmployeesModule,
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/core/dto/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { TenantBaseDTO } from './tenant-base.dto';
export { TenantOrganizationBaseDTO } from './tenant-organization-base.dto';
export { TranslatableBaseDTO } from './translate-base-dto';
export * from './tenant-base.dto';
export * from './tenant-organization-base.dto';
export * from './translate-base-dto';
2 changes: 0 additions & 2 deletions packages/core/src/core/entities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
EmployeeAward,
EmployeeLevel,
EmployeePhone,
EmployeeProposalTemplate,
EmployeeRecurringExpense,
EmployeeSetting,
EmployeeUpworkJobsSearchCriterion,
Expand Down Expand Up @@ -174,7 +173,6 @@ export const coreEntities = [
EmployeeAward,
EmployeeLevel,
EmployeePhone,
EmployeeProposalTemplate,
EmployeeRecurringExpense,
EmployeeSetting,
EmployeeUpworkJobsSearchCriterion,
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/core/entities/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export * from '../../employee-job-preset/job-search-category/job-search-category
export * from '../../employee-job-preset/job-search-occupation/job-search-occupation.entity';
export * from '../../employee-level/employee-level.entity';
export * from '../../employee-phone/employee-phone.entity';
export * from '../../employee-proposal-template/employee-proposal-template.entity';
export * from '../../employee-recurring-expense/employee-recurring-expense.entity';
export * from '../../employee-setting/employee-setting.entity';
export * from '../../employee/employee.entity';
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export * from './repository';
export * from './entities/internal';
export * from './entities/subscribers';
export * from './decorators';
export * from './dto';
export * from './orm-type';
export * from './plugin-common.module';

This file was deleted.

2 changes: 1 addition & 1 deletion packages/core/src/employee/dto/employee-feature.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IEmployee, IRelationalEmployee } from "@gauzy/contracts";
import { ApiPropertyOptional } from "@nestjs/swagger";
import { IsObject, IsString, ValidateIf } from "class-validator";
import { IEmployee, IRelationalEmployee } from "@gauzy/contracts";
import { Employee } from "./../employee.entity";
import { IsEmployeeBelongsToOrganization } from "./../../shared/validators";

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/employee/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from './employee.entity';
export * from './employee.module';
export * from './employee.service';
export * from './employee.seed';
export * from './dto/employee-feature.dto';
11 changes: 0 additions & 11 deletions packages/core/src/export-import/export/export.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import {
EmployeeAppointment,
EmployeeAward,
EmployeeLevel,
EmployeeProposalTemplate,
EmployeeRecurringExpense,
EmployeeSetting,
EmployeeUpworkJobsSearchCriterion,
Expand Down Expand Up @@ -203,8 +202,6 @@ import { TypeOrmJobPresetRepository } from '../../employee-job-preset/repository
import { TypeOrmEmployeeUpworkJobsSearchCriterionRepository } from '../../employee-job-preset/repository/typeorm-orm-employee-upwork-jobs-search-criterion.entity.repository';
import { MikroOrmEmployeeLevelRepository } from '../../employee-level/repository/mikro-orm-employee-level.repository';
import { TypeOrmEmployeeLevelRepository } from '../../employee-level/repository/type-orm-employee-level.repository';
import { MikroOrmEmployeeProposalTemplateRepository } from '../../employee-proposal-template/repository/mikro-orm-employee-proposal-template.repository';
import { TypeOrmEmployeeProposalTemplateRepository } from '../../employee-proposal-template/repository/type-orm-employee-proposal-template.repository';
import { MikroOrmEmployeeRecurringExpenseRepository } from '../../employee-recurring-expense/repository/mikro-orm-employee-recurring-expense.repository';
import { TypeOrmEmployeeRecurringExpenseRepository } from '../../employee-recurring-expense/repository/type-orm-employee-recurring-expense.repository';
import { MikroOrmEmployeeSettingRepository } from '../../employee-setting/repository/mikro-orm-employee-setting.repository';
Expand Down Expand Up @@ -550,11 +547,6 @@ export class ExportService implements OnModuleInit {

mikroOrmEmployeeAwardRepository: MikroOrmEmployeeAwardRepository,

@InjectRepository(EmployeeProposalTemplate)
private typeOrmEmployeeProposalTemplateRepository: TypeOrmEmployeeProposalTemplateRepository,

mikroOrmEmployeeProposalTemplateRepository: MikroOrmEmployeeProposalTemplateRepository,

@InjectRepository(EmployeeRecurringExpense)
private typeOrmEmployeeRecurringExpenseRepository: TypeOrmEmployeeRecurringExpenseRepository,

Expand Down Expand Up @@ -1506,9 +1498,6 @@ export class ExportService implements OnModuleInit {
{ joinTableName: 'tag_organization_employee_level' }
]
},
{
repository: this.typeOrmEmployeeProposalTemplateRepository
},
{
repository: this.typeOrmEmployeeRecurringExpenseRepository
},
Expand Down
Loading

0 comments on commit 0dd364c

Please sign in to comment.