@masterteam/work-center 0.0.76 → 0.0.77
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/assets/i18n/ar.json
CHANGED
|
@@ -111,9 +111,12 @@
|
|
|
111
111
|
"stepStatus": {
|
|
112
112
|
"approved": "تمت الموافقة",
|
|
113
113
|
"current": "قيد التنفيذ",
|
|
114
|
+
"noAction": "بدون إجراء",
|
|
114
115
|
"notStarted": "لم تبدأ",
|
|
115
116
|
"rejected": "مرفوضة",
|
|
116
|
-
"
|
|
117
|
+
"resubmitted": "تمت إعادة الإرسال",
|
|
118
|
+
"returned": "تمت الإعادة",
|
|
119
|
+
"terminated": "تم الإنهاء"
|
|
117
120
|
}
|
|
118
121
|
},
|
|
119
122
|
"field": {
|
package/assets/i18n/en.json
CHANGED
|
@@ -111,9 +111,12 @@
|
|
|
111
111
|
"stepStatus": {
|
|
112
112
|
"approved": "Approved",
|
|
113
113
|
"current": "In Progress",
|
|
114
|
+
"noAction": "No Action",
|
|
114
115
|
"notStarted": "Not Started",
|
|
115
116
|
"rejected": "Rejected",
|
|
116
|
-
"
|
|
117
|
+
"resubmitted": "Resubmitted",
|
|
118
|
+
"returned": "Returned",
|
|
119
|
+
"terminated": "Terminated"
|
|
117
120
|
}
|
|
118
121
|
},
|
|
119
122
|
"field": {
|
|
@@ -1915,21 +1915,31 @@ function findLast(items, predicate) {
|
|
|
1915
1915
|
* out into several records and every attempt (return → resubmit) creates a
|
|
1916
1916
|
* fresh fan-out. A schema node shows the state of its *latest* attempt.
|
|
1917
1917
|
*/
|
|
1918
|
-
/** Node accent color per state —
|
|
1918
|
+
/** Node accent color per state — every outcome gets its own hue. */
|
|
1919
1919
|
const PROCESS_STEP_STATUS_COLORS = {
|
|
1920
|
-
approved: '#059669', // green — approved
|
|
1920
|
+
approved: '#059669', // green — approved
|
|
1921
1921
|
current: '#d97706', // amber — running right now
|
|
1922
|
+
noAction: '#0891b2', // cyan — closed without a decision from this target
|
|
1922
1923
|
notStarted: '#2563eb', // blue — not reached yet
|
|
1923
|
-
rejected: '#dc2626', // red — rejected
|
|
1924
|
+
rejected: '#dc2626', // red — rejected
|
|
1925
|
+
resubmitted: '#7c3aed', // violet — sent back, then pushed forward again
|
|
1924
1926
|
returned: '#6b7280', // gray — sent back
|
|
1927
|
+
terminated: '#334155', // slate — the run was killed outright
|
|
1925
1928
|
};
|
|
1926
|
-
/**
|
|
1929
|
+
/**
|
|
1930
|
+
* `NodeBadgeTone` per state, so the pill matches the node color. The tones the
|
|
1931
|
+
* structure-builder names cover the original five; the rest use `accent`, which
|
|
1932
|
+
* has no tone rule of its own and therefore inherits the node color exactly.
|
|
1933
|
+
*/
|
|
1927
1934
|
const PROCESS_STEP_STATUS_BADGE_TONES = {
|
|
1928
1935
|
approved: 'final',
|
|
1929
1936
|
current: 'current',
|
|
1937
|
+
noAction: 'accent',
|
|
1930
1938
|
notStarted: 'initial',
|
|
1931
1939
|
rejected: 'closed',
|
|
1940
|
+
resubmitted: 'accent',
|
|
1932
1941
|
returned: 'neutral',
|
|
1942
|
+
terminated: 'accent',
|
|
1933
1943
|
};
|
|
1934
1944
|
const PENDING = 'pending';
|
|
1935
1945
|
const CURRENT_VIEW = { status: 'current', label: '' };
|
|
@@ -1939,21 +1949,30 @@ const NOT_STARTED_VIEW = {
|
|
|
1939
1949
|
};
|
|
1940
1950
|
/**
|
|
1941
1951
|
* Decided status keys → visual state. A decided status that isn't listed reads
|
|
1942
|
-
* as `
|
|
1943
|
-
* still shows the backend's own wording.
|
|
1952
|
+
* as `noAction` — it closed, but not by a decision we can name, so the color
|
|
1953
|
+
* must not claim one. The badge still shows the backend's own wording.
|
|
1944
1954
|
*/
|
|
1945
1955
|
const DECIDED_STATUS_STATES = {
|
|
1946
1956
|
approved: 'approved',
|
|
1947
|
-
noaction: '
|
|
1957
|
+
noaction: 'noAction',
|
|
1948
1958
|
rejected: 'rejected',
|
|
1949
|
-
|
|
1959
|
+
resubmitted: 'resubmitted',
|
|
1950
1960
|
returned: 'returned',
|
|
1961
|
+
terminated: 'terminated',
|
|
1951
1962
|
};
|
|
1952
|
-
|
|
1963
|
+
const UNCLASSIFIED_DECIDED_STATE = 'noAction';
|
|
1964
|
+
/**
|
|
1965
|
+
* Inside one attempt the strongest outcome represents the step, so a group
|
|
1966
|
+
* fan-out where one member rejected reads as rejected while the siblings who
|
|
1967
|
+
* never acted read as `noAction`.
|
|
1968
|
+
*/
|
|
1953
1969
|
const OUTCOME_PRECEDENCE = [
|
|
1970
|
+
'terminated',
|
|
1954
1971
|
'rejected',
|
|
1955
1972
|
'returned',
|
|
1973
|
+
'resubmitted',
|
|
1956
1974
|
'approved',
|
|
1975
|
+
'noAction',
|
|
1957
1976
|
];
|
|
1958
1977
|
/**
|
|
1959
1978
|
* Maps every schema-step id the runtime has touched to its visual state.
|
|
@@ -1987,7 +2006,7 @@ function resolveStatusView(status, resolveDisplayName) {
|
|
|
1987
2006
|
return NOT_STARTED_VIEW;
|
|
1988
2007
|
}
|
|
1989
2008
|
return {
|
|
1990
|
-
status: DECIDED_STATUS_STATES[key] ??
|
|
2009
|
+
status: DECIDED_STATUS_STATES[key] ?? UNCLASSIFIED_DECIDED_STATE,
|
|
1991
2010
|
label: resolveStatusLabel(status, resolveDisplayName),
|
|
1992
2011
|
};
|
|
1993
2012
|
}
|
|
@@ -2013,7 +2032,7 @@ function decidedState(step) {
|
|
|
2013
2032
|
if (key === '' || key === PENDING) {
|
|
2014
2033
|
return null;
|
|
2015
2034
|
}
|
|
2016
|
-
return DECIDED_STATUS_STATES[key] ??
|
|
2035
|
+
return DECIDED_STATUS_STATES[key] ?? UNCLASSIFIED_DECIDED_STATE;
|
|
2017
2036
|
}
|
|
2018
2037
|
/**
|
|
2019
2038
|
* Consecutive records sharing a schema step belong to the same attempt. The
|