Skip to content

Commit

Permalink
feat: add default issue provider configs to default project
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Jan 4, 2019
1 parent 91979d0 commit 2b7d626
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/app/issue/issue.const.ts
@@ -1,7 +1,7 @@
import { ConfigFormConfig } from '../core/config/config.model';
import { JIRA_ADVANCED_FORM_CFG, JIRA_CREDENTIALS_FORM_CFG } from './jira/jira.const';
import { DEFAULT_JIRA_CFG, JIRA_ADVANCED_FORM_CFG, JIRA_CREDENTIALS_FORM_CFG } from './jira/jira.const';
import { IssueProviderKey } from './issue';
import { GIT_CONFIG_FORM } from './git/git.const';
import { DEFAULT_GIT_CFG, GIT_CONFIG_FORM } from './git/git.const';

export const GIT_TYPE: IssueProviderKey = 'GIT';
export const JIRA_TYPE: IssueProviderKey = 'JIRA';
Expand All @@ -13,6 +13,10 @@ export const issueProviderIconMap = {
[GIT_TYPE]: 'github'
};

export const DEFAULT_ISSUE_PROVIDER_CFGS = {
[JIRA_TYPE]: DEFAULT_JIRA_CFG,
[GIT_TYPE]: DEFAULT_GIT_CFG,
};

export const ISSUE_PROVIDER_FORM_CFGS: ConfigFormConfig = [
// GIT
Expand Down
3 changes: 2 additions & 1 deletion src/app/project/project.const.ts
@@ -1,4 +1,5 @@
import { GoogleTimeSheetExport, Project, SimpleSummarySettings } from './project.model';
import { DEFAULT_ISSUE_PROVIDER_CFGS } from '../issue/issue.const';

export const SIMPLE_SUMMARY_DEFAULTS: SimpleSummarySettings = {
separateBy: '',
Expand Down Expand Up @@ -40,7 +41,7 @@ export const DEFAULT_PROJECT: Project = {
isDarkTheme: false,
startedTimeToday: null,
timeWorkedWithoutBreak: null,
issueIntegrationCfgs: {},
issueIntegrationCfgs: DEFAULT_ISSUE_PROVIDER_CFGS,
advancedCfg: {
googleTimeSheetExport: GOOGLE_TIME_SHEET_EXPORT_DEFAULTS,
simpleSummarySettings: SIMPLE_SUMMARY_DEFAULTS
Expand Down

0 comments on commit 2b7d626

Please sign in to comment.