@things-factory/sales 10.1.304 → 10.1.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/entity360/opportunity-360.js +4 -3
- package/dist-client/list-filters.d.ts +3 -2
- package/dist-client/list-filters.js +4 -3
- package/dist-client/opportunity-words.d.ts +2 -0
- package/dist-client/opportunity-words.js +11 -1
- package/dist-client/pages/opportunity-editor.d.ts +12 -5
- package/dist-client/pages/opportunity-editor.js +60 -23
- package/dist-client/pages/opportunity-list.js +2 -2
- package/dist-client/pages/quotation-list.d.ts +1 -0
- package/dist-client/pages/quotation-list.js +14 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-server/service/index.d.ts +2 -2
- package/dist-server/service/opportunity/index.d.ts +1 -1
- package/dist-server/service/opportunity/opportunity-event.js +2 -2
- package/dist-server/service/opportunity/opportunity-mutation.d.ts +3 -0
- package/dist-server/service/opportunity/opportunity-mutation.js +47 -1
- package/dist-server/service/opportunity/opportunity-query.js +1 -1
- package/dist-server/service/opportunity/opportunity-rules.d.ts +14 -7
- package/dist-server/service/opportunity/opportunity-rules.js +25 -11
- package/dist-server/service/opportunity/opportunity-service.d.ts +22 -5
- package/dist-server/service/opportunity/opportunity-service.js +60 -14
- package/dist-server/service/opportunity/opportunity-type.d.ts +1 -1
- package/dist-server/service/opportunity/opportunity-type.js +3 -3
- package/dist-server/service/opportunity/opportunity.d.ts +3 -2
- package/dist-server/service/opportunity/opportunity.js +10 -5
- package/dist-server/service/quotation/index.d.ts +2 -2
- package/dist-server/service/sales-read.js +3 -2
- package/package.json +2 -2
- package/translations/en.json +20 -5
- package/translations/es.json +20 -5
- package/translations/ja.json +20 -5
- package/translations/ko.json +20 -5
- package/translations/ms.json +20 -5
- package/translations/zh.json +20 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validMonth = exports.validProbability = exports.isOpen = exports.STAGE_PROBABILITY = exports.OPEN_STAGES = exports.OpportunityStage = void 0;
|
|
3
|
+
exports.validMonth = exports.validProbability = exports.HOLD_DAYS_MAX = exports.isClosed = exports.isOpen = exports.STAGE_PROBABILITY = exports.CLOSED_STAGES = exports.OPEN_STAGES = exports.OpportunityStage = void 0;
|
|
4
4
|
exports.stageMove = stageMove;
|
|
5
5
|
exports.probabilityAfter = probabilityAfter;
|
|
6
6
|
const type_graphql_1 = require("type-graphql");
|
|
@@ -10,19 +10,23 @@ var OpportunityStage;
|
|
|
10
10
|
OpportunityStage["PROPOSAL"] = "PROPOSAL";
|
|
11
11
|
OpportunityStage["QUOTED"] = "QUOTED";
|
|
12
12
|
OpportunityStage["NEGOTIATION"] = "NEGOTIATION";
|
|
13
|
+
OpportunityStage["ON_HOLD"] = "ON_HOLD";
|
|
13
14
|
OpportunityStage["WON"] = "WON";
|
|
14
15
|
OpportunityStage["LOST"] = "LOST";
|
|
16
|
+
OpportunityStage["CANCELLED"] = "CANCELLED";
|
|
15
17
|
})(OpportunityStage || (exports.OpportunityStage = OpportunityStage = {}));
|
|
16
18
|
(0, type_graphql_1.registerEnumType)(OpportunityStage, {
|
|
17
19
|
name: 'OpportunityStage',
|
|
18
|
-
description: 'where a sales opportunity stands — lead, proposal, quoted, negotiation
|
|
20
|
+
description: 'where a sales opportunity stands — lead, proposal, quoted, negotiation; on hold until a review day; then won, lost or cancelled'
|
|
19
21
|
});
|
|
20
|
-
/** The stages a person moves an opportunity through, in order; the
|
|
22
|
+
/** The stages a person moves an opportunity through, in order; hold pauses it, the three after it close it (ADR-0233). */
|
|
21
23
|
exports.OPEN_STAGES = [OpportunityStage.LEAD, OpportunityStage.PROPOSAL, OpportunityStage.QUOTED, OpportunityStage.NEGOTIATION];
|
|
24
|
+
exports.CLOSED_STAGES = [OpportunityStage.WON, OpportunityStage.LOST, OpportunityStage.CANCELLED];
|
|
22
25
|
/*
|
|
23
26
|
* The probability a stage starts an opportunity at, in percent. These are judgements, not measurements: nobody has
|
|
24
27
|
* counted how often a proposal of ours is won. A person changes the probability of one opportunity whenever they know
|
|
25
28
|
* better, and the history (OpportunityEvent) will one day show each stage's real rate beside these (ADR-0138 decision 5).
|
|
29
|
+
* A held one keeps the probability it had, so hold gives none.
|
|
26
30
|
*/
|
|
27
31
|
exports.STAGE_PROBABILITY = {
|
|
28
32
|
[OpportunityStage.LEAD]: 10,
|
|
@@ -30,26 +34,36 @@ exports.STAGE_PROBABILITY = {
|
|
|
30
34
|
[OpportunityStage.QUOTED]: 50,
|
|
31
35
|
[OpportunityStage.NEGOTIATION]: 70,
|
|
32
36
|
[OpportunityStage.WON]: 100,
|
|
33
|
-
[OpportunityStage.LOST]: 0
|
|
37
|
+
[OpportunityStage.LOST]: 0,
|
|
38
|
+
[OpportunityStage.CANCELLED]: 0
|
|
34
39
|
};
|
|
35
40
|
const isOpen = (stage) => exports.OPEN_STAGES.includes(stage);
|
|
36
41
|
exports.isOpen = isOpen;
|
|
42
|
+
const isClosed = (stage) => exports.CLOSED_STAGES.includes(stage);
|
|
43
|
+
exports.isClosed = isClosed;
|
|
44
|
+
/** The longest a hold runs before its review day, in days (ADR-0233 decision 2). */
|
|
45
|
+
exports.HOLD_DAYS_MAX = 180;
|
|
37
46
|
/**
|
|
38
|
-
* Whether an opportunity may go from one stage to another. A person moves an open one to any open stage,
|
|
39
|
-
* as lost; a
|
|
40
|
-
*
|
|
47
|
+
* Whether an opportunity may go from one stage to another. A person moves an open one to any open stage, holds it, or
|
|
48
|
+
* closes it as lost or cancelled; a held one is closed as lost or cancelled, or resumed (`resumeOpportunity`, back to
|
|
49
|
+
* the stage it was held from); a lost or cancelled one may be opened again. Winning closes it for good — an application
|
|
50
|
+
* turns the win into its own record (a contract) and only it closes an opportunity as won, from an open stage.
|
|
41
51
|
*/
|
|
42
52
|
function stageMove(from, to) {
|
|
43
53
|
if (from === to || from === OpportunityStage.WON)
|
|
44
54
|
return false;
|
|
45
55
|
if ((0, exports.isOpen)(to))
|
|
46
|
-
return
|
|
47
|
-
|
|
56
|
+
return from === OpportunityStage.LOST || from === OpportunityStage.CANCELLED || (0, exports.isOpen)(from);
|
|
57
|
+
if (to === OpportunityStage.WON || to === OpportunityStage.ON_HOLD)
|
|
58
|
+
return (0, exports.isOpen)(from);
|
|
59
|
+
return (0, exports.isOpen)(from) || from === OpportunityStage.ON_HOLD;
|
|
48
60
|
}
|
|
49
|
-
/** The probability an opportunity keeps after a stage change: the one a person gave, or the stage's own. */
|
|
61
|
+
/** The probability an opportunity keeps after a stage change: the one a person gave, or the stage's own; a hold keeps it. */
|
|
50
62
|
function probabilityAfter(stage, given) {
|
|
51
|
-
if (
|
|
63
|
+
if ((0, exports.isClosed)(stage))
|
|
52
64
|
return exports.STAGE_PROBABILITY[stage];
|
|
65
|
+
if (stage === OpportunityStage.ON_HOLD)
|
|
66
|
+
return given ?? 0;
|
|
53
67
|
return given ?? exports.STAGE_PROBABILITY[stage];
|
|
54
68
|
}
|
|
55
69
|
const validProbability = (value) => Number.isInteger(value) && value >= 0 && value <= 100;
|
|
@@ -17,18 +17,35 @@ export declare function opportunityStageCounts(tx: EntityManager, domain: Domain
|
|
|
17
17
|
}[]>;
|
|
18
18
|
export declare function opportunityInDomain(tx: EntityManager, domain: Domain, id: string): Promise<Opportunity>;
|
|
19
19
|
/**
|
|
20
|
-
* Create an opportunity, or change one a person may still change. An open one takes any open stage; a lost
|
|
21
|
-
* opened again by giving it an open stage. Closing is `closeOpportunity`'s
|
|
20
|
+
* Create an opportunity, or change one a person may still change. An open one takes any open stage; a lost or cancelled
|
|
21
|
+
* one is opened again by giving it an open stage. Closing is `closeOpportunity`'s, holding `holdOpportunity`'s, and a
|
|
22
|
+
* held one is changed only once it is resumed (`resumeOpportunity`).
|
|
22
23
|
*/
|
|
23
24
|
export declare function saveOpportunity(tx: EntityManager, domain: Domain, user: any, input: NewOpportunity, id?: string): Promise<Opportunity>;
|
|
24
25
|
/**
|
|
25
|
-
* Close an
|
|
26
|
-
* record (Office's contract, ADR-0138 decision 8)
|
|
26
|
+
* Close an opportunity — lost or cancelled, with the reason, by a person, from an open stage or from hold; won by the
|
|
27
|
+
* application that turned it into its own record (Office's contract, ADR-0138 decision 8), from an open stage only.
|
|
28
|
+
* Cancelled is the customer dropping the work: nobody won it, so the win rate leaves it out (ADR-0233 decision 1). The
|
|
29
|
+
* day is the domain's today unless one is given.
|
|
27
30
|
*/
|
|
28
|
-
export declare function closeOpportunity(tx: EntityManager, domain: Domain, user: any, id: string, outcome: OpportunityStage.WON | OpportunityStage.LOST, { closedOn, reason }?: {
|
|
31
|
+
export declare function closeOpportunity(tx: EntityManager, domain: Domain, user: any, id: string, outcome: OpportunityStage.WON | OpportunityStage.LOST | OpportunityStage.CANCELLED, { closedOn, reason }?: {
|
|
29
32
|
closedOn?: string;
|
|
30
33
|
reason?: string;
|
|
31
34
|
}): Promise<Opportunity>;
|
|
35
|
+
/**
|
|
36
|
+
* Put an open opportunity on hold until a review day, with the reason — or change the reason and the day of a held one.
|
|
37
|
+
* A hold is a pause the owner means: it leaves the pipeline and 「no activity」, keeps its probability, and comes back
|
|
38
|
+
* to its owner on the review day, which is after today and at most `HOLD_DAYS_MAX` days ahead (ADR-0233 decision 2).
|
|
39
|
+
*/
|
|
40
|
+
export declare function holdOpportunity(tx: EntityManager, domain: Domain, user: any, id: string, { reason, heldUntil }: {
|
|
41
|
+
reason?: string;
|
|
42
|
+
heldUntil?: string;
|
|
43
|
+
}): Promise<Opportunity>;
|
|
44
|
+
/**
|
|
45
|
+
* A held opportunity resumed: back to the open stage it was held from (the last hold that left an open stage), with the
|
|
46
|
+
* probability it kept. The reason and the review day are cleared; the history keeps them.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resumeOpportunity(tx: EntityManager, domain: Domain, user: any, id: string): Promise<Opportunity>;
|
|
32
49
|
/**
|
|
33
50
|
* A won opportunity opened again, because the record its win became was undone - an application's contract link taken
|
|
34
51
|
* back (the user, 2026-10-30: 「계약 연결을 취소할 수 있어야지」). Only the application that closed it as won undoes it; a
|
|
@@ -5,6 +5,8 @@ exports.opportunityStageCounts = opportunityStageCounts;
|
|
|
5
5
|
exports.opportunityInDomain = opportunityInDomain;
|
|
6
6
|
exports.saveOpportunity = saveOpportunity;
|
|
7
7
|
exports.closeOpportunity = closeOpportunity;
|
|
8
|
+
exports.holdOpportunity = holdOpportunity;
|
|
9
|
+
exports.resumeOpportunity = resumeOpportunity;
|
|
8
10
|
exports.reopenWonOpportunity = reopenWonOpportunity;
|
|
9
11
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
10
12
|
const biz_base_1 = require("@things-factory/biz-base");
|
|
@@ -32,17 +34,20 @@ async function opportunityInDomain(tx, domain, id) {
|
|
|
32
34
|
return opportunity;
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
|
-
* Create an opportunity, or change one a person may still change. An open one takes any open stage; a lost
|
|
36
|
-
* opened again by giving it an open stage. Closing is `closeOpportunity`'s
|
|
37
|
+
* Create an opportunity, or change one a person may still change. An open one takes any open stage; a lost or cancelled
|
|
38
|
+
* one is opened again by giving it an open stage. Closing is `closeOpportunity`'s, holding `holdOpportunity`'s, and a
|
|
39
|
+
* held one is changed only once it is resumed (`resumeOpportunity`).
|
|
37
40
|
*/
|
|
38
41
|
async function saveOpportunity(tx, domain, user, input, id) {
|
|
39
42
|
const old = id ? await opportunityInDomain(tx, domain, id) : undefined;
|
|
40
43
|
const stage = input.stage ?? old?.stage ?? opportunity_rules_1.OpportunityStage.LEAD;
|
|
41
|
-
|
|
44
|
+
if (old?.stage === opportunity_rules_1.OpportunityStage.ON_HOLD)
|
|
45
|
+
throw new shell_1.Refusal('opportunity-held', {}, 'A held opportunity is resumed before it is changed');
|
|
46
|
+
/* A closed one changes only by being opened again, and only a lost or cancelled one may be. */
|
|
42
47
|
if (old && !(0, opportunity_rules_1.isOpen)(old.stage) && !((0, opportunity_rules_1.isOpen)(stage) && (0, opportunity_rules_1.stageMove)(old.stage, stage)))
|
|
43
48
|
throw new shell_1.Refusal('opportunity-closed', {}, 'A closed opportunity is not changed');
|
|
44
49
|
if (!(0, opportunity_rules_1.isOpen)(stage))
|
|
45
|
-
throw new shell_1.Refusal('opportunity-stage-open-required', {}, 'Give an open stage; won and
|
|
50
|
+
throw new shell_1.Refusal('opportunity-stage-open-required', {}, 'Give an open stage; on hold, won, lost and cancelled are set by their own actions');
|
|
46
51
|
const name = input.name?.trim();
|
|
47
52
|
if (!name)
|
|
48
53
|
throw new shell_1.Refusal('opportunity-name-required', {}, 'Name the opportunity');
|
|
@@ -81,9 +86,10 @@ async function saveOpportunity(tx, domain, user, input, id) {
|
|
|
81
86
|
stage,
|
|
82
87
|
probability,
|
|
83
88
|
owner: { id: ownerId },
|
|
84
|
-
/* A lost opportunity opened again is no longer closed. */
|
|
89
|
+
/* A lost or cancelled opportunity opened again is no longer closed. */
|
|
85
90
|
closedOn: null,
|
|
86
|
-
|
|
91
|
+
stageReason: null,
|
|
92
|
+
heldUntil: null,
|
|
87
93
|
description: input.description?.trim() || null,
|
|
88
94
|
updater: user
|
|
89
95
|
}));
|
|
@@ -92,24 +98,64 @@ async function saveOpportunity(tx, domain, user, input, id) {
|
|
|
92
98
|
return saved;
|
|
93
99
|
}
|
|
94
100
|
/**
|
|
95
|
-
* Close an
|
|
96
|
-
* record (Office's contract, ADR-0138 decision 8)
|
|
101
|
+
* Close an opportunity — lost or cancelled, with the reason, by a person, from an open stage or from hold; won by the
|
|
102
|
+
* application that turned it into its own record (Office's contract, ADR-0138 decision 8), from an open stage only.
|
|
103
|
+
* Cancelled is the customer dropping the work: nobody won it, so the win rate leaves it out (ADR-0233 decision 1). The
|
|
104
|
+
* day is the domain's today unless one is given.
|
|
97
105
|
*/
|
|
98
106
|
async function closeOpportunity(tx, domain, user, id, outcome, { closedOn, reason } = {}) {
|
|
99
107
|
const opportunity = await opportunityInDomain(tx, domain, id);
|
|
100
108
|
if (!(0, opportunity_rules_1.stageMove)(opportunity.stage, outcome))
|
|
101
109
|
throw new shell_1.Refusal('opportunity-stage-move-invalid', {}, 'The opportunity cannot move to that stage');
|
|
102
|
-
if (outcome
|
|
103
|
-
throw new shell_1.Refusal('opportunity-reason-required', {}, '
|
|
110
|
+
if (outcome !== opportunity_rules_1.OpportunityStage.WON && !reason?.trim())
|
|
111
|
+
throw new shell_1.Refusal('opportunity-reason-required', {}, 'Give the reason');
|
|
104
112
|
const day = closedOn || (0, shell_1.calendarDay)(domain.timezone);
|
|
105
113
|
if (!(0, invoice_1.validDay)(day))
|
|
106
114
|
throw new shell_1.Refusal('opportunity-closed-on-invalid', {}, 'Give the closing day as YYYY-MM-DD');
|
|
107
115
|
const from = opportunity.stage;
|
|
108
|
-
await tx.getRepository(opportunity_1.Opportunity).update({ id: opportunity.id }, { stage: outcome, probability: (0, opportunity_rules_1.probabilityAfter)(outcome), closedOn: day,
|
|
116
|
+
await tx.getRepository(opportunity_1.Opportunity).update({ id: opportunity.id }, { stage: outcome, probability: (0, opportunity_rules_1.probabilityAfter)(outcome), closedOn: day, stageReason: outcome === opportunity_rules_1.OpportunityStage.WON ? null : reason.trim(), heldUntil: null, updater: user });
|
|
109
117
|
const closed = await opportunityInDomain(tx, domain, id);
|
|
110
|
-
await recordOpportunityEvent(tx, domain, user, closed, outcome, from,
|
|
118
|
+
await recordOpportunityEvent(tx, domain, user, closed, outcome, from, closed.stageReason ?? undefined);
|
|
111
119
|
return closed;
|
|
112
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Put an open opportunity on hold until a review day, with the reason — or change the reason and the day of a held one.
|
|
123
|
+
* A hold is a pause the owner means: it leaves the pipeline and 「no activity」, keeps its probability, and comes back
|
|
124
|
+
* to its owner on the review day, which is after today and at most `HOLD_DAYS_MAX` days ahead (ADR-0233 decision 2).
|
|
125
|
+
*/
|
|
126
|
+
async function holdOpportunity(tx, domain, user, id, { reason, heldUntil }) {
|
|
127
|
+
const opportunity = await opportunityInDomain(tx, domain, id);
|
|
128
|
+
const again = opportunity.stage === opportunity_rules_1.OpportunityStage.ON_HOLD;
|
|
129
|
+
if (!again && !(0, opportunity_rules_1.stageMove)(opportunity.stage, opportunity_rules_1.OpportunityStage.ON_HOLD))
|
|
130
|
+
throw new shell_1.Refusal('opportunity-stage-move-invalid', {}, 'The opportunity cannot move to that stage');
|
|
131
|
+
if (!reason?.trim())
|
|
132
|
+
throw new shell_1.Refusal('opportunity-reason-required', {}, 'Give the reason');
|
|
133
|
+
const today = (0, shell_1.calendarDay)(domain.timezone);
|
|
134
|
+
const latest = addDays(today, opportunity_rules_1.HOLD_DAYS_MAX);
|
|
135
|
+
if (!(0, invoice_1.validDay)(heldUntil) || heldUntil <= today || heldUntil > latest)
|
|
136
|
+
throw new shell_1.Refusal('opportunity-held-until-invalid', { today, latest, days: opportunity_rules_1.HOLD_DAYS_MAX }, `Give a review day after ${today} and no later than ${latest}`);
|
|
137
|
+
const from = opportunity.stage;
|
|
138
|
+
await tx.getRepository(opportunity_1.Opportunity).update({ id }, { stage: opportunity_rules_1.OpportunityStage.ON_HOLD, stageReason: reason.trim(), heldUntil, closedOn: null, updater: user });
|
|
139
|
+
const held = await opportunityInDomain(tx, domain, id);
|
|
140
|
+
await recordOpportunityEvent(tx, domain, user, held, 'HELD', from, held.stageReason);
|
|
141
|
+
return held;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* A held opportunity resumed: back to the open stage it was held from (the last hold that left an open stage), with the
|
|
145
|
+
* probability it kept. The reason and the review day are cleared; the history keeps them.
|
|
146
|
+
*/
|
|
147
|
+
async function resumeOpportunity(tx, domain, user, id) {
|
|
148
|
+
const opportunity = await opportunityInDomain(tx, domain, id);
|
|
149
|
+
if (opportunity.stage !== opportunity_rules_1.OpportunityStage.ON_HOLD)
|
|
150
|
+
throw new shell_1.Refusal('opportunity-not-held', {}, 'Only a held opportunity is resumed');
|
|
151
|
+
const holds = await tx.getRepository(opportunity_event_1.OpportunityEvent).find({ where: { opportunity: { id }, action: 'HELD' }, order: { createdAt: 'DESC' } });
|
|
152
|
+
const stage = holds.find(one => one.fromStage && (0, opportunity_rules_1.isOpen)(one.fromStage))?.fromStage ?? opportunity_rules_1.OpportunityStage.LEAD;
|
|
153
|
+
await tx.getRepository(opportunity_1.Opportunity).update({ id }, { stage, stageReason: null, heldUntil: null, updater: user });
|
|
154
|
+
const resumed = await opportunityInDomain(tx, domain, id);
|
|
155
|
+
await recordOpportunityEvent(tx, domain, user, resumed, 'RESUMED', opportunity_rules_1.OpportunityStage.ON_HOLD);
|
|
156
|
+
return resumed;
|
|
157
|
+
}
|
|
158
|
+
const addDays = (day, days) => new Date(Date.parse(`${day}T00:00:00Z`) + days * 86400000).toISOString().slice(0, 10);
|
|
113
159
|
/**
|
|
114
160
|
* A won opportunity opened again, because the record its win became was undone - an application's contract link taken
|
|
115
161
|
* back (the user, 2026-10-30: 「계약 연결을 취소할 수 있어야지」). Only the application that closed it as won undoes it; a
|
|
@@ -123,7 +169,7 @@ async function reopenWonOpportunity(tx, domain, user, id, reason) {
|
|
|
123
169
|
throw new shell_1.Refusal('opportunity-reopen-reason-required', {}, 'Say why it is opened again');
|
|
124
170
|
const won = await tx.getRepository(opportunity_event_1.OpportunityEvent).findOne({ where: { opportunity: { id }, action: opportunity_rules_1.OpportunityStage.WON }, order: { createdAt: 'DESC' } });
|
|
125
171
|
const stage = won?.fromStage && (0, opportunity_rules_1.isOpen)(won.fromStage) ? won.fromStage : opportunity_rules_1.OpportunityStage.NEGOTIATION;
|
|
126
|
-
await tx.getRepository(opportunity_1.Opportunity).update({ id }, { stage, probability: (0, opportunity_rules_1.probabilityAfter)(stage), closedOn: null,
|
|
172
|
+
await tx.getRepository(opportunity_1.Opportunity).update({ id }, { stage, probability: (0, opportunity_rules_1.probabilityAfter)(stage), closedOn: null, stageReason: null, heldUntil: null, updater: user });
|
|
127
173
|
const reopened = await opportunityInDomain(tx, domain, id);
|
|
128
174
|
await recordOpportunityEvent(tx, domain, user, reopened, 'REOPENED', opportunity_rules_1.OpportunityStage.WON, reason.trim());
|
|
129
175
|
return reopened;
|
|
@@ -133,7 +179,7 @@ function recordOpportunityEvent(tx, domain, user, opportunity, action, fromStage
|
|
|
133
179
|
}
|
|
134
180
|
/** The opportunity as it stood. */
|
|
135
181
|
function snapshotOf(opportunity) {
|
|
136
|
-
const keys = ['id', 'name', 'counterpartyId', 'endCustomerId', 'amount', 'currency', 'expectedCloseMonth', 'stage', 'probability', 'ownerId', 'closedOn', '
|
|
182
|
+
const keys = ['id', 'name', 'counterpartyId', 'endCustomerId', 'amount', 'currency', 'expectedCloseMonth', 'stage', 'probability', 'ownerId', 'closedOn', 'stageReason', 'heldUntil', 'description'];
|
|
137
183
|
return Object.fromEntries(keys.map(key => [key, opportunity[key] ?? null]));
|
|
138
184
|
}
|
|
139
185
|
//# sourceMappingURL=opportunity-service.js.map
|
|
@@ -73,11 +73,11 @@ tslib_1.__decorate([
|
|
|
73
73
|
tslib_1.__metadata("design:type", String)
|
|
74
74
|
], OpportunityStageDefault.prototype, "stage", void 0);
|
|
75
75
|
tslib_1.__decorate([
|
|
76
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The probability the stage gives, in percent — a judgement, not a measurement' }),
|
|
76
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'The probability the stage gives, in percent — a judgement, not a measurement; none for on hold, which keeps the one it had' }),
|
|
77
77
|
tslib_1.__metadata("design:type", Number)
|
|
78
78
|
], OpportunityStageDefault.prototype, "probability", void 0);
|
|
79
79
|
tslib_1.__decorate([
|
|
80
|
-
(0, type_graphql_1.Field)({ description: 'Whether a person moves an opportunity through this stage; won and
|
|
80
|
+
(0, type_graphql_1.Field)({ description: 'Whether a person moves an opportunity through this stage; on hold pauses it, won, lost and cancelled close it' }),
|
|
81
81
|
tslib_1.__metadata("design:type", Boolean)
|
|
82
82
|
], OpportunityStageDefault.prototype, "open", void 0);
|
|
83
83
|
exports.OpportunityStageDefault = OpportunityStageDefault = tslib_1.__decorate([
|
|
@@ -95,7 +95,7 @@ tslib_1.__decorate([
|
|
|
95
95
|
tslib_1.__metadata("design:type", Number)
|
|
96
96
|
], OpportunityStageCount.prototype, "count", void 0);
|
|
97
97
|
tslib_1.__decorate([
|
|
98
|
-
(0, type_graphql_1.Field)({ description: 'Whether the stage is open; the list starts with the open stages chosen, won and
|
|
98
|
+
(0, type_graphql_1.Field)({ description: 'Whether the stage is open; the list starts with the open stages and on hold chosen, won, lost and cancelled left out' }),
|
|
99
99
|
tslib_1.__metadata("design:type", Boolean)
|
|
100
100
|
], OpportunityStageCount.prototype, "open", void 0);
|
|
101
101
|
exports.OpportunityStageCount = OpportunityStageCount = tslib_1.__decorate([
|
|
@@ -4,7 +4,7 @@ import { Domain } from '@things-factory/shell';
|
|
|
4
4
|
import { OpportunityStage } from './opportunity-rules';
|
|
5
5
|
/**
|
|
6
6
|
* A sales opportunity — work the domain hopes to win, before there is a contract: with whom, for how much, by when,
|
|
7
|
-
* and how likely. A person moves it through the stages; it closes as won or
|
|
7
|
+
* and how likely. A person moves it through the stages; it closes as won, lost or cancelled, or is put on hold until a review day (ADR-0138 decision 5, ADR-0233).
|
|
8
8
|
*/
|
|
9
9
|
export declare class Opportunity {
|
|
10
10
|
readonly id: string;
|
|
@@ -23,7 +23,8 @@ export declare class Opportunity {
|
|
|
23
23
|
owner?: User;
|
|
24
24
|
ownerId?: string;
|
|
25
25
|
closedOn?: string;
|
|
26
|
-
|
|
26
|
+
stageReason?: string;
|
|
27
|
+
heldUntil?: string;
|
|
27
28
|
description?: string;
|
|
28
29
|
createdAt?: Date;
|
|
29
30
|
updatedAt?: Date;
|
|
@@ -10,7 +10,7 @@ const typeorm_1 = require("typeorm");
|
|
|
10
10
|
const opportunity_rules_1 = require("./opportunity-rules");
|
|
11
11
|
/**
|
|
12
12
|
* A sales opportunity — work the domain hopes to win, before there is a contract: with whom, for how much, by when,
|
|
13
|
-
* and how likely. A person moves it through the stages; it closes as won or
|
|
13
|
+
* and how likely. A person moves it through the stages; it closes as won, lost or cancelled, or is put on hold until a review day (ADR-0138 decision 5, ADR-0233).
|
|
14
14
|
*/
|
|
15
15
|
let Opportunity = class Opportunity {
|
|
16
16
|
};
|
|
@@ -71,7 +71,7 @@ tslib_1.__decorate([
|
|
|
71
71
|
], Opportunity.prototype, "expectedCloseMonth", void 0);
|
|
72
72
|
tslib_1.__decorate([
|
|
73
73
|
(0, typeorm_1.Column)({ default: opportunity_rules_1.OpportunityStage.LEAD }),
|
|
74
|
-
(0, type_graphql_1.Field)(type => opportunity_rules_1.OpportunityStage, { description: 'Lead, proposal, quoted, negotiation, won or
|
|
74
|
+
(0, type_graphql_1.Field)(type => opportunity_rules_1.OpportunityStage, { description: 'Lead, proposal, quoted, negotiation, on hold, won, lost or cancelled' }),
|
|
75
75
|
tslib_1.__metadata("design:type", String)
|
|
76
76
|
], Opportunity.prototype, "stage", void 0);
|
|
77
77
|
tslib_1.__decorate([
|
|
@@ -91,14 +91,19 @@ tslib_1.__decorate([
|
|
|
91
91
|
], Opportunity.prototype, "ownerId", void 0);
|
|
92
92
|
tslib_1.__decorate([
|
|
93
93
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
94
|
-
(0, type_graphql_1.Field)({ nullable: true, description: 'Day it was closed as won or
|
|
94
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Day it was closed as won, lost or cancelled, YYYY-MM-DD' }),
|
|
95
95
|
tslib_1.__metadata("design:type", String)
|
|
96
96
|
], Opportunity.prototype, "closedOn", void 0);
|
|
97
97
|
tslib_1.__decorate([
|
|
98
98
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
99
|
-
(0, type_graphql_1.Field)({ nullable: true, description: 'Why it was lost' }),
|
|
99
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Why it was lost, cancelled or put on hold' }),
|
|
100
100
|
tslib_1.__metadata("design:type", String)
|
|
101
|
-
], Opportunity.prototype, "
|
|
101
|
+
], Opportunity.prototype, "stageReason", void 0);
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
104
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'While on hold: the day to review it again, YYYY-MM-DD' }),
|
|
105
|
+
tslib_1.__metadata("design:type", String)
|
|
106
|
+
], Opportunity.prototype, "heldUntil", void 0);
|
|
102
107
|
tslib_1.__decorate([
|
|
103
108
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
104
109
|
(0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
|
|
@@ -5,6 +5,6 @@ import { QuotationItem } from './quotation-item';
|
|
|
5
5
|
import { QuotationItemQuery } from './quotation-item-query';
|
|
6
6
|
import { QuotationMutation } from './quotation-mutation';
|
|
7
7
|
import { QuotationQuery } from './quotation-query';
|
|
8
|
-
export declare const entities: (typeof
|
|
9
|
-
export declare const resolvers: (typeof
|
|
8
|
+
export declare const entities: (typeof Quotation | typeof QuotationItem | typeof QuotationEvent)[];
|
|
9
|
+
export declare const resolvers: (typeof QuotationQuery | typeof QuotationMutation | typeof QuotationItemQuery | typeof QuotationEventQuery)[];
|
|
10
10
|
export declare const subscribers: any[];
|
|
@@ -16,7 +16,7 @@ exports.OPPORTUNITY_LIST_READ = {
|
|
|
16
16
|
title: 'title.opportunity-list',
|
|
17
17
|
name: 'Sales opportunities (영업 기회)',
|
|
18
18
|
listQuery: 'opportunities',
|
|
19
|
-
selection: 'id name stage probability amount currency expectedCloseMonth closedOn
|
|
19
|
+
selection: 'id name stage probability amount currency expectedCloseMonth closedOn stageReason heldUntil description counterparty { id name } endCustomer { id name } owner { id name }',
|
|
20
20
|
columns: [
|
|
21
21
|
{ name: 'name', type: 'string', labelKey: 'field.opportunity-name' },
|
|
22
22
|
{ name: 'counterparty', path: 'counterparty.name', type: 'string', labelKey: 'field.opportunity-counterparty' },
|
|
@@ -27,7 +27,8 @@ exports.OPPORTUNITY_LIST_READ = {
|
|
|
27
27
|
{ name: 'amount', type: 'number', total: true, currency: 'currency', labelKey: 'field.opportunity-amount' },
|
|
28
28
|
{ name: 'expectedCloseMonth', type: 'string', labelKey: 'field.opportunity-expected-close-month' },
|
|
29
29
|
{ name: 'closedOn', type: 'date' },
|
|
30
|
-
{ name: '
|
|
30
|
+
{ name: 'stageReason', type: 'string' },
|
|
31
|
+
{ name: 'heldUntil', type: 'date' },
|
|
31
32
|
{ name: 'owner', path: 'owner.name', type: 'string', labelKey: 'field.opportunity-owner' },
|
|
32
33
|
{ name: 'description', type: 'string' }
|
|
33
34
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/sales",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.310",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"files": [
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"@things-factory/invoice": "^10.1.304",
|
|
64
64
|
"@things-factory/shell": "^10.1.304"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "af1e7b73772abf0b89dfe66193c771e24e18a721"
|
|
67
67
|
}
|
package/translations/en.json
CHANGED
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"button.opportunity-new": "New opportunity",
|
|
45
45
|
"button.opportunity-lose": "Mark as lost",
|
|
46
46
|
"error.opportunity-not-found": "Opportunity not found.",
|
|
47
|
-
"error.opportunity-closed": "This opportunity is closed. Choose an open stage to reopen a lost one.",
|
|
48
|
-
"error.opportunity-stage-open-required": "Choose an open stage.
|
|
47
|
+
"error.opportunity-closed": "This opportunity is closed. Choose an open stage to reopen a lost or cancelled one.",
|
|
48
|
+
"error.opportunity-stage-open-required": "Choose an open stage. On hold, won, lost and cancelled are set under Close or hold.",
|
|
49
49
|
"error.opportunity-stage-move-invalid": "The opportunity cannot move to that stage.",
|
|
50
50
|
"error.opportunity-name-required": "Enter the opportunity name.",
|
|
51
51
|
"error.opportunity-amount-invalid": "The expected amount must be zero or more.",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"error.opportunity-counterparty-required": "Choose the counterparty.",
|
|
55
55
|
"error.opportunity-end-customer-invalid": "Choose the end customer among the registered counterparties.",
|
|
56
56
|
"error.opportunity-owner-invalid": "Choose the owner among this company's users.",
|
|
57
|
-
"error.opportunity-reason-required": "Enter the reason
|
|
57
|
+
"error.opportunity-reason-required": "Enter the reason.",
|
|
58
58
|
"error.opportunity-closed-on-invalid": "Enter the closing day as YYYY-MM-DD.",
|
|
59
59
|
"field.opportunity-name": "Name",
|
|
60
60
|
"field.opportunity-counterparty": "Counterparty",
|
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
"text.opportunity-not-found": "Opportunity not found.",
|
|
83
83
|
"text.opportunity-section-head": "Details",
|
|
84
84
|
"text.opportunity-section-stage": "Stage",
|
|
85
|
-
"text.opportunity-section-lose": "Lost",
|
|
86
85
|
"text.opportunity-section-history": "History",
|
|
87
86
|
"text.opportunity-owner-me": "Me",
|
|
88
87
|
"text.opportunity-owner-all": "Every owner",
|
|
@@ -173,5 +172,21 @@
|
|
|
173
172
|
"text.quotation-mail-sent": "The quotation was mailed to {to}.",
|
|
174
173
|
"text.quotation-mail-always-cc": "Always copied to {addresses}",
|
|
175
174
|
"error.quotation-mail-expired": "The offer passed its last day ({validUntil}). Make a new version to send it.",
|
|
176
|
-
"error.quotation-mail-just-sent": "This quotation went to the same people ({to}) a moment ago."
|
|
175
|
+
"error.quotation-mail-just-sent": "This quotation went to the same people ({to}) a moment ago.",
|
|
176
|
+
"button.opportunity-cancel": "Mark as cancelled",
|
|
177
|
+
"button.opportunity-hold": "Put on hold",
|
|
178
|
+
"button.opportunity-resume": "Resume",
|
|
179
|
+
"error.opportunity-held": "This opportunity is on hold. Resume it before changing it.",
|
|
180
|
+
"error.opportunity-not-held": "Only an opportunity on hold can be resumed.",
|
|
181
|
+
"error.opportunity-held-until-invalid": "Enter a review day after {today} and no later than {latest} (within {days} days).",
|
|
182
|
+
"field.opportunity-reason": "Reason",
|
|
183
|
+
"field.opportunity-cancel-reason": "Cancellation reason",
|
|
184
|
+
"field.opportunity-hold-reason": "Hold reason",
|
|
185
|
+
"field.opportunity-held-until": "Review day",
|
|
186
|
+
"text.opportunity-stage-on-hold": "On hold",
|
|
187
|
+
"text.opportunity-stage-cancelled": "Cancelled",
|
|
188
|
+
"text.opportunity-section-close": "Close or hold",
|
|
189
|
+
"text.opportunity-event-cancelled": "Cancelled",
|
|
190
|
+
"text.opportunity-event-held": "Put on hold",
|
|
191
|
+
"text.opportunity-event-resumed": "Resumed"
|
|
177
192
|
}
|
package/translations/es.json
CHANGED
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"button.opportunity-new": "Nueva oportunidad",
|
|
45
45
|
"button.opportunity-lose": "Marcar como perdida",
|
|
46
46
|
"error.opportunity-not-found": "No se encontró la oportunidad.",
|
|
47
|
-
"error.opportunity-closed": "Esta oportunidad está cerrada. Elija una etapa abierta para reabrir una perdida.",
|
|
48
|
-
"error.opportunity-stage-open-required": "Elija una etapa abierta.
|
|
47
|
+
"error.opportunity-closed": "Esta oportunidad está cerrada. Elija una etapa abierta para reabrir una perdida o cancelada.",
|
|
48
|
+
"error.opportunity-stage-open-required": "Elija una etapa abierta. En espera, ganada, perdida y cancelada se indican en Cerrar o poner en espera.",
|
|
49
49
|
"error.opportunity-stage-move-invalid": "La oportunidad no puede pasar a esa etapa.",
|
|
50
50
|
"error.opportunity-name-required": "Introduzca el nombre de la oportunidad.",
|
|
51
51
|
"error.opportunity-amount-invalid": "El importe previsto debe ser cero o más.",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"error.opportunity-counterparty-required": "Elija la contraparte.",
|
|
55
55
|
"error.opportunity-end-customer-invalid": "Elija el cliente final entre las contrapartes registradas.",
|
|
56
56
|
"error.opportunity-owner-invalid": "Elija el responsable entre los usuarios de esta empresa.",
|
|
57
|
-
"error.opportunity-reason-required": "
|
|
57
|
+
"error.opportunity-reason-required": "Introduzca el motivo.",
|
|
58
58
|
"error.opportunity-closed-on-invalid": "Introduzca el día de cierre como AAAA-MM-DD.",
|
|
59
59
|
"field.opportunity-name": "Nombre",
|
|
60
60
|
"field.opportunity-counterparty": "Contraparte",
|
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
"text.opportunity-not-found": "No se encontró la oportunidad.",
|
|
83
83
|
"text.opportunity-section-head": "Datos",
|
|
84
84
|
"text.opportunity-section-stage": "Etapa",
|
|
85
|
-
"text.opportunity-section-lose": "Perdida",
|
|
86
85
|
"text.opportunity-section-history": "Historial",
|
|
87
86
|
"text.opportunity-owner-me": "Yo",
|
|
88
87
|
"text.opportunity-owner-all": "Todos los responsables",
|
|
@@ -173,5 +172,21 @@
|
|
|
173
172
|
"text.quotation-mail-sent": "La cotización se envió a {to}.",
|
|
174
173
|
"text.quotation-mail-always-cc": "Siempre con copia a {addresses}",
|
|
175
174
|
"error.quotation-mail-expired": "La oferta venció ({validUntil}). Cree una nueva versión para enviarla.",
|
|
176
|
-
"error.quotation-mail-just-sent": "Esta cotización se acaba de enviar a las mismas personas ({to})."
|
|
175
|
+
"error.quotation-mail-just-sent": "Esta cotización se acaba de enviar a las mismas personas ({to}).",
|
|
176
|
+
"button.opportunity-cancel": "Marcar como cancelada",
|
|
177
|
+
"button.opportunity-hold": "Poner en espera",
|
|
178
|
+
"button.opportunity-resume": "Reanudar",
|
|
179
|
+
"error.opportunity-held": "Esta oportunidad está en espera. Reanúdela antes de cambiarla.",
|
|
180
|
+
"error.opportunity-not-held": "Solo se puede reanudar una oportunidad en espera.",
|
|
181
|
+
"error.opportunity-held-until-invalid": "Introduzca una fecha de revisión posterior a {today} y no posterior a {latest} (en {days} días).",
|
|
182
|
+
"field.opportunity-reason": "Motivo",
|
|
183
|
+
"field.opportunity-cancel-reason": "Motivo de cancelación",
|
|
184
|
+
"field.opportunity-hold-reason": "Motivo de espera",
|
|
185
|
+
"field.opportunity-held-until": "Fecha de revisión",
|
|
186
|
+
"text.opportunity-stage-on-hold": "En espera",
|
|
187
|
+
"text.opportunity-stage-cancelled": "Cancelada",
|
|
188
|
+
"text.opportunity-section-close": "Cerrar o poner en espera",
|
|
189
|
+
"text.opportunity-event-cancelled": "Cancelada",
|
|
190
|
+
"text.opportunity-event-held": "En espera",
|
|
191
|
+
"text.opportunity-event-resumed": "Reanudada"
|
|
177
192
|
}
|
package/translations/ja.json
CHANGED
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"button.opportunity-new": "商談登録",
|
|
45
45
|
"button.opportunity-lose": "失注にする",
|
|
46
46
|
"error.opportunity-not-found": "商談が見つかりません。",
|
|
47
|
-
"error.opportunity-closed": "
|
|
48
|
-
"error.opportunity-stage-open-required": "
|
|
47
|
+
"error.opportunity-closed": "終了した商談です。失注・取消した商談は進行段階を選択すると再開できます。",
|
|
48
|
+
"error.opportunity-stage-open-required": "進行段階を選択してください。保留・受注・失注・取消は終了・保留で処理します。",
|
|
49
49
|
"error.opportunity-stage-move-invalid": "その段階には移せません。",
|
|
50
50
|
"error.opportunity-name-required": "商談名を入力してください。",
|
|
51
51
|
"error.opportunity-amount-invalid": "見込金額は0以上にしてください。",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"error.opportunity-counterparty-required": "取引先を選んでください。",
|
|
55
55
|
"error.opportunity-end-customer-invalid": "エンド顧客は登録済みの取引先から選んでください。",
|
|
56
56
|
"error.opportunity-owner-invalid": "担当者はこの会社のユーザーから選んでください。",
|
|
57
|
-
"error.opportunity-reason-required": "
|
|
57
|
+
"error.opportunity-reason-required": "理由を入力してください。",
|
|
58
58
|
"error.opportunity-closed-on-invalid": "終了日をYYYY-MM-DD形式で入力してください。",
|
|
59
59
|
"field.opportunity-name": "商談名",
|
|
60
60
|
"field.opportunity-counterparty": "取引先",
|
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
"text.opportunity-not-found": "商談が見つかりません。",
|
|
83
83
|
"text.opportunity-section-head": "基本情報",
|
|
84
84
|
"text.opportunity-section-stage": "段階",
|
|
85
|
-
"text.opportunity-section-lose": "失注",
|
|
86
85
|
"text.opportunity-section-history": "履歴",
|
|
87
86
|
"text.opportunity-owner-me": "自分",
|
|
88
87
|
"text.opportunity-owner-all": "すべての担当者",
|
|
@@ -173,5 +172,21 @@
|
|
|
173
172
|
"text.quotation-mail-sent": "{to} に見積書を送りました。",
|
|
174
173
|
"text.quotation-mail-always-cc": "自動 CC: {addresses}",
|
|
175
174
|
"error.quotation-mail-expired": "有効期限({validUntil})を過ぎた見積は再送しません。新しいバージョンを作って送ってください。",
|
|
176
|
-
"error.quotation-mail-just-sent": "先ほど同じ宛先({to})にこの見積を送りました。"
|
|
175
|
+
"error.quotation-mail-just-sent": "先ほど同じ宛先({to})にこの見積を送りました。",
|
|
176
|
+
"button.opportunity-cancel": "取消処理",
|
|
177
|
+
"button.opportunity-hold": "保留処理",
|
|
178
|
+
"button.opportunity-resume": "再開",
|
|
179
|
+
"error.opportunity-held": "保留中の商談です。再開してから変更してください。",
|
|
180
|
+
"error.opportunity-not-held": "保留中の商談のみ再開できます。",
|
|
181
|
+
"error.opportunity-held-until-invalid": "再検討日は{today}の翌日から{latest}まで({days}日以内)で入力してください。",
|
|
182
|
+
"field.opportunity-reason": "理由",
|
|
183
|
+
"field.opportunity-cancel-reason": "取消理由",
|
|
184
|
+
"field.opportunity-hold-reason": "保留理由",
|
|
185
|
+
"field.opportunity-held-until": "再検討日",
|
|
186
|
+
"text.opportunity-stage-on-hold": "保留",
|
|
187
|
+
"text.opportunity-stage-cancelled": "取消",
|
|
188
|
+
"text.opportunity-section-close": "終了・保留",
|
|
189
|
+
"text.opportunity-event-cancelled": "取消",
|
|
190
|
+
"text.opportunity-event-held": "保留",
|
|
191
|
+
"text.opportunity-event-resumed": "再開"
|
|
177
192
|
}
|
package/translations/ko.json
CHANGED
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"button.opportunity-new": "영업 기회 등록",
|
|
45
45
|
"button.opportunity-lose": "실주 처리",
|
|
46
46
|
"error.opportunity-not-found": "영업 기회를 찾을 수 없습니다.",
|
|
47
|
-
"error.opportunity-closed": "종료된 영업 기회입니다.
|
|
48
|
-
"error.opportunity-stage-open-required": "진행 단계를 선택해 주세요.
|
|
47
|
+
"error.opportunity-closed": "종료된 영업 기회입니다. 실주·취소한 영업 기회는 진행 단계를 선택하면 다시 열 수 있습니다.",
|
|
48
|
+
"error.opportunity-stage-open-required": "진행 단계를 선택해 주세요. 보류·수주·실주·취소는 종결·보류 구역에서 처리합니다.",
|
|
49
49
|
"error.opportunity-stage-move-invalid": "선택한 단계로 변경할 수 없습니다.",
|
|
50
50
|
"error.opportunity-name-required": "기회 이름을 입력하세요.",
|
|
51
51
|
"error.opportunity-amount-invalid": "예상 금액은 0 이상이어야 합니다.",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"error.opportunity-counterparty-required": "거래처를 선택해 주세요.",
|
|
55
55
|
"error.opportunity-end-customer-invalid": "등록된 거래처에서 최종 고객을 선택해 주세요.",
|
|
56
56
|
"error.opportunity-owner-invalid": "이 회사에 등록된 사용자 중에서 담당자를 선택해 주세요.",
|
|
57
|
-
"error.opportunity-reason-required": "
|
|
57
|
+
"error.opportunity-reason-required": "사유를 입력하세요.",
|
|
58
58
|
"error.opportunity-closed-on-invalid": "종료일을 YYYY-MM-DD 형식으로 입력하세요.",
|
|
59
59
|
"field.opportunity-name": "기회 이름",
|
|
60
60
|
"field.opportunity-counterparty": "거래처",
|
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
"text.opportunity-not-found": "영업 기회를 찾을 수 없습니다.",
|
|
83
83
|
"text.opportunity-section-head": "기본 정보",
|
|
84
84
|
"text.opportunity-section-stage": "단계",
|
|
85
|
-
"text.opportunity-section-lose": "실주",
|
|
86
85
|
"text.opportunity-section-history": "이력",
|
|
87
86
|
"text.opportunity-owner-me": "나",
|
|
88
87
|
"text.opportunity-owner-all": "모든 담당자",
|
|
@@ -173,5 +172,21 @@
|
|
|
173
172
|
"text.quotation-mail-sent": "{to} 에게 견적서를 보냈습니다.",
|
|
174
173
|
"text.quotation-mail-always-cc": "자동 참조: {addresses}",
|
|
175
174
|
"error.quotation-mail-expired": "유효기한({validUntil})이 지난 견적은 다시 보내지 않습니다. 새 버전을 만들어 보내세요.",
|
|
176
|
-
"error.quotation-mail-just-sent": "방금 같은 사람들({to})에게 이 견적을 보냈습니다."
|
|
175
|
+
"error.quotation-mail-just-sent": "방금 같은 사람들({to})에게 이 견적을 보냈습니다.",
|
|
176
|
+
"button.opportunity-cancel": "취소 처리",
|
|
177
|
+
"button.opportunity-hold": "보류 처리",
|
|
178
|
+
"button.opportunity-resume": "재개",
|
|
179
|
+
"error.opportunity-held": "보류 중인 영업 기회입니다. 재개한 뒤 변경하세요.",
|
|
180
|
+
"error.opportunity-not-held": "보류 중인 영업 기회만 재개할 수 있습니다.",
|
|
181
|
+
"error.opportunity-held-until-invalid": "재검토일은 {today} 다음 날부터 {latest}까지({days}일 이내) 입력하세요.",
|
|
182
|
+
"field.opportunity-reason": "사유",
|
|
183
|
+
"field.opportunity-cancel-reason": "취소 사유",
|
|
184
|
+
"field.opportunity-hold-reason": "보류 사유",
|
|
185
|
+
"field.opportunity-held-until": "재검토일",
|
|
186
|
+
"text.opportunity-stage-on-hold": "보류",
|
|
187
|
+
"text.opportunity-stage-cancelled": "취소",
|
|
188
|
+
"text.opportunity-section-close": "종결·보류",
|
|
189
|
+
"text.opportunity-event-cancelled": "취소",
|
|
190
|
+
"text.opportunity-event-held": "보류",
|
|
191
|
+
"text.opportunity-event-resumed": "재개"
|
|
177
192
|
}
|