@atlashub/smartstack-cli 2.9.0 → 3.1.0
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/.documentation/agents.html +1 -371
- package/.documentation/business-analyse.html +81 -17
- package/.documentation/cli-commands.html +1 -1
- package/.documentation/commands.html +1 -1
- package/.documentation/efcore.html +1 -1
- package/.documentation/gitflow.html +1 -1
- package/.documentation/hooks.html +27 -66
- package/.documentation/index.html +166 -166
- package/.documentation/init.html +6 -7
- package/.documentation/installation.html +1 -1
- package/.documentation/ralph-loop.html +1 -9
- package/.documentation/test-web.html +15 -39
- package/dist/index.js +23 -16
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +1302 -223
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/efcore/db-deploy.md +1 -1
- package/templates/agents/efcore/migration.md +26 -10
- package/templates/agents/efcore/rebase-snapshot.md +24 -7
- package/templates/agents/efcore/squash.md +73 -57
- package/templates/agents/gitflow/commit.md +138 -18
- package/templates/agents/gitflow/exec.md +1 -1
- package/templates/agents/gitflow/finish.md +79 -62
- package/templates/agents/gitflow/init-clone.md +186 -0
- package/templates/agents/gitflow/init-detect.md +137 -0
- package/templates/agents/gitflow/init-validate.md +210 -0
- package/templates/agents/gitflow/init.md +231 -74
- package/templates/agents/gitflow/merge.md +115 -33
- package/templates/agents/gitflow/pr.md +151 -46
- package/templates/agents/gitflow/start.md +76 -33
- package/templates/agents/gitflow/status.md +41 -71
- package/templates/hooks/appsettings-guard.sh +76 -0
- package/templates/hooks/ef-migration-check.md +1 -1
- package/templates/hooks/hooks.json +9 -0
- package/templates/project/appsettings.json.template +8 -2
- package/templates/project/test-frontend/msw/handlers.ts +58 -0
- package/templates/project/test-frontend/msw/server.ts +25 -0
- package/templates/project/test-frontend/setup.ts +16 -0
- package/templates/project/test-frontend/test-utils.tsx +59 -0
- package/templates/project/test-frontend/vitest.config.ts +31 -0
- package/templates/skills/_resources/config-safety.md +61 -0
- package/templates/skills/_resources/formatting-guide.md +2 -2
- package/templates/skills/application/SKILL.md +12 -3
- package/templates/skills/application/steps/step-04-backend.md +21 -0
- package/templates/skills/application/steps/step-07-tests.md +259 -120
- package/templates/skills/business-analyse/SKILL.md +57 -28
- package/templates/skills/business-analyse/_shared.md +70 -39
- package/templates/skills/business-analyse/html/ba-interactive.html +2596 -0
- package/templates/skills/business-analyse/questionnaire/00-application.md +123 -131
- package/templates/skills/business-analyse/questionnaire/01-context.md +173 -24
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +170 -50
- package/templates/skills/business-analyse/questionnaire/03-scope.md +154 -48
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +1 -1
- package/templates/skills/business-analyse/questionnaire/14-risk-assumptions.md +135 -0
- package/templates/skills/business-analyse/questionnaire/15-success-metrics.md +136 -0
- package/templates/skills/business-analyse/questionnaire.md +55 -46
- package/templates/skills/business-analyse/steps/step-00-init.md +24 -2
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +31 -20
- package/templates/skills/business-analyse/steps/step-03-specify.md +58 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +301 -1
- package/templates/skills/business-analyse/steps/step-06-extract.md +518 -0
- package/templates/skills/check-version/SKILL.md +1 -1
- package/templates/skills/efcore/steps/db/step-deploy.md +22 -3
- package/templates/skills/efcore/steps/db/step-reset.md +27 -4
- package/templates/skills/efcore/steps/db/step-seed.md +46 -2
- package/templates/skills/efcore/steps/db/step-status.md +14 -0
- package/templates/skills/efcore/steps/migration/step-01-check.md +31 -5
- package/templates/skills/efcore/steps/migration/step-02-create.md +20 -4
- package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +60 -0
- package/templates/skills/efcore/steps/shared/step-00-init.md +47 -8
- package/templates/skills/efcore/steps/squash/step-03-create.md +27 -5
- package/templates/skills/gitflow/SKILL.md +91 -29
- package/templates/skills/gitflow/_shared.md +144 -2
- package/templates/skills/gitflow/phases/status.md +11 -1
- package/templates/skills/gitflow/steps/step-commit.md +1 -1
- package/templates/skills/gitflow/steps/step-init.md +202 -39
- package/templates/skills/gitflow/steps/step-pr.md +17 -5
- package/templates/skills/gitflow/templates/config.json +10 -1
- package/templates/skills/ralph-loop/SKILL.md +22 -15
- package/templates/skills/ralph-loop/steps/step-01-task.md +89 -4
- package/templates/skills/ralph-loop/steps/step-02-execute.md +408 -23
- package/templates/skills/ralph-loop/steps/step-03-commit.md +84 -2
- package/templates/skills/ralph-loop/steps/step-04-check.md +235 -6
- package/templates/skills/ralph-loop/steps/step-05-report.md +115 -0
- package/templates/skills/validate-feature/SKILL.md +83 -0
- package/templates/skills/validate-feature/steps/step-01-compile.md +38 -0
- package/templates/skills/validate-feature/steps/step-02-unit-tests.md +45 -0
- package/templates/skills/validate-feature/steps/step-03-integration-tests.md +53 -0
- package/templates/skills/validate-feature/steps/step-04-api-smoke.md +157 -0
|
@@ -0,0 +1,2596 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>{{APPLICATION_NAME}} - Analyse metier</title>
|
|
7
|
+
<style>
|
|
8
|
+
/* ============================================
|
|
9
|
+
DESIGN SYSTEM - SmartStack Business Analysis
|
|
10
|
+
============================================ */
|
|
11
|
+
:root {
|
|
12
|
+
--primary: #6366f1;
|
|
13
|
+
--primary-dark: #4f46e5;
|
|
14
|
+
--primary-light: #818cf8;
|
|
15
|
+
--secondary: #f97316;
|
|
16
|
+
--accent: #06b6d4;
|
|
17
|
+
--bg-dark: #0f172a;
|
|
18
|
+
--bg-card: #1e293b;
|
|
19
|
+
--bg-hover: #334155;
|
|
20
|
+
--bg-input: #151d2e;
|
|
21
|
+
--text: #b8c4d1;
|
|
22
|
+
--text-muted: #8a9bb0;
|
|
23
|
+
--text-bright: #e2e8f0;
|
|
24
|
+
--border: #334155;
|
|
25
|
+
--border-light: #475569;
|
|
26
|
+
--success: #22c55e;
|
|
27
|
+
--warning: #eab308;
|
|
28
|
+
--error: #ef4444;
|
|
29
|
+
--info: #3b82f6;
|
|
30
|
+
--sidebar-width: 280px;
|
|
31
|
+
--header-height: 52px;
|
|
32
|
+
--transition-fast: 0.15s ease;
|
|
33
|
+
--transition-normal: 0.3s ease;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
37
|
+
html { scroll-behavior: smooth; }
|
|
38
|
+
|
|
39
|
+
body {
|
|
40
|
+
font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
|
|
41
|
+
background: var(--bg-dark);
|
|
42
|
+
color: var(--text);
|
|
43
|
+
line-height: 1.7;
|
|
44
|
+
min-height: 100vh;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ============================================
|
|
48
|
+
LAYOUT
|
|
49
|
+
============================================ */
|
|
50
|
+
.app { display: flex; flex-direction: column; min-height: 100vh; }
|
|
51
|
+
|
|
52
|
+
.header {
|
|
53
|
+
background: var(--bg-card);
|
|
54
|
+
border-bottom: 1px solid var(--border);
|
|
55
|
+
height: var(--header-height);
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
padding: 0 1.5rem;
|
|
59
|
+
gap: 1rem;
|
|
60
|
+
position: sticky;
|
|
61
|
+
top: 0;
|
|
62
|
+
z-index: 100;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.header-logo {
|
|
66
|
+
width: 32px; height: 32px;
|
|
67
|
+
background: linear-gradient(135deg, var(--primary), var(--secondary));
|
|
68
|
+
border-radius: 6px;
|
|
69
|
+
display: flex; align-items: center; justify-content: center;
|
|
70
|
+
font-weight: 700; font-size: 0.85rem; color: #fff;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.header-title { font-size: 1rem; font-weight: 600; color: var(--text-bright); }
|
|
75
|
+
.header-sep { width: 1px; height: 24px; background: var(--border); }
|
|
76
|
+
.header-app-name { font-size: 0.9rem; color: var(--primary-light); font-weight: 500; }
|
|
77
|
+
.header-spacer { flex: 1; }
|
|
78
|
+
|
|
79
|
+
.header-actions { display: flex; gap: 0.5rem; }
|
|
80
|
+
|
|
81
|
+
.btn {
|
|
82
|
+
padding: 0.4rem 0.9rem;
|
|
83
|
+
border-radius: 6px;
|
|
84
|
+
border: 1px solid var(--border);
|
|
85
|
+
background: var(--bg-hover);
|
|
86
|
+
color: var(--text);
|
|
87
|
+
font-size: 0.8rem;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
transition: all var(--transition-fast);
|
|
90
|
+
font-family: inherit;
|
|
91
|
+
}
|
|
92
|
+
.btn:hover { border-color: var(--primary); color: var(--text-bright); }
|
|
93
|
+
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
|
|
94
|
+
.btn-primary:hover { background: var(--primary-dark); }
|
|
95
|
+
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
|
|
96
|
+
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.75rem; }
|
|
97
|
+
|
|
98
|
+
.body { display: flex; flex: 1; }
|
|
99
|
+
|
|
100
|
+
/* ============================================
|
|
101
|
+
SIDEBAR - Navigation 5 niveaux
|
|
102
|
+
============================================ */
|
|
103
|
+
.sidebar {
|
|
104
|
+
width: var(--sidebar-width);
|
|
105
|
+
background: var(--bg-card);
|
|
106
|
+
border-right: 1px solid var(--border);
|
|
107
|
+
overflow-y: auto;
|
|
108
|
+
height: calc(100vh - var(--header-height));
|
|
109
|
+
position: sticky;
|
|
110
|
+
top: var(--header-height);
|
|
111
|
+
flex-shrink: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.sidebar::-webkit-scrollbar { width: 4px; }
|
|
115
|
+
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
|
|
116
|
+
|
|
117
|
+
.nav-group { padding: 1rem 0; }
|
|
118
|
+
.nav-group + .nav-group { border-top: 1px solid var(--border); }
|
|
119
|
+
|
|
120
|
+
.nav-group-title {
|
|
121
|
+
font-size: 0.65rem;
|
|
122
|
+
text-transform: uppercase;
|
|
123
|
+
letter-spacing: 0.1em;
|
|
124
|
+
color: var(--text-muted);
|
|
125
|
+
padding: 0 1rem;
|
|
126
|
+
margin-bottom: 0.5rem;
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.nav-item {
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
gap: 0.5rem;
|
|
134
|
+
padding: 0.45rem 1rem;
|
|
135
|
+
color: var(--text);
|
|
136
|
+
text-decoration: none;
|
|
137
|
+
font-size: 0.85rem;
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
transition: all var(--transition-fast);
|
|
140
|
+
border-left: 3px solid transparent;
|
|
141
|
+
}
|
|
142
|
+
.nav-item:hover { background: var(--bg-hover); color: var(--text-bright); }
|
|
143
|
+
.nav-item.active { background: rgba(99,102,241,0.1); border-left-color: var(--primary); color: var(--primary-light); font-weight: 500; }
|
|
144
|
+
|
|
145
|
+
.nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; }
|
|
146
|
+
.nav-item .nav-badge {
|
|
147
|
+
margin-left: auto;
|
|
148
|
+
font-size: 0.65rem;
|
|
149
|
+
background: var(--bg-hover);
|
|
150
|
+
padding: 0.1rem 0.4rem;
|
|
151
|
+
border-radius: 10px;
|
|
152
|
+
color: var(--text-muted);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.nav-children { margin-left: 1.2rem; }
|
|
156
|
+
.nav-children .nav-item { font-size: 0.8rem; padding: 0.3rem 1rem; }
|
|
157
|
+
|
|
158
|
+
/* ============================================
|
|
159
|
+
MAIN CONTENT
|
|
160
|
+
============================================ */
|
|
161
|
+
.main {
|
|
162
|
+
flex: 1;
|
|
163
|
+
padding: 2rem 2.5rem;
|
|
164
|
+
max-width: 960px;
|
|
165
|
+
overflow-y: auto;
|
|
166
|
+
height: calc(100vh - var(--header-height));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.section { margin-bottom: 3rem; }
|
|
170
|
+
.section-title {
|
|
171
|
+
font-size: 1.4rem;
|
|
172
|
+
color: var(--text-bright);
|
|
173
|
+
font-weight: 600;
|
|
174
|
+
margin-bottom: 0.5rem;
|
|
175
|
+
padding-bottom: 0.5rem;
|
|
176
|
+
border-bottom: 2px solid var(--primary);
|
|
177
|
+
}
|
|
178
|
+
.section-subtitle {
|
|
179
|
+
font-size: 0.9rem;
|
|
180
|
+
color: var(--text-muted);
|
|
181
|
+
margin-bottom: 1.5rem;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* ============================================
|
|
185
|
+
EDITABLE CARDS
|
|
186
|
+
============================================ */
|
|
187
|
+
.card {
|
|
188
|
+
background: var(--bg-card);
|
|
189
|
+
border: 1px solid var(--border);
|
|
190
|
+
border-radius: 10px;
|
|
191
|
+
padding: 1.25rem;
|
|
192
|
+
margin-bottom: 1rem;
|
|
193
|
+
transition: border-color var(--transition-fast);
|
|
194
|
+
}
|
|
195
|
+
.card:hover { border-color: var(--border-light); }
|
|
196
|
+
|
|
197
|
+
.card-header {
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
gap: 0.75rem;
|
|
201
|
+
margin-bottom: 0.75rem;
|
|
202
|
+
}
|
|
203
|
+
.card-label {
|
|
204
|
+
font-size: 0.7rem;
|
|
205
|
+
text-transform: uppercase;
|
|
206
|
+
letter-spacing: 0.08em;
|
|
207
|
+
color: var(--text-muted);
|
|
208
|
+
font-weight: 600;
|
|
209
|
+
}
|
|
210
|
+
.card-title {
|
|
211
|
+
font-size: 1.05rem;
|
|
212
|
+
color: var(--text-bright);
|
|
213
|
+
font-weight: 600;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.editable {
|
|
217
|
+
border: 1px dashed transparent;
|
|
218
|
+
border-radius: 6px;
|
|
219
|
+
padding: 0.4rem 0.6rem;
|
|
220
|
+
transition: all var(--transition-fast);
|
|
221
|
+
min-height: 1.5em;
|
|
222
|
+
outline: none;
|
|
223
|
+
}
|
|
224
|
+
.editable:hover { border-color: var(--border-light); background: var(--bg-input); }
|
|
225
|
+
.editable:focus { border-color: var(--primary); background: var(--bg-input); box-shadow: 0 0 0 2px rgba(99,102,241,0.2); }
|
|
226
|
+
.editable[data-placeholder]:empty::before {
|
|
227
|
+
content: attr(data-placeholder);
|
|
228
|
+
color: var(--text-muted);
|
|
229
|
+
font-style: italic;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* ============================================
|
|
233
|
+
PRIORITY BADGES
|
|
234
|
+
============================================ */
|
|
235
|
+
.priority {
|
|
236
|
+
display: inline-flex;
|
|
237
|
+
align-items: center;
|
|
238
|
+
gap: 0.3rem;
|
|
239
|
+
padding: 0.2rem 0.6rem;
|
|
240
|
+
border-radius: 12px;
|
|
241
|
+
font-size: 0.7rem;
|
|
242
|
+
font-weight: 600;
|
|
243
|
+
text-transform: uppercase;
|
|
244
|
+
letter-spacing: 0.05em;
|
|
245
|
+
}
|
|
246
|
+
.priority-vital { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
|
|
247
|
+
.priority-important { background: rgba(234,179,8,0.15); color: #facc15; border: 1px solid rgba(234,179,8,0.3); }
|
|
248
|
+
.priority-optional { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
|
|
249
|
+
.priority-excluded { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
|
|
250
|
+
|
|
251
|
+
/* ============================================
|
|
252
|
+
STATUS BADGES
|
|
253
|
+
============================================ */
|
|
254
|
+
.status {
|
|
255
|
+
display: inline-flex; align-items: center; gap: 0.3rem;
|
|
256
|
+
padding: 0.15rem 0.5rem; border-radius: 10px;
|
|
257
|
+
font-size: 0.7rem; font-weight: 500;
|
|
258
|
+
}
|
|
259
|
+
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
|
|
260
|
+
.status-draft .status-dot { background: var(--text-muted); }
|
|
261
|
+
.status-draft { color: var(--text-muted); }
|
|
262
|
+
.status-progress .status-dot { background: var(--info); }
|
|
263
|
+
.status-progress { color: var(--info); }
|
|
264
|
+
.status-done .status-dot { background: var(--success); }
|
|
265
|
+
.status-done { color: var(--success); }
|
|
266
|
+
|
|
267
|
+
/* ============================================
|
|
268
|
+
USE CASE LIST
|
|
269
|
+
============================================ */
|
|
270
|
+
.uc-list { list-style: none; }
|
|
271
|
+
|
|
272
|
+
.uc-item {
|
|
273
|
+
background: var(--bg-card);
|
|
274
|
+
border: 1px solid var(--border);
|
|
275
|
+
border-radius: 8px;
|
|
276
|
+
padding: 1rem 1.25rem;
|
|
277
|
+
margin-bottom: 0.75rem;
|
|
278
|
+
transition: border-color var(--transition-fast);
|
|
279
|
+
}
|
|
280
|
+
.uc-item:hover { border-color: var(--border-light); }
|
|
281
|
+
|
|
282
|
+
.uc-header {
|
|
283
|
+
display: flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
gap: 0.75rem;
|
|
286
|
+
margin-bottom: 0.5rem;
|
|
287
|
+
}
|
|
288
|
+
.uc-id {
|
|
289
|
+
font-size: 0.7rem;
|
|
290
|
+
font-weight: 700;
|
|
291
|
+
color: var(--primary-light);
|
|
292
|
+
background: rgba(99,102,241,0.1);
|
|
293
|
+
padding: 0.15rem 0.5rem;
|
|
294
|
+
border-radius: 4px;
|
|
295
|
+
}
|
|
296
|
+
.uc-title { font-weight: 600; color: var(--text-bright); flex: 1; }
|
|
297
|
+
.uc-actions { display: flex; gap: 0.3rem; opacity: 0; transition: opacity var(--transition-fast); }
|
|
298
|
+
.uc-item:hover .uc-actions { opacity: 1; }
|
|
299
|
+
|
|
300
|
+
.uc-detail { font-size: 0.875rem; color: var(--text); }
|
|
301
|
+
.uc-detail-label { color: var(--text-muted); font-size: 0.75rem; font-weight: 600; margin-top: 0.5rem; }
|
|
302
|
+
|
|
303
|
+
.uc-actors {
|
|
304
|
+
display: flex; gap: 0.4rem; margin-top: 0.3rem; flex-wrap: wrap;
|
|
305
|
+
}
|
|
306
|
+
.uc-actor {
|
|
307
|
+
font-size: 0.7rem;
|
|
308
|
+
padding: 0.1rem 0.4rem;
|
|
309
|
+
background: rgba(6,182,212,0.1);
|
|
310
|
+
color: var(--accent);
|
|
311
|
+
border-radius: 4px;
|
|
312
|
+
border: 1px solid rgba(6,182,212,0.2);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* ============================================
|
|
316
|
+
BUSINESS RULE LIST
|
|
317
|
+
============================================ */
|
|
318
|
+
.br-item {
|
|
319
|
+
display: flex;
|
|
320
|
+
align-items: flex-start;
|
|
321
|
+
gap: 0.75rem;
|
|
322
|
+
padding: 0.75rem 1rem;
|
|
323
|
+
background: var(--bg-card);
|
|
324
|
+
border: 1px solid var(--border);
|
|
325
|
+
border-radius: 8px;
|
|
326
|
+
margin-bottom: 0.5rem;
|
|
327
|
+
}
|
|
328
|
+
.br-category {
|
|
329
|
+
font-size: 0.65rem;
|
|
330
|
+
font-weight: 700;
|
|
331
|
+
text-transform: uppercase;
|
|
332
|
+
padding: 0.15rem 0.4rem;
|
|
333
|
+
border-radius: 4px;
|
|
334
|
+
flex-shrink: 0;
|
|
335
|
+
min-width: 70px;
|
|
336
|
+
text-align: center;
|
|
337
|
+
}
|
|
338
|
+
.br-cat-validation { background: rgba(99,102,241,0.15); color: var(--primary-light); }
|
|
339
|
+
.br-cat-calculation { background: rgba(234,179,8,0.15); color: #facc15; }
|
|
340
|
+
.br-cat-workflow { background: rgba(249,115,22,0.15); color: var(--secondary); }
|
|
341
|
+
.br-cat-security { background: rgba(239,68,68,0.15); color: #f87171; }
|
|
342
|
+
.br-cat-data { background: rgba(6,182,212,0.15); color: var(--accent); }
|
|
343
|
+
.br-text { flex: 1; font-size: 0.875rem; }
|
|
344
|
+
|
|
345
|
+
/* ============================================
|
|
346
|
+
MOCKUP FRAME
|
|
347
|
+
============================================ */
|
|
348
|
+
.mockup-frame {
|
|
349
|
+
background: var(--bg-card);
|
|
350
|
+
border: 1px solid var(--border);
|
|
351
|
+
border-radius: 12px;
|
|
352
|
+
overflow: hidden;
|
|
353
|
+
margin: 1rem 0;
|
|
354
|
+
}
|
|
355
|
+
.mockup-toolbar {
|
|
356
|
+
background: var(--bg-hover);
|
|
357
|
+
padding: 0.5rem 1rem;
|
|
358
|
+
display: flex;
|
|
359
|
+
align-items: center;
|
|
360
|
+
gap: 0.5rem;
|
|
361
|
+
border-bottom: 1px solid var(--border);
|
|
362
|
+
}
|
|
363
|
+
.mockup-dot { width: 8px; height: 8px; border-radius: 50%; }
|
|
364
|
+
.mockup-dot-red { background: #ef4444; }
|
|
365
|
+
.mockup-dot-yellow { background: #eab308; }
|
|
366
|
+
.mockup-dot-green { background: #22c55e; }
|
|
367
|
+
.mockup-title {
|
|
368
|
+
font-size: 0.75rem; color: var(--text-muted);
|
|
369
|
+
margin-left: 0.5rem;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.mockup-content {
|
|
373
|
+
padding: 1.5rem;
|
|
374
|
+
min-height: 200px;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* Mockup components */
|
|
378
|
+
.mock-header {
|
|
379
|
+
display: flex;
|
|
380
|
+
align-items: center;
|
|
381
|
+
justify-content: space-between;
|
|
382
|
+
margin-bottom: 1rem;
|
|
383
|
+
padding-bottom: 0.75rem;
|
|
384
|
+
border-bottom: 1px solid var(--border);
|
|
385
|
+
}
|
|
386
|
+
.mock-title { font-size: 1.1rem; font-weight: 600; color: var(--text-bright); }
|
|
387
|
+
.mock-btn {
|
|
388
|
+
padding: 0.35rem 0.8rem;
|
|
389
|
+
background: var(--primary);
|
|
390
|
+
color: #fff;
|
|
391
|
+
border-radius: 6px;
|
|
392
|
+
font-size: 0.8rem;
|
|
393
|
+
font-weight: 500;
|
|
394
|
+
}
|
|
395
|
+
.mock-search {
|
|
396
|
+
display: flex; align-items: center; gap: 0.5rem;
|
|
397
|
+
padding: 0.4rem 0.8rem;
|
|
398
|
+
background: var(--bg-input);
|
|
399
|
+
border: 1px solid var(--border);
|
|
400
|
+
border-radius: 6px;
|
|
401
|
+
margin-bottom: 1rem;
|
|
402
|
+
color: var(--text-muted);
|
|
403
|
+
font-size: 0.8rem;
|
|
404
|
+
}
|
|
405
|
+
.mock-table {
|
|
406
|
+
width: 100%;
|
|
407
|
+
border-collapse: collapse;
|
|
408
|
+
}
|
|
409
|
+
.mock-table th {
|
|
410
|
+
text-align: left;
|
|
411
|
+
font-size: 0.7rem;
|
|
412
|
+
text-transform: uppercase;
|
|
413
|
+
letter-spacing: 0.05em;
|
|
414
|
+
color: var(--text-muted);
|
|
415
|
+
padding: 0.5rem 0.75rem;
|
|
416
|
+
border-bottom: 1px solid var(--border);
|
|
417
|
+
font-weight: 600;
|
|
418
|
+
}
|
|
419
|
+
.mock-table td {
|
|
420
|
+
padding: 0.6rem 0.75rem;
|
|
421
|
+
font-size: 0.85rem;
|
|
422
|
+
border-bottom: 1px solid rgba(51,65,85,0.5);
|
|
423
|
+
}
|
|
424
|
+
.mock-table tr:hover td { background: rgba(99,102,241,0.05); }
|
|
425
|
+
|
|
426
|
+
.mock-status {
|
|
427
|
+
display: inline-flex; align-items: center; gap: 0.3rem;
|
|
428
|
+
padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.75rem;
|
|
429
|
+
}
|
|
430
|
+
.mock-status-active { background: rgba(34,197,94,0.15); color: #4ade80; }
|
|
431
|
+
.mock-status-pending { background: rgba(234,179,8,0.15); color: #facc15; }
|
|
432
|
+
.mock-status-draft { background: rgba(100,116,139,0.15); color: #94a3b8; }
|
|
433
|
+
|
|
434
|
+
.mock-form-group { margin-bottom: 1rem; }
|
|
435
|
+
.mock-label {
|
|
436
|
+
display: block;
|
|
437
|
+
font-size: 0.75rem;
|
|
438
|
+
color: var(--text-muted);
|
|
439
|
+
margin-bottom: 0.3rem;
|
|
440
|
+
font-weight: 500;
|
|
441
|
+
}
|
|
442
|
+
.mock-input {
|
|
443
|
+
width: 100%;
|
|
444
|
+
padding: 0.5rem 0.75rem;
|
|
445
|
+
background: var(--bg-input);
|
|
446
|
+
border: 1px solid var(--border);
|
|
447
|
+
border-radius: 6px;
|
|
448
|
+
color: var(--text);
|
|
449
|
+
font-size: 0.85rem;
|
|
450
|
+
}
|
|
451
|
+
.mock-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
|
|
452
|
+
.mock-form-actions {
|
|
453
|
+
display: flex; gap: 0.5rem; justify-content: flex-end;
|
|
454
|
+
padding-top: 1rem; border-top: 1px solid var(--border);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/* Dashboard mockup */
|
|
458
|
+
.mock-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
|
|
459
|
+
.mock-kpi {
|
|
460
|
+
background: var(--bg-hover);
|
|
461
|
+
border-radius: 8px;
|
|
462
|
+
padding: 0.75rem;
|
|
463
|
+
text-align: center;
|
|
464
|
+
}
|
|
465
|
+
.mock-kpi-value { font-size: 1.3rem; font-weight: 700; color: var(--text-bright); }
|
|
466
|
+
.mock-kpi-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }
|
|
467
|
+
.mock-chart-placeholder {
|
|
468
|
+
height: 150px;
|
|
469
|
+
background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(6,182,212,0.05));
|
|
470
|
+
border: 1px dashed var(--border);
|
|
471
|
+
border-radius: 8px;
|
|
472
|
+
display: flex; align-items: center; justify-content: center;
|
|
473
|
+
color: var(--text-muted); font-size: 0.85rem;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/* ============================================
|
|
477
|
+
ADD BUTTON
|
|
478
|
+
============================================ */
|
|
479
|
+
.add-btn {
|
|
480
|
+
display: flex;
|
|
481
|
+
align-items: center;
|
|
482
|
+
justify-content: center;
|
|
483
|
+
gap: 0.5rem;
|
|
484
|
+
width: 100%;
|
|
485
|
+
padding: 0.75rem;
|
|
486
|
+
border: 2px dashed var(--border);
|
|
487
|
+
border-radius: 8px;
|
|
488
|
+
background: transparent;
|
|
489
|
+
color: var(--text-muted);
|
|
490
|
+
font-size: 0.85rem;
|
|
491
|
+
cursor: pointer;
|
|
492
|
+
transition: all var(--transition-fast);
|
|
493
|
+
font-family: inherit;
|
|
494
|
+
}
|
|
495
|
+
.add-btn:hover {
|
|
496
|
+
border-color: var(--primary);
|
|
497
|
+
color: var(--primary-light);
|
|
498
|
+
background: rgba(99,102,241,0.05);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/* ============================================
|
|
502
|
+
INLINE FORM (for adding items)
|
|
503
|
+
============================================ */
|
|
504
|
+
.inline-form {
|
|
505
|
+
background: var(--bg-card);
|
|
506
|
+
border: 2px solid var(--primary);
|
|
507
|
+
border-radius: 10px;
|
|
508
|
+
padding: 1.25rem;
|
|
509
|
+
margin-bottom: 1rem;
|
|
510
|
+
display: none;
|
|
511
|
+
}
|
|
512
|
+
.inline-form.visible { display: block; }
|
|
513
|
+
.inline-form-title {
|
|
514
|
+
font-size: 0.9rem;
|
|
515
|
+
font-weight: 600;
|
|
516
|
+
color: var(--primary-light);
|
|
517
|
+
margin-bottom: 1rem;
|
|
518
|
+
}
|
|
519
|
+
.form-group { margin-bottom: 0.75rem; }
|
|
520
|
+
.form-label {
|
|
521
|
+
display: block;
|
|
522
|
+
font-size: 0.75rem;
|
|
523
|
+
color: var(--text-muted);
|
|
524
|
+
margin-bottom: 0.3rem;
|
|
525
|
+
font-weight: 500;
|
|
526
|
+
}
|
|
527
|
+
.form-input, .form-textarea, .form-select {
|
|
528
|
+
width: 100%;
|
|
529
|
+
padding: 0.5rem 0.75rem;
|
|
530
|
+
background: var(--bg-input);
|
|
531
|
+
border: 1px solid var(--border);
|
|
532
|
+
border-radius: 6px;
|
|
533
|
+
color: var(--text);
|
|
534
|
+
font-size: 0.85rem;
|
|
535
|
+
font-family: inherit;
|
|
536
|
+
transition: border-color var(--transition-fast);
|
|
537
|
+
}
|
|
538
|
+
.form-input:focus, .form-textarea:focus, .form-select:focus {
|
|
539
|
+
outline: none;
|
|
540
|
+
border-color: var(--primary);
|
|
541
|
+
box-shadow: 0 0 0 2px rgba(99,102,241,0.2);
|
|
542
|
+
}
|
|
543
|
+
.form-textarea { min-height: 80px; resize: vertical; }
|
|
544
|
+
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
|
|
545
|
+
.form-actions {
|
|
546
|
+
display: flex; gap: 0.5rem; justify-content: flex-end;
|
|
547
|
+
margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/* ============================================
|
|
551
|
+
STAKEHOLDER TABLE
|
|
552
|
+
============================================ */
|
|
553
|
+
.stakeholder-grid {
|
|
554
|
+
display: grid;
|
|
555
|
+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
556
|
+
gap: 1rem;
|
|
557
|
+
}
|
|
558
|
+
.stakeholder-card {
|
|
559
|
+
background: var(--bg-card);
|
|
560
|
+
border: 1px solid var(--border);
|
|
561
|
+
border-radius: 10px;
|
|
562
|
+
padding: 1rem;
|
|
563
|
+
}
|
|
564
|
+
.stakeholder-card:hover { border-color: var(--border-light); }
|
|
565
|
+
.stakeholder-role { font-weight: 600; color: var(--text-bright); margin-bottom: 0.25rem; }
|
|
566
|
+
.stakeholder-function { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
|
|
567
|
+
.stakeholder-tasks { list-style: none; }
|
|
568
|
+
.stakeholder-tasks li {
|
|
569
|
+
font-size: 0.8rem;
|
|
570
|
+
padding: 0.15rem 0;
|
|
571
|
+
color: var(--text);
|
|
572
|
+
}
|
|
573
|
+
.stakeholder-tasks li::before { content: "- "; color: var(--primary-light); }
|
|
574
|
+
.stakeholder-meta {
|
|
575
|
+
display: flex; gap: 0.75rem; margin-top: 0.5rem; padding-top: 0.5rem;
|
|
576
|
+
border-top: 1px solid var(--border);
|
|
577
|
+
}
|
|
578
|
+
.stakeholder-meta span { font-size: 0.7rem; color: var(--text-muted); }
|
|
579
|
+
|
|
580
|
+
/* ============================================
|
|
581
|
+
PROCESS FLOW
|
|
582
|
+
============================================ */
|
|
583
|
+
.process-flow {
|
|
584
|
+
display: flex;
|
|
585
|
+
align-items: center;
|
|
586
|
+
gap: 0.25rem;
|
|
587
|
+
overflow-x: auto;
|
|
588
|
+
padding: 1rem 0;
|
|
589
|
+
}
|
|
590
|
+
.process-step {
|
|
591
|
+
background: var(--bg-card);
|
|
592
|
+
border: 1px solid var(--border);
|
|
593
|
+
border-radius: 8px;
|
|
594
|
+
padding: 0.75rem 1rem;
|
|
595
|
+
min-width: 140px;
|
|
596
|
+
text-align: center;
|
|
597
|
+
flex-shrink: 0;
|
|
598
|
+
}
|
|
599
|
+
.process-step:hover { border-color: var(--primary); }
|
|
600
|
+
.process-step-number {
|
|
601
|
+
font-size: 0.65rem;
|
|
602
|
+
color: var(--primary-light);
|
|
603
|
+
font-weight: 700;
|
|
604
|
+
}
|
|
605
|
+
.process-step-label { font-size: 0.8rem; color: var(--text-bright); font-weight: 500; }
|
|
606
|
+
.process-arrow { color: var(--text-muted); font-size: 1.2rem; flex-shrink: 0; }
|
|
607
|
+
|
|
608
|
+
/* ============================================
|
|
609
|
+
RISK TABLE
|
|
610
|
+
============================================ */
|
|
611
|
+
.risk-item {
|
|
612
|
+
display: grid;
|
|
613
|
+
grid-template-columns: auto 1fr auto auto;
|
|
614
|
+
gap: 1rem;
|
|
615
|
+
align-items: center;
|
|
616
|
+
padding: 0.75rem 1rem;
|
|
617
|
+
background: var(--bg-card);
|
|
618
|
+
border: 1px solid var(--border);
|
|
619
|
+
border-radius: 8px;
|
|
620
|
+
margin-bottom: 0.5rem;
|
|
621
|
+
}
|
|
622
|
+
.risk-level {
|
|
623
|
+
width: 10px; height: 10px;
|
|
624
|
+
border-radius: 50%;
|
|
625
|
+
}
|
|
626
|
+
.risk-critical { background: var(--error); }
|
|
627
|
+
.risk-medium { background: var(--warning); }
|
|
628
|
+
.risk-low { background: var(--success); }
|
|
629
|
+
.risk-text { font-size: 0.875rem; }
|
|
630
|
+
.risk-probability, .risk-impact {
|
|
631
|
+
font-size: 0.7rem;
|
|
632
|
+
color: var(--text-muted);
|
|
633
|
+
text-align: center;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/* ============================================
|
|
637
|
+
NOTIFICATION BAR
|
|
638
|
+
============================================ */
|
|
639
|
+
.notification {
|
|
640
|
+
position: fixed;
|
|
641
|
+
bottom: 1.5rem;
|
|
642
|
+
right: 1.5rem;
|
|
643
|
+
padding: 0.75rem 1.25rem;
|
|
644
|
+
border-radius: 8px;
|
|
645
|
+
font-size: 0.85rem;
|
|
646
|
+
font-weight: 500;
|
|
647
|
+
z-index: 200;
|
|
648
|
+
transform: translateY(100px);
|
|
649
|
+
opacity: 0;
|
|
650
|
+
transition: all 0.3s ease;
|
|
651
|
+
}
|
|
652
|
+
.notification.visible { transform: translateY(0); opacity: 1; }
|
|
653
|
+
.notification-success { background: var(--success); color: #fff; }
|
|
654
|
+
.notification-info { background: var(--info); color: #fff; }
|
|
655
|
+
|
|
656
|
+
/* ============================================
|
|
657
|
+
MODULE CARDS (Decomposition)
|
|
658
|
+
============================================ */
|
|
659
|
+
.module-grid {
|
|
660
|
+
display: grid;
|
|
661
|
+
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
662
|
+
gap: 1rem;
|
|
663
|
+
}
|
|
664
|
+
.module-card {
|
|
665
|
+
background: var(--bg-card);
|
|
666
|
+
border: 1px solid var(--border);
|
|
667
|
+
border-radius: 10px;
|
|
668
|
+
padding: 1rem;
|
|
669
|
+
cursor: pointer;
|
|
670
|
+
transition: all var(--transition-fast);
|
|
671
|
+
position: relative;
|
|
672
|
+
}
|
|
673
|
+
.module-card:hover { border-color: var(--primary); }
|
|
674
|
+
.module-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99,102,241,0.2); }
|
|
675
|
+
.module-card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 0.5rem; }
|
|
676
|
+
.module-card-code { font-weight: 700; color: var(--text-bright); font-size: 1rem; }
|
|
677
|
+
.module-card-type {
|
|
678
|
+
font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em;
|
|
679
|
+
padding: 0.15rem 0.5rem; border-radius: 4px;
|
|
680
|
+
background: rgba(99,102,241,0.1); color: var(--primary-light);
|
|
681
|
+
}
|
|
682
|
+
.module-card-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
|
|
683
|
+
.module-card-meta { display: flex; gap: 0.75rem; font-size: 0.7rem; color: var(--text-muted); }
|
|
684
|
+
.module-card-meta span { display: flex; align-items: center; gap: 0.2rem; }
|
|
685
|
+
.module-card-remove {
|
|
686
|
+
position: absolute; top: 0.5rem; right: 0.5rem;
|
|
687
|
+
background: none; border: none; color: var(--text-muted);
|
|
688
|
+
cursor: pointer; font-size: 0.8rem; opacity: 0;
|
|
689
|
+
transition: opacity var(--transition-fast);
|
|
690
|
+
}
|
|
691
|
+
.module-card:hover .module-card-remove { opacity: 1; }
|
|
692
|
+
.module-card-remove:hover { color: var(--error); }
|
|
693
|
+
|
|
694
|
+
/* ============================================
|
|
695
|
+
TABS (Module Specification)
|
|
696
|
+
============================================ */
|
|
697
|
+
.tab-bar {
|
|
698
|
+
display: flex;
|
|
699
|
+
gap: 0;
|
|
700
|
+
border-bottom: 1px solid var(--border);
|
|
701
|
+
margin-bottom: 1.5rem;
|
|
702
|
+
overflow-x: auto;
|
|
703
|
+
}
|
|
704
|
+
.tab-btn {
|
|
705
|
+
padding: 0.6rem 1rem;
|
|
706
|
+
background: none;
|
|
707
|
+
border: none;
|
|
708
|
+
border-bottom: 2px solid transparent;
|
|
709
|
+
color: var(--text-muted);
|
|
710
|
+
font-size: 0.8rem;
|
|
711
|
+
font-family: inherit;
|
|
712
|
+
cursor: pointer;
|
|
713
|
+
white-space: nowrap;
|
|
714
|
+
transition: all var(--transition-fast);
|
|
715
|
+
}
|
|
716
|
+
.tab-btn:hover { color: var(--text-bright); background: var(--bg-hover); }
|
|
717
|
+
.tab-btn.active { color: var(--primary-light); border-bottom-color: var(--primary); font-weight: 500; }
|
|
718
|
+
.tab-panel { display: none; }
|
|
719
|
+
.tab-panel.active { display: block; }
|
|
720
|
+
|
|
721
|
+
/* ============================================
|
|
722
|
+
ENTITY TABLE
|
|
723
|
+
============================================ */
|
|
724
|
+
.entity-block {
|
|
725
|
+
background: var(--bg-card);
|
|
726
|
+
border: 1px solid var(--border);
|
|
727
|
+
border-radius: 10px;
|
|
728
|
+
margin-bottom: 1rem;
|
|
729
|
+
overflow: hidden;
|
|
730
|
+
}
|
|
731
|
+
.entity-header {
|
|
732
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
733
|
+
padding: 0.75rem 1rem;
|
|
734
|
+
background: var(--bg-hover);
|
|
735
|
+
border-bottom: 1px solid var(--border);
|
|
736
|
+
}
|
|
737
|
+
.entity-name { font-weight: 600; color: var(--text-bright); }
|
|
738
|
+
.entity-desc { font-size: 0.8rem; color: var(--text-muted); }
|
|
739
|
+
.attr-table { width: 100%; border-collapse: collapse; }
|
|
740
|
+
.attr-table th {
|
|
741
|
+
text-align: left; font-size: 0.7rem; text-transform: uppercase;
|
|
742
|
+
letter-spacing: 0.05em; color: var(--text-muted); padding: 0.5rem 0.75rem;
|
|
743
|
+
border-bottom: 1px solid var(--border); font-weight: 600;
|
|
744
|
+
}
|
|
745
|
+
.attr-table td {
|
|
746
|
+
padding: 0.5rem 0.75rem; font-size: 0.85rem;
|
|
747
|
+
border-bottom: 1px solid rgba(51,65,85,0.3);
|
|
748
|
+
}
|
|
749
|
+
.attr-required { color: var(--error); font-weight: 700; }
|
|
750
|
+
|
|
751
|
+
/* ============================================
|
|
752
|
+
DEPENDENCY VISUALIZATION
|
|
753
|
+
============================================ */
|
|
754
|
+
.dep-graph {
|
|
755
|
+
display: flex; flex-direction: column; gap: 1.5rem;
|
|
756
|
+
padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border);
|
|
757
|
+
border-radius: 10px;
|
|
758
|
+
}
|
|
759
|
+
.dep-layer {
|
|
760
|
+
display: flex; align-items: center; gap: 1rem;
|
|
761
|
+
}
|
|
762
|
+
.dep-layer-label {
|
|
763
|
+
font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase;
|
|
764
|
+
letter-spacing: 0.05em; min-width: 80px; font-weight: 600;
|
|
765
|
+
}
|
|
766
|
+
.dep-layer-modules { display: flex; gap: 0.75rem; flex-wrap: wrap; }
|
|
767
|
+
.dep-module {
|
|
768
|
+
padding: 0.4rem 0.8rem; border-radius: 6px;
|
|
769
|
+
background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.3);
|
|
770
|
+
color: var(--primary-light); font-size: 0.8rem; font-weight: 500;
|
|
771
|
+
}
|
|
772
|
+
.dep-arrow {
|
|
773
|
+
text-align: center; color: var(--text-muted); font-size: 1.2rem;
|
|
774
|
+
padding-left: 80px;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/* ============================================
|
|
778
|
+
PHASE PROGRESS
|
|
779
|
+
============================================ */
|
|
780
|
+
.phase-progress {
|
|
781
|
+
display: flex; align-items: center; gap: 0.3rem;
|
|
782
|
+
padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
|
|
783
|
+
}
|
|
784
|
+
.phase-dot {
|
|
785
|
+
width: 24px; height: 24px; border-radius: 50%;
|
|
786
|
+
display: flex; align-items: center; justify-content: center;
|
|
787
|
+
font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
|
|
788
|
+
background: var(--bg-hover); border: 2px solid var(--border);
|
|
789
|
+
transition: all var(--transition-fast);
|
|
790
|
+
}
|
|
791
|
+
.phase-dot.completed { background: var(--success); border-color: var(--success); color: #fff; }
|
|
792
|
+
.phase-dot.current { background: var(--primary); border-color: var(--primary); color: #fff; }
|
|
793
|
+
.phase-line { flex: 1; height: 2px; background: var(--border); }
|
|
794
|
+
.phase-line.completed { background: var(--success); }
|
|
795
|
+
|
|
796
|
+
/* ============================================
|
|
797
|
+
STAT CARDS (Handoff)
|
|
798
|
+
============================================ */
|
|
799
|
+
.stat-grid {
|
|
800
|
+
display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
801
|
+
gap: 1rem; margin-bottom: 1.5rem;
|
|
802
|
+
}
|
|
803
|
+
.stat-card {
|
|
804
|
+
background: var(--bg-card); border: 1px solid var(--border);
|
|
805
|
+
border-radius: 10px; padding: 1rem; text-align: center;
|
|
806
|
+
}
|
|
807
|
+
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--text-bright); }
|
|
808
|
+
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
|
|
809
|
+
|
|
810
|
+
/* ============================================
|
|
811
|
+
CONSOLIDATION
|
|
812
|
+
============================================ */
|
|
813
|
+
.interaction-item {
|
|
814
|
+
display: flex; align-items: center; gap: 0.75rem;
|
|
815
|
+
padding: 0.75rem 1rem; background: var(--bg-card);
|
|
816
|
+
border: 1px solid var(--border); border-radius: 8px;
|
|
817
|
+
margin-bottom: 0.5rem; font-size: 0.85rem;
|
|
818
|
+
}
|
|
819
|
+
.interaction-arrow { color: var(--primary-light); font-weight: 700; font-size: 1.1rem; }
|
|
820
|
+
.interaction-type {
|
|
821
|
+
font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em;
|
|
822
|
+
padding: 0.15rem 0.4rem; border-radius: 4px;
|
|
823
|
+
background: rgba(6,182,212,0.1); color: var(--accent);
|
|
824
|
+
}
|
|
825
|
+
.e2e-flow {
|
|
826
|
+
display: flex; align-items: center; gap: 0.3rem;
|
|
827
|
+
overflow-x: auto; padding: 1rem 0;
|
|
828
|
+
}
|
|
829
|
+
.e2e-step {
|
|
830
|
+
padding: 0.5rem 0.75rem; border-radius: 6px; text-align: center;
|
|
831
|
+
font-size: 0.75rem; flex-shrink: 0;
|
|
832
|
+
background: var(--bg-card); border: 1px solid var(--border);
|
|
833
|
+
}
|
|
834
|
+
.e2e-step-module { font-weight: 600; color: var(--primary-light); font-size: 0.65rem; }
|
|
835
|
+
.e2e-step-action { color: var(--text-bright); }
|
|
836
|
+
|
|
837
|
+
/* ============================================
|
|
838
|
+
RESPONSIVE
|
|
839
|
+
============================================ */
|
|
840
|
+
@media (max-width: 768px) {
|
|
841
|
+
.sidebar { display: none; }
|
|
842
|
+
.main { padding: 1rem; }
|
|
843
|
+
.mock-kpi-grid { grid-template-columns: repeat(2, 1fr); }
|
|
844
|
+
.form-row { grid-template-columns: 1fr; }
|
|
845
|
+
.stakeholder-grid { grid-template-columns: 1fr; }
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/* ============================================
|
|
849
|
+
PRINT
|
|
850
|
+
============================================ */
|
|
851
|
+
@media print {
|
|
852
|
+
.sidebar, .header-actions, .add-btn, .uc-actions, .inline-form, .module-card-remove, .phase-progress { display: none !important; }
|
|
853
|
+
.main { max-width: 100%; padding: 0; }
|
|
854
|
+
.section { display: block !important; page-break-inside: avoid; }
|
|
855
|
+
body { background: #fff; color: #1a1a1a; }
|
|
856
|
+
.card, .uc-item, .br-item, .module-card, .entity-block, .interaction-item { border-color: #ddd; }
|
|
857
|
+
.tab-panel { display: block !important; }
|
|
858
|
+
.tab-bar { display: none; }
|
|
859
|
+
}
|
|
860
|
+
</style>
|
|
861
|
+
</head>
|
|
862
|
+
<body>
|
|
863
|
+
<div class="app">
|
|
864
|
+
<!-- ============================================
|
|
865
|
+
HEADER
|
|
866
|
+
============================================ -->
|
|
867
|
+
<header class="header">
|
|
868
|
+
<div class="header-logo">BA</div>
|
|
869
|
+
<span class="header-title">Analyse metier</span>
|
|
870
|
+
<div class="header-sep"></div>
|
|
871
|
+
<span class="header-app-name" id="appName">{{APPLICATION_NAME}}</span>
|
|
872
|
+
<div class="header-spacer"></div>
|
|
873
|
+
<div class="header-actions">
|
|
874
|
+
<button class="btn btn-sm" onclick="saveToLocalStorage()" title="Sauvegarder les modifications dans le navigateur">Sauvegarder</button>
|
|
875
|
+
<button class="btn btn-sm btn-primary" onclick="exportJSON()" title="Exporter les donnees au format JSON pour l'extraction">Exporter JSON</button>
|
|
876
|
+
</div>
|
|
877
|
+
</header>
|
|
878
|
+
|
|
879
|
+
<div class="body">
|
|
880
|
+
<!-- ============================================
|
|
881
|
+
SIDEBAR - Navigation 5 niveaux
|
|
882
|
+
============================================ -->
|
|
883
|
+
<aside class="sidebar">
|
|
884
|
+
<!-- Phase Progress -->
|
|
885
|
+
<div class="phase-progress">
|
|
886
|
+
<div class="phase-dot current" id="phase-1" title="Cadrage">1</div>
|
|
887
|
+
<div class="phase-line" id="pline-1"></div>
|
|
888
|
+
<div class="phase-dot" id="phase-2" title="Decomposition">2</div>
|
|
889
|
+
<div class="phase-line" id="pline-2"></div>
|
|
890
|
+
<div class="phase-dot" id="phase-3" title="Specification">3</div>
|
|
891
|
+
<div class="phase-line" id="pline-3"></div>
|
|
892
|
+
<div class="phase-dot" id="phase-4" title="Consolidation">4</div>
|
|
893
|
+
<div class="phase-line" id="pline-4"></div>
|
|
894
|
+
<div class="phase-dot" id="phase-5" title="Synthese">5</div>
|
|
895
|
+
</div>
|
|
896
|
+
|
|
897
|
+
<!-- Phase 1 : Cadrage -->
|
|
898
|
+
<div class="nav-group">
|
|
899
|
+
<div class="nav-group-title">1. Cadrage</div>
|
|
900
|
+
<a class="nav-item active" onclick="showSection('cadrage-problem')" data-section="cadrage-problem">
|
|
901
|
+
<span class="nav-icon">●</span> Probleme a resoudre
|
|
902
|
+
</a>
|
|
903
|
+
<a class="nav-item" onclick="showSection('cadrage-current')" data-section="cadrage-current">
|
|
904
|
+
<span class="nav-icon">●</span> Situation actuelle
|
|
905
|
+
</a>
|
|
906
|
+
<a class="nav-item" onclick="showSection('cadrage-vision')" data-section="cadrage-vision">
|
|
907
|
+
<span class="nav-icon">●</span> Situation souhaitee
|
|
908
|
+
</a>
|
|
909
|
+
<a class="nav-item" onclick="showSection('cadrage-stakeholders')" data-section="cadrage-stakeholders">
|
|
910
|
+
<span class="nav-icon">●</span> Parties prenantes
|
|
911
|
+
<span class="nav-badge" id="stakeholderCount">0</span>
|
|
912
|
+
</a>
|
|
913
|
+
<a class="nav-item" onclick="showSection('cadrage-scope')" data-section="cadrage-scope">
|
|
914
|
+
<span class="nav-icon">●</span> Perimetre fonctionnel
|
|
915
|
+
</a>
|
|
916
|
+
<a class="nav-item" onclick="showSection('cadrage-risks')" data-section="cadrage-risks">
|
|
917
|
+
<span class="nav-icon">●</span> Risques et hypotheses
|
|
918
|
+
</a>
|
|
919
|
+
<a class="nav-item" onclick="showSection('cadrage-success')" data-section="cadrage-success">
|
|
920
|
+
<span class="nav-icon">●</span> Criteres de reussite
|
|
921
|
+
</a>
|
|
922
|
+
</div>
|
|
923
|
+
|
|
924
|
+
<!-- Phase 2 : Decomposition -->
|
|
925
|
+
<div class="nav-group">
|
|
926
|
+
<div class="nav-group-title">2. Decomposition</div>
|
|
927
|
+
<a class="nav-item" onclick="showSection('decomp-modules')" data-section="decomp-modules">
|
|
928
|
+
<span class="nav-icon">●</span> Domaines fonctionnels
|
|
929
|
+
<span class="nav-badge" id="moduleCount">0</span>
|
|
930
|
+
</a>
|
|
931
|
+
<a class="nav-item" onclick="showSection('decomp-dependencies')" data-section="decomp-dependencies">
|
|
932
|
+
<span class="nav-icon">●</span> Dependances
|
|
933
|
+
</a>
|
|
934
|
+
</div>
|
|
935
|
+
|
|
936
|
+
<!-- Phase 3 : Specification par module -->
|
|
937
|
+
<div class="nav-group" id="modulesNav">
|
|
938
|
+
<div class="nav-group-title">3. Specification</div>
|
|
939
|
+
<!-- Populated dynamically per module -->
|
|
940
|
+
</div>
|
|
941
|
+
|
|
942
|
+
<!-- Phase 4 : Consolidation -->
|
|
943
|
+
<div class="nav-group">
|
|
944
|
+
<div class="nav-group-title">4. Consolidation</div>
|
|
945
|
+
<a class="nav-item" onclick="showSection('consol-interactions')" data-section="consol-interactions">
|
|
946
|
+
<span class="nav-icon">●</span> Interactions
|
|
947
|
+
</a>
|
|
948
|
+
<a class="nav-item" onclick="showSection('consol-permissions')" data-section="consol-permissions">
|
|
949
|
+
<span class="nav-icon">●</span> Coherence des acces
|
|
950
|
+
</a>
|
|
951
|
+
<a class="nav-item" onclick="showSection('consol-flows')" data-section="consol-flows">
|
|
952
|
+
<span class="nav-icon">●</span> Parcours bout en bout
|
|
953
|
+
</a>
|
|
954
|
+
</div>
|
|
955
|
+
|
|
956
|
+
<!-- Phase 5 : Synthese -->
|
|
957
|
+
<div class="nav-group">
|
|
958
|
+
<div class="nav-group-title">5. Synthese</div>
|
|
959
|
+
<a class="nav-item" onclick="showSection('handoff-summary')" data-section="handoff-summary">
|
|
960
|
+
<span class="nav-icon">●</span> Vue d'ensemble
|
|
961
|
+
</a>
|
|
962
|
+
</div>
|
|
963
|
+
</aside>
|
|
964
|
+
|
|
965
|
+
<!-- ============================================
|
|
966
|
+
MAIN CONTENT
|
|
967
|
+
============================================ -->
|
|
968
|
+
<main class="main" id="mainContent">
|
|
969
|
+
|
|
970
|
+
<!-- SECTION: Probleme a resoudre -->
|
|
971
|
+
<div class="section" id="cadrage-problem">
|
|
972
|
+
<h2 class="section-title">Probleme a resoudre</h2>
|
|
973
|
+
<p class="section-subtitle">Decrivez le probleme principal que ce projet doit resoudre. Soyez le plus concret possible.</p>
|
|
974
|
+
|
|
975
|
+
<div class="card">
|
|
976
|
+
<div class="card-label">Description du probleme</div>
|
|
977
|
+
<div class="editable" contenteditable="true" data-field="problem.description" data-placeholder="Decrivez le probleme que vous rencontrez aujourd'hui. Qu'est-ce qui ne fonctionne pas, ou pas assez bien ?"></div>
|
|
978
|
+
</div>
|
|
979
|
+
|
|
980
|
+
<div class="card">
|
|
981
|
+
<div class="card-label">Qui est le plus impacte ?</div>
|
|
982
|
+
<div class="editable" contenteditable="true" data-field="problem.impactedPeople" data-placeholder="Quelles personnes souffrent le plus de ce probleme au quotidien ? Quel impact sur leur travail ?"></div>
|
|
983
|
+
</div>
|
|
984
|
+
|
|
985
|
+
<div class="card">
|
|
986
|
+
<div class="card-label">Depuis quand ce probleme existe-t-il ?</div>
|
|
987
|
+
<div class="editable" contenteditable="true" data-field="problem.history" data-placeholder="Depuis combien de temps ce probleme existe-t-il ? A-t-il empire recemment ?"></div>
|
|
988
|
+
</div>
|
|
989
|
+
|
|
990
|
+
<div class="card">
|
|
991
|
+
<div class="card-label">Evenement declencheur</div>
|
|
992
|
+
<div class="editable" contenteditable="true" data-field="problem.trigger" data-placeholder="Qu'est-ce qui a declenche cette demande maintenant ? Pourquoi pas il y a 6 mois ?"></div>
|
|
993
|
+
</div>
|
|
994
|
+
|
|
995
|
+
<div class="card">
|
|
996
|
+
<div class="card-label">Consequences si le projet n'est pas realise</div>
|
|
997
|
+
<div class="editable" contenteditable="true" data-field="problem.consequences" data-placeholder="Que se passerait-il si ce projet n'etait PAS realise ? Quelles consequences a court et moyen terme ?"></div>
|
|
998
|
+
</div>
|
|
999
|
+
</div>
|
|
1000
|
+
|
|
1001
|
+
<!-- SECTION: Situation actuelle -->
|
|
1002
|
+
<div class="section" id="cadrage-current" style="display:none;">
|
|
1003
|
+
<h2 class="section-title">Situation actuelle</h2>
|
|
1004
|
+
<p class="section-subtitle">Comment les choses se passent aujourd'hui, concretement.</p>
|
|
1005
|
+
|
|
1006
|
+
<div class="card">
|
|
1007
|
+
<div class="card-label">Outils et methodes utilises aujourd'hui</div>
|
|
1008
|
+
<div class="editable" contenteditable="true" data-field="current.tools" data-placeholder="Comment gerez-vous ce sujet aujourd'hui ? Avec quels outils (tableur, email, papier, logiciel) ?"></div>
|
|
1009
|
+
</div>
|
|
1010
|
+
|
|
1011
|
+
<div class="card">
|
|
1012
|
+
<div class="card-label">Processus actuel, etape par etape</div>
|
|
1013
|
+
<div id="processFlow" class="process-flow">
|
|
1014
|
+
<!-- Populated dynamically -->
|
|
1015
|
+
</div>
|
|
1016
|
+
<button class="add-btn" onclick="addProcessStep()">+ Ajouter une etape au processus</button>
|
|
1017
|
+
</div>
|
|
1018
|
+
|
|
1019
|
+
<div class="card">
|
|
1020
|
+
<div class="card-label">Etapes les plus penibles ou les plus longues</div>
|
|
1021
|
+
<div class="editable" contenteditable="true" data-field="current.painPoints" data-placeholder="Quelles sont les etapes les plus penibles ou les plus longues dans ce processus ?"></div>
|
|
1022
|
+
</div>
|
|
1023
|
+
|
|
1024
|
+
<div class="card">
|
|
1025
|
+
<div class="card-label">Erreurs ou problemes recurrents</div>
|
|
1026
|
+
<div class="editable" contenteditable="true" data-field="current.errors" data-placeholder="Quelles erreurs ou problemes reviennent regulierement ? Donnez 2 a 3 exemples concrets."></div>
|
|
1027
|
+
</div>
|
|
1028
|
+
</div>
|
|
1029
|
+
|
|
1030
|
+
<!-- SECTION: Situation souhaitee -->
|
|
1031
|
+
<div class="section" id="cadrage-vision" style="display:none;">
|
|
1032
|
+
<h2 class="section-title">Situation souhaitee</h2>
|
|
1033
|
+
<p class="section-subtitle">Ce que le client veut obtenir, pas ce qu'il veut construire.</p>
|
|
1034
|
+
|
|
1035
|
+
<div class="card">
|
|
1036
|
+
<div class="card-label">Ce qui changerait concretement</div>
|
|
1037
|
+
<div class="editable" contenteditable="true" data-field="vision.changes" data-placeholder="Si le probleme etait resolu demain, que feriez-vous differemment dans votre journee de travail ?"></div>
|
|
1038
|
+
</div>
|
|
1039
|
+
|
|
1040
|
+
<div class="card">
|
|
1041
|
+
<div class="card-label">Resultats attendus (mesurables)</div>
|
|
1042
|
+
<div class="editable" contenteditable="true" data-field="vision.results" data-placeholder="Quels resultats concrets attendez-vous ? Citez 2 a 3 ameliorations mesurables."></div>
|
|
1043
|
+
</div>
|
|
1044
|
+
|
|
1045
|
+
<div class="card">
|
|
1046
|
+
<div class="card-label">Signe visible de succes</div>
|
|
1047
|
+
<div class="editable" contenteditable="true" data-field="vision.successSign" data-placeholder="Comment saurez-vous que le projet est un succes ? Quel est le signe visible ?"></div>
|
|
1048
|
+
</div>
|
|
1049
|
+
</div>
|
|
1050
|
+
|
|
1051
|
+
<!-- SECTION: Parties prenantes -->
|
|
1052
|
+
<div class="section" id="cadrage-stakeholders" style="display:none;">
|
|
1053
|
+
<h2 class="section-title">Parties prenantes</h2>
|
|
1054
|
+
<p class="section-subtitle">Toutes les personnes concernees par ce projet et leurs besoins.</p>
|
|
1055
|
+
|
|
1056
|
+
<div class="stakeholder-grid" id="stakeholderGrid">
|
|
1057
|
+
<!-- Populated dynamically -->
|
|
1058
|
+
</div>
|
|
1059
|
+
|
|
1060
|
+
<button class="add-btn" onclick="toggleForm('addStakeholderForm')">+ Ajouter un profil utilisateur</button>
|
|
1061
|
+
|
|
1062
|
+
<div class="inline-form" id="addStakeholderForm">
|
|
1063
|
+
<div class="inline-form-title">Nouveau profil utilisateur</div>
|
|
1064
|
+
<div class="form-group">
|
|
1065
|
+
<label class="form-label">Titre du profil (exemple : Responsable de production)</label>
|
|
1066
|
+
<input type="text" class="form-input" id="sh-role" placeholder="Titre ou description du profil">
|
|
1067
|
+
</div>
|
|
1068
|
+
<div class="form-group">
|
|
1069
|
+
<label class="form-label">Fonction dans l'entreprise</label>
|
|
1070
|
+
<input type="text" class="form-input" id="sh-function" placeholder="Ce qu'il fait dans l'organisation">
|
|
1071
|
+
</div>
|
|
1072
|
+
<div class="form-group">
|
|
1073
|
+
<label class="form-label">Taches principales (une par ligne)</label>
|
|
1074
|
+
<textarea class="form-textarea" id="sh-tasks" placeholder="Tache 1 Tache 2 Tache 3"></textarea>
|
|
1075
|
+
</div>
|
|
1076
|
+
<div class="form-row">
|
|
1077
|
+
<div class="form-group">
|
|
1078
|
+
<label class="form-label">Frequence d'utilisation</label>
|
|
1079
|
+
<select class="form-select" id="sh-frequency">
|
|
1080
|
+
<option value="daily">Quotidienne</option>
|
|
1081
|
+
<option value="weekly">Hebdomadaire</option>
|
|
1082
|
+
<option value="monthly">Mensuelle</option>
|
|
1083
|
+
<option value="occasional">Occasionnelle</option>
|
|
1084
|
+
</select>
|
|
1085
|
+
</div>
|
|
1086
|
+
<div class="form-group">
|
|
1087
|
+
<label class="form-label">Niveau d'acces</label>
|
|
1088
|
+
<select class="form-select" id="sh-access">
|
|
1089
|
+
<option value="admin">Administration complete</option>
|
|
1090
|
+
<option value="manager">Supervision et validation</option>
|
|
1091
|
+
<option value="contributor">Saisie et modification</option>
|
|
1092
|
+
<option value="viewer">Consultation seule</option>
|
|
1093
|
+
</select>
|
|
1094
|
+
</div>
|
|
1095
|
+
</div>
|
|
1096
|
+
<div class="form-group">
|
|
1097
|
+
<label class="form-label">Frustrations actuelles</label>
|
|
1098
|
+
<textarea class="form-textarea" id="sh-frustrations" placeholder="Quelles sont les 2-3 plus grandes frustrations de ce profil avec la facon de travailler actuelle ?"></textarea>
|
|
1099
|
+
</div>
|
|
1100
|
+
<div class="form-actions">
|
|
1101
|
+
<button class="btn" onclick="toggleForm('addStakeholderForm')">Annuler</button>
|
|
1102
|
+
<button class="btn btn-primary" onclick="addStakeholder()">Ajouter ce profil</button>
|
|
1103
|
+
</div>
|
|
1104
|
+
</div>
|
|
1105
|
+
</div>
|
|
1106
|
+
|
|
1107
|
+
<!-- SECTION: Perimetre fonctionnel -->
|
|
1108
|
+
<div class="section" id="cadrage-scope" style="display:none;">
|
|
1109
|
+
<h2 class="section-title">Perimetre fonctionnel</h2>
|
|
1110
|
+
<p class="section-subtitle">Ce que le systeme doit faire et ne pas faire, par ordre de priorite.</p>
|
|
1111
|
+
|
|
1112
|
+
<h3 style="color: var(--text-bright); font-size: 1rem; margin-bottom: 0.75rem;">
|
|
1113
|
+
<span style="color: #f87171;">■</span> Fonctionnalites indispensables
|
|
1114
|
+
</h3>
|
|
1115
|
+
<div id="scopeVital" class="uc-list"></div>
|
|
1116
|
+
<button class="add-btn" onclick="addScopeItem('vital')">+ Ajouter une fonctionnalite indispensable</button>
|
|
1117
|
+
|
|
1118
|
+
<h3 style="color: var(--text-bright); font-size: 1rem; margin: 1.5rem 0 0.75rem;">
|
|
1119
|
+
<span style="color: #facc15;">■</span> Fonctionnalites importantes
|
|
1120
|
+
</h3>
|
|
1121
|
+
<div id="scopeImportant" class="uc-list"></div>
|
|
1122
|
+
<button class="add-btn" onclick="addScopeItem('important')">+ Ajouter une fonctionnalite importante</button>
|
|
1123
|
+
|
|
1124
|
+
<h3 style="color: var(--text-bright); font-size: 1rem; margin: 1.5rem 0 0.75rem;">
|
|
1125
|
+
<span style="color: #4ade80;">■</span> Fonctionnalites optionnelles
|
|
1126
|
+
</h3>
|
|
1127
|
+
<div id="scopeOptional" class="uc-list"></div>
|
|
1128
|
+
<button class="add-btn" onclick="addScopeItem('optional')">+ Ajouter une fonctionnalite optionnelle</button>
|
|
1129
|
+
|
|
1130
|
+
<h3 style="color: var(--text-bright); font-size: 1rem; margin: 1.5rem 0 0.75rem;">
|
|
1131
|
+
<span style="color: #94a3b8;">■</span> Hors perimetre
|
|
1132
|
+
</h3>
|
|
1133
|
+
<div id="scopeExcluded" class="uc-list"></div>
|
|
1134
|
+
<button class="add-btn" onclick="addScopeItem('excluded')">+ Ajouter une exclusion</button>
|
|
1135
|
+
</div>
|
|
1136
|
+
|
|
1137
|
+
<!-- SECTION: Risques et hypotheses -->
|
|
1138
|
+
<div class="section" id="cadrage-risks" style="display:none;">
|
|
1139
|
+
<h2 class="section-title">Risques et hypotheses</h2>
|
|
1140
|
+
<p class="section-subtitle">Ce qui pourrait mal tourner et les certitudes non verifiees.</p>
|
|
1141
|
+
|
|
1142
|
+
<h3 style="color: var(--text-bright); font-size: 1rem; margin-bottom: 0.75rem;">Risques identifies</h3>
|
|
1143
|
+
<div id="risksList"></div>
|
|
1144
|
+
<button class="add-btn" onclick="toggleForm('addRiskForm')">+ Ajouter un risque</button>
|
|
1145
|
+
|
|
1146
|
+
<div class="inline-form" id="addRiskForm">
|
|
1147
|
+
<div class="inline-form-title">Nouveau risque</div>
|
|
1148
|
+
<div class="form-group">
|
|
1149
|
+
<label class="form-label">Description du risque</label>
|
|
1150
|
+
<input type="text" class="form-input" id="risk-desc" placeholder="Qu'est-ce qui pourrait mal tourner ?">
|
|
1151
|
+
</div>
|
|
1152
|
+
<div class="form-row">
|
|
1153
|
+
<div class="form-group">
|
|
1154
|
+
<label class="form-label">Probabilite</label>
|
|
1155
|
+
<select class="form-select" id="risk-probability">
|
|
1156
|
+
<option value="high">Forte</option>
|
|
1157
|
+
<option value="medium">Moyenne</option>
|
|
1158
|
+
<option value="low">Faible</option>
|
|
1159
|
+
</select>
|
|
1160
|
+
</div>
|
|
1161
|
+
<div class="form-group">
|
|
1162
|
+
<label class="form-label">Impact</label>
|
|
1163
|
+
<select class="form-select" id="risk-impact">
|
|
1164
|
+
<option value="high">Grave</option>
|
|
1165
|
+
<option value="medium">Moyen</option>
|
|
1166
|
+
<option value="low">Faible</option>
|
|
1167
|
+
</select>
|
|
1168
|
+
</div>
|
|
1169
|
+
</div>
|
|
1170
|
+
<div class="form-group">
|
|
1171
|
+
<label class="form-label">Mesure de prevention ou de reduction</label>
|
|
1172
|
+
<textarea class="form-textarea" id="risk-mitigation" placeholder="Comment prevenir ou reduire ce risque ?"></textarea>
|
|
1173
|
+
</div>
|
|
1174
|
+
<div class="form-actions">
|
|
1175
|
+
<button class="btn" onclick="toggleForm('addRiskForm')">Annuler</button>
|
|
1176
|
+
<button class="btn btn-primary" onclick="addRisk()">Ajouter ce risque</button>
|
|
1177
|
+
</div>
|
|
1178
|
+
</div>
|
|
1179
|
+
|
|
1180
|
+
<h3 style="color: var(--text-bright); font-size: 1rem; margin: 2rem 0 0.75rem;">Hypotheses a verifier</h3>
|
|
1181
|
+
<div class="card">
|
|
1182
|
+
<div class="editable" contenteditable="true" data-field="risks.assumptions" data-placeholder="Quelles hypotheses faites-vous sur ce projet sans les avoir verifiees ? (une par ligne)"></div>
|
|
1183
|
+
</div>
|
|
1184
|
+
</div>
|
|
1185
|
+
|
|
1186
|
+
<!-- SECTION: Criteres de reussite -->
|
|
1187
|
+
<div class="section" id="cadrage-success" style="display:none;">
|
|
1188
|
+
<h2 class="section-title">Criteres de reussite</h2>
|
|
1189
|
+
<p class="section-subtitle">Comment mesurer objectivement que le projet est un succes.</p>
|
|
1190
|
+
|
|
1191
|
+
<div class="card">
|
|
1192
|
+
<div class="card-label">Definition du succes</div>
|
|
1193
|
+
<div class="editable" contenteditable="true" data-field="success.definition" data-placeholder="Comment saurez-vous que le projet est un succes ? Quel changement concret observerez-vous ?"></div>
|
|
1194
|
+
</div>
|
|
1195
|
+
|
|
1196
|
+
<div class="card">
|
|
1197
|
+
<div class="card-label">Objectifs mesurables</div>
|
|
1198
|
+
<div class="editable" contenteditable="true" data-field="success.metrics" data-placeholder="Quels chiffres presenteriez-vous a votre direction pour prouver le succes ? (temps, erreurs, satisfaction...)"></div>
|
|
1199
|
+
</div>
|
|
1200
|
+
|
|
1201
|
+
<div class="card">
|
|
1202
|
+
<div class="card-label">Delai d'evaluation</div>
|
|
1203
|
+
<div class="editable" contenteditable="true" data-field="success.timeline" data-placeholder="Au bout de combien de temps pourrez-vous juger si ca fonctionne ? 1 semaine ? 1 mois ? 3 mois ?"></div>
|
|
1204
|
+
</div>
|
|
1205
|
+
|
|
1206
|
+
<div class="card">
|
|
1207
|
+
<div class="card-label">Conditions minimales de mise en service</div>
|
|
1208
|
+
<div class="editable" contenteditable="true" data-field="success.minimumConditions" data-placeholder="Quelles conditions minimales pour mettre le systeme en service ? (fonctionnalites presentes, donnees migrees, formation faite...)"></div>
|
|
1209
|
+
</div>
|
|
1210
|
+
</div>
|
|
1211
|
+
|
|
1212
|
+
<!-- ================================================================
|
|
1213
|
+
PHASE 2 : DECOMPOSITION
|
|
1214
|
+
================================================================ -->
|
|
1215
|
+
|
|
1216
|
+
<!-- SECTION: Domaines fonctionnels -->
|
|
1217
|
+
<div class="section" id="decomp-modules" style="display:none;">
|
|
1218
|
+
<h2 class="section-title">Domaines fonctionnels</h2>
|
|
1219
|
+
<p class="section-subtitle">Identifiez les grands domaines de votre application. Chaque domaine regroupe des fonctionnalites coherentes et independantes.</p>
|
|
1220
|
+
|
|
1221
|
+
<div class="module-grid" id="moduleGrid">
|
|
1222
|
+
<!-- Populated dynamically -->
|
|
1223
|
+
</div>
|
|
1224
|
+
|
|
1225
|
+
<button class="add-btn" onclick="toggleForm('addModuleForm')" style="margin-top:1rem;">+ Ajouter un domaine fonctionnel</button>
|
|
1226
|
+
|
|
1227
|
+
<div class="inline-form" id="addModuleForm">
|
|
1228
|
+
<div class="inline-form-title">Nouveau domaine fonctionnel</div>
|
|
1229
|
+
<div class="form-group">
|
|
1230
|
+
<label class="form-label">Nom du domaine (exemple : Gestion des commandes)</label>
|
|
1231
|
+
<input type="text" class="form-input" id="mod-name" placeholder="Nom clair et explicite">
|
|
1232
|
+
</div>
|
|
1233
|
+
<div class="form-group">
|
|
1234
|
+
<label class="form-label">Description en une ou deux phrases</label>
|
|
1235
|
+
<textarea class="form-textarea" id="mod-desc" placeholder="A quoi sert ce domaine ? Quel probleme resout-il ?"></textarea>
|
|
1236
|
+
</div>
|
|
1237
|
+
<div class="form-row">
|
|
1238
|
+
<div class="form-group">
|
|
1239
|
+
<label class="form-label">Type de domaine</label>
|
|
1240
|
+
<select class="form-select" id="mod-type">
|
|
1241
|
+
<option value="data-centric">Gestion de donnees (listes, fiches, formulaires)</option>
|
|
1242
|
+
<option value="workflow">Processus metier (etapes, validations, approbations)</option>
|
|
1243
|
+
<option value="reporting">Tableaux de bord et rapports</option>
|
|
1244
|
+
<option value="integration">Integration avec des systemes externes</option>
|
|
1245
|
+
<option value="full-module">Domaine complet (donnees + processus + rapports)</option>
|
|
1246
|
+
</select>
|
|
1247
|
+
</div>
|
|
1248
|
+
<div class="form-group">
|
|
1249
|
+
<label class="form-label">Priorite</label>
|
|
1250
|
+
<select class="form-select" id="mod-priority">
|
|
1251
|
+
<option value="must">Indispensable</option>
|
|
1252
|
+
<option value="should">Important</option>
|
|
1253
|
+
<option value="could">Optionnel</option>
|
|
1254
|
+
</select>
|
|
1255
|
+
</div>
|
|
1256
|
+
</div>
|
|
1257
|
+
<div class="form-group">
|
|
1258
|
+
<label class="form-label">Principales donnees gerees (une par ligne)</label>
|
|
1259
|
+
<textarea class="form-textarea" id="mod-entities" placeholder="Commande Ligne de commande Facture"></textarea>
|
|
1260
|
+
</div>
|
|
1261
|
+
<div class="form-actions">
|
|
1262
|
+
<button class="btn" onclick="toggleForm('addModuleForm')">Annuler</button>
|
|
1263
|
+
<button class="btn btn-primary" onclick="addModule()">Ajouter ce domaine</button>
|
|
1264
|
+
</div>
|
|
1265
|
+
</div>
|
|
1266
|
+
</div>
|
|
1267
|
+
|
|
1268
|
+
<!-- SECTION: Dependances -->
|
|
1269
|
+
<div class="section" id="decomp-dependencies" style="display:none;">
|
|
1270
|
+
<h2 class="section-title">Dependances entre domaines</h2>
|
|
1271
|
+
<p class="section-subtitle">Indiquez quels domaines dependent d'autres domaines. Par exemple, les Commandes dependent des Clients et des Produits.</p>
|
|
1272
|
+
|
|
1273
|
+
<div id="depGraphContainer">
|
|
1274
|
+
<div class="dep-graph" id="depGraph">
|
|
1275
|
+
<p style="color:var(--text-muted);text-align:center;padding:2rem;">Ajoutez des domaines fonctionnels pour visualiser les dependances.</p>
|
|
1276
|
+
</div>
|
|
1277
|
+
</div>
|
|
1278
|
+
|
|
1279
|
+
<div style="margin-top:1.5rem;">
|
|
1280
|
+
<h3 style="color:var(--text-bright);font-size:1rem;margin-bottom:0.75rem;">Ajouter une dependance</h3>
|
|
1281
|
+
<div class="form-row">
|
|
1282
|
+
<div class="form-group">
|
|
1283
|
+
<label class="form-label">Ce domaine...</label>
|
|
1284
|
+
<select class="form-select" id="dep-from"></select>
|
|
1285
|
+
</div>
|
|
1286
|
+
<div class="form-group">
|
|
1287
|
+
<label class="form-label">...depend de</label>
|
|
1288
|
+
<select class="form-select" id="dep-to"></select>
|
|
1289
|
+
</div>
|
|
1290
|
+
</div>
|
|
1291
|
+
<div class="form-group">
|
|
1292
|
+
<label class="form-label">Nature de la dependance</label>
|
|
1293
|
+
<input type="text" class="form-input" id="dep-desc" placeholder="Exemple : La commande reference un client existant">
|
|
1294
|
+
</div>
|
|
1295
|
+
<button class="btn btn-primary" onclick="addDependency()" style="margin-top:0.5rem;">Ajouter cette dependance</button>
|
|
1296
|
+
</div>
|
|
1297
|
+
|
|
1298
|
+
<div id="depList" style="margin-top:1.5rem;"></div>
|
|
1299
|
+
|
|
1300
|
+
<div style="margin-top:2rem;">
|
|
1301
|
+
<h3 style="color:var(--text-bright);font-size:1rem;margin-bottom:0.75rem;">Ordre de traitement propose</h3>
|
|
1302
|
+
<p class="section-subtitle">Les domaines sont traites dans l'ordre de leurs dependances : les fondations d'abord, puis les domaines qui en dependent.</p>
|
|
1303
|
+
<div id="processingOrder" class="process-flow"></div>
|
|
1304
|
+
</div>
|
|
1305
|
+
</div>
|
|
1306
|
+
|
|
1307
|
+
<!-- ================================================================
|
|
1308
|
+
PHASE 3 : SPECIFICATION PAR MODULE
|
|
1309
|
+
================================================================ -->
|
|
1310
|
+
|
|
1311
|
+
<!-- Container dynamique pour les specs de chaque module -->
|
|
1312
|
+
<div id="moduleSpecContainer">
|
|
1313
|
+
<!-- Generated dynamically by renderModuleSpec() -->
|
|
1314
|
+
</div>
|
|
1315
|
+
|
|
1316
|
+
<!-- ================================================================
|
|
1317
|
+
PHASE 4 : CONSOLIDATION
|
|
1318
|
+
================================================================ -->
|
|
1319
|
+
|
|
1320
|
+
<!-- SECTION: Interactions cross-module -->
|
|
1321
|
+
<div class="section" id="consol-interactions" style="display:none;">
|
|
1322
|
+
<h2 class="section-title">Interactions entre domaines</h2>
|
|
1323
|
+
<p class="section-subtitle">Vue d'ensemble de la facon dont les domaines communiquent et partagent des donnees.</p>
|
|
1324
|
+
<div id="consolInteractions">
|
|
1325
|
+
<p style="color:var(--text-muted);text-align:center;padding:2rem;">Les interactions seront calculees automatiquement a partir des dependances et des donnees partagees entre domaines.</p>
|
|
1326
|
+
</div>
|
|
1327
|
+
</div>
|
|
1328
|
+
|
|
1329
|
+
<!-- SECTION: Coherence des acces -->
|
|
1330
|
+
<div class="section" id="consol-permissions" style="display:none;">
|
|
1331
|
+
<h2 class="section-title">Coherence des droits d'acces</h2>
|
|
1332
|
+
<p class="section-subtitle">Verification que les profils utilisateurs ont des droits coherents dans tous les domaines.</p>
|
|
1333
|
+
<div id="consolPermissions">
|
|
1334
|
+
<p style="color:var(--text-muted);text-align:center;padding:2rem;">La coherence sera verifiee quand les permissions de chaque domaine seront definies.</p>
|
|
1335
|
+
</div>
|
|
1336
|
+
</div>
|
|
1337
|
+
|
|
1338
|
+
<!-- SECTION: Parcours bout en bout -->
|
|
1339
|
+
<div class="section" id="consol-flows" style="display:none;">
|
|
1340
|
+
<h2 class="section-title">Parcours bout en bout</h2>
|
|
1341
|
+
<p class="section-subtitle">Les processus metier qui traversent plusieurs domaines, de bout en bout.</p>
|
|
1342
|
+
|
|
1343
|
+
<div id="e2eFlowsList"></div>
|
|
1344
|
+
|
|
1345
|
+
<button class="add-btn" onclick="toggleForm('addFlowForm')">+ Ajouter un parcours</button>
|
|
1346
|
+
|
|
1347
|
+
<div class="inline-form" id="addFlowForm">
|
|
1348
|
+
<div class="inline-form-title">Nouveau parcours bout en bout</div>
|
|
1349
|
+
<div class="form-group">
|
|
1350
|
+
<label class="form-label">Nom du parcours (exemple : De la commande a la facture)</label>
|
|
1351
|
+
<input type="text" class="form-input" id="flow-name" placeholder="Nom descriptif du parcours">
|
|
1352
|
+
</div>
|
|
1353
|
+
<div class="form-group">
|
|
1354
|
+
<label class="form-label">Etapes du parcours (une par ligne : Domaine - Action)</label>
|
|
1355
|
+
<textarea class="form-textarea" id="flow-steps" placeholder="Clients - Le client existe dans le systeme Commandes - Creer la commande Commandes - Valider la commande Factures - Generer la facture"></textarea>
|
|
1356
|
+
</div>
|
|
1357
|
+
<div class="form-group">
|
|
1358
|
+
<label class="form-label">Qui intervient dans ce parcours ?</label>
|
|
1359
|
+
<input type="text" class="form-input" id="flow-actors" placeholder="Exemple : Contributeur (creation), Responsable (validation)">
|
|
1360
|
+
</div>
|
|
1361
|
+
<div class="form-actions">
|
|
1362
|
+
<button class="btn" onclick="toggleForm('addFlowForm')">Annuler</button>
|
|
1363
|
+
<button class="btn btn-primary" onclick="addE2EFlow()">Ajouter ce parcours</button>
|
|
1364
|
+
</div>
|
|
1365
|
+
</div>
|
|
1366
|
+
</div>
|
|
1367
|
+
|
|
1368
|
+
<!-- ================================================================
|
|
1369
|
+
PHASE 5 : SYNTHESE
|
|
1370
|
+
================================================================ -->
|
|
1371
|
+
|
|
1372
|
+
<div class="section" id="handoff-summary" style="display:none;">
|
|
1373
|
+
<h2 class="section-title">Synthese de l'analyse</h2>
|
|
1374
|
+
<p class="section-subtitle">Vue d'ensemble de toute l'analyse metier, prete pour le developpement.</p>
|
|
1375
|
+
|
|
1376
|
+
<div class="stat-grid" id="handoffStats">
|
|
1377
|
+
<!-- Populated dynamically -->
|
|
1378
|
+
</div>
|
|
1379
|
+
|
|
1380
|
+
<h3 style="color:var(--text-bright);font-size:1rem;margin-bottom:0.75rem;">Domaines par ordre de traitement</h3>
|
|
1381
|
+
<div id="handoffModuleList"></div>
|
|
1382
|
+
|
|
1383
|
+
<h3 style="color:var(--text-bright);font-size:1rem;margin:1.5rem 0 0.75rem;">Couverture du besoin initial</h3>
|
|
1384
|
+
<div class="card">
|
|
1385
|
+
<div class="card-label">Matrice de couverture</div>
|
|
1386
|
+
<p style="font-size:0.85rem;color:var(--text-muted);margin-bottom:0.75rem;">Chaque besoin du cadrage est couvert par au moins un domaine et un cas d'utilisation.</p>
|
|
1387
|
+
<div id="coverageMatrix"></div>
|
|
1388
|
+
</div>
|
|
1389
|
+
|
|
1390
|
+
<div style="margin-top:2rem;padding:1.5rem;background:var(--bg-card);border:1px solid var(--border);border-radius:10px;text-align:center;">
|
|
1391
|
+
<p style="color:var(--text-bright);font-size:1.1rem;font-weight:600;margin-bottom:0.5rem;">Analyse prete pour l'extraction</p>
|
|
1392
|
+
<p style="color:var(--text-muted);font-size:0.85rem;margin-bottom:1rem;">Exportez le fichier JSON pour lancer la generation automatique du systeme.</p>
|
|
1393
|
+
<button class="btn btn-primary" onclick="exportJSON()" style="font-size:0.9rem;padding:0.6rem 1.5rem;">Exporter l'analyse complete en JSON</button>
|
|
1394
|
+
</div>
|
|
1395
|
+
</div>
|
|
1396
|
+
|
|
1397
|
+
</main>
|
|
1398
|
+
</div>
|
|
1399
|
+
</div>
|
|
1400
|
+
|
|
1401
|
+
<!-- Notification -->
|
|
1402
|
+
<div class="notification notification-success" id="notification"></div>
|
|
1403
|
+
|
|
1404
|
+
<script>
|
|
1405
|
+
/* ============================================
|
|
1406
|
+
DATA STORE
|
|
1407
|
+
============================================ */
|
|
1408
|
+
const APP_KEY = 'ba-{{APPLICATION_ID}}';
|
|
1409
|
+
let data = {{FEATURE_DATA}};
|
|
1410
|
+
|
|
1411
|
+
/* ============================================
|
|
1412
|
+
INITIALIZATION
|
|
1413
|
+
============================================ */
|
|
1414
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
1415
|
+
loadFromLocalStorage();
|
|
1416
|
+
initEditableFields();
|
|
1417
|
+
renderStakeholders();
|
|
1418
|
+
renderScope();
|
|
1419
|
+
renderRisks();
|
|
1420
|
+
renderModules();
|
|
1421
|
+
renderDependencies();
|
|
1422
|
+
renderAllModuleSpecs();
|
|
1423
|
+
renderConsolidation();
|
|
1424
|
+
renderHandoff();
|
|
1425
|
+
renderE2EFlows();
|
|
1426
|
+
updateCounts();
|
|
1427
|
+
});
|
|
1428
|
+
|
|
1429
|
+
/* ============================================
|
|
1430
|
+
NAVIGATION
|
|
1431
|
+
============================================ */
|
|
1432
|
+
let currentSectionId = 'cadrage-problem';
|
|
1433
|
+
|
|
1434
|
+
function showSection(sectionId) {
|
|
1435
|
+
currentSectionId = sectionId;
|
|
1436
|
+
document.querySelectorAll('.section').forEach(s => s.style.display = 'none');
|
|
1437
|
+
const section = document.getElementById(sectionId);
|
|
1438
|
+
if (section) section.style.display = 'block';
|
|
1439
|
+
|
|
1440
|
+
document.querySelectorAll('.nav-item').forEach(n => n.classList.remove('active'));
|
|
1441
|
+
const navItem = document.querySelector('[data-section="' + sectionId + '"]');
|
|
1442
|
+
if (navItem) navItem.classList.add('active');
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
function restoreCurrentSection() {
|
|
1446
|
+
if (currentSectionId) {
|
|
1447
|
+
const section = document.getElementById(currentSectionId);
|
|
1448
|
+
if (section) section.style.display = 'block';
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
/* ============================================
|
|
1453
|
+
EDITABLE FIELDS
|
|
1454
|
+
============================================ */
|
|
1455
|
+
function initEditableFields() {
|
|
1456
|
+
document.querySelectorAll('.editable[data-field]').forEach(el => {
|
|
1457
|
+
const field = el.dataset.field;
|
|
1458
|
+
const value = getNestedValue(data, 'cadrage.' + field);
|
|
1459
|
+
if (value) el.textContent = value;
|
|
1460
|
+
|
|
1461
|
+
el.addEventListener('blur', function() {
|
|
1462
|
+
setNestedValue(data, 'cadrage.' + field, this.textContent.trim());
|
|
1463
|
+
autoSave();
|
|
1464
|
+
});
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
/* ============================================
|
|
1469
|
+
STAKEHOLDERS
|
|
1470
|
+
============================================ */
|
|
1471
|
+
function addStakeholder() {
|
|
1472
|
+
const role = document.getElementById('sh-role').value.trim();
|
|
1473
|
+
if (!role) return;
|
|
1474
|
+
|
|
1475
|
+
data.cadrage.stakeholders.push({
|
|
1476
|
+
role: role,
|
|
1477
|
+
function: document.getElementById('sh-function').value.trim(),
|
|
1478
|
+
tasks: document.getElementById('sh-tasks').value.split('\n').filter(t => t.trim()),
|
|
1479
|
+
frequency: document.getElementById('sh-frequency').value,
|
|
1480
|
+
access: document.getElementById('sh-access').value,
|
|
1481
|
+
frustrations: document.getElementById('sh-frustrations').value.trim()
|
|
1482
|
+
});
|
|
1483
|
+
|
|
1484
|
+
renderStakeholders();
|
|
1485
|
+
toggleForm('addStakeholderForm');
|
|
1486
|
+
clearForm('addStakeholderForm');
|
|
1487
|
+
updateCounts();
|
|
1488
|
+
autoSave();
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
function renderStakeholders() {
|
|
1492
|
+
const grid = document.getElementById('stakeholderGrid');
|
|
1493
|
+
grid.innerHTML = data.cadrage.stakeholders.map((s, i) => `
|
|
1494
|
+
<div class="stakeholder-card">
|
|
1495
|
+
<div style="display:flex;justify-content:space-between;align-items:start;">
|
|
1496
|
+
<div class="stakeholder-role">${s.role}</div>
|
|
1497
|
+
<button class="btn btn-sm" onclick="removeStakeholder(${i})" style="opacity:0.5;font-size:0.7rem;">Supprimer</button>
|
|
1498
|
+
</div>
|
|
1499
|
+
<div class="stakeholder-function">${s.function || ''}</div>
|
|
1500
|
+
<ul class="stakeholder-tasks">
|
|
1501
|
+
${(s.tasks || []).map(t => '<li>' + t + '</li>').join('')}
|
|
1502
|
+
</ul>
|
|
1503
|
+
<div class="stakeholder-meta">
|
|
1504
|
+
<span>${formatFrequency(s.frequency)}</span>
|
|
1505
|
+
<span>${formatAccess(s.access)}</span>
|
|
1506
|
+
</div>
|
|
1507
|
+
${s.frustrations ? '<div style="font-size:0.8rem;color:var(--warning);margin-top:0.5rem;font-style:italic;">' + s.frustrations + '</div>' : ''}
|
|
1508
|
+
</div>
|
|
1509
|
+
`).join('');
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
function removeStakeholder(index) {
|
|
1513
|
+
data.cadrage.stakeholders.splice(index, 1);
|
|
1514
|
+
renderStakeholders();
|
|
1515
|
+
updateCounts();
|
|
1516
|
+
autoSave();
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
/* ============================================
|
|
1520
|
+
SCOPE ITEMS
|
|
1521
|
+
============================================ */
|
|
1522
|
+
function addScopeItem(priority) {
|
|
1523
|
+
const name = prompt('Nom de la fonctionnalite :');
|
|
1524
|
+
if (!name) return;
|
|
1525
|
+
const description = prompt('Description courte (optionnel) :') || '';
|
|
1526
|
+
|
|
1527
|
+
data.cadrage.scope[priority].push({ name, description });
|
|
1528
|
+
renderScope();
|
|
1529
|
+
autoSave();
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
function renderScope() {
|
|
1533
|
+
['vital', 'important', 'optional', 'excluded'].forEach(p => {
|
|
1534
|
+
const container = document.getElementById('scope' + p.charAt(0).toUpperCase() + p.slice(1));
|
|
1535
|
+
container.innerHTML = data.cadrage.scope[p].map((item, i) => `
|
|
1536
|
+
<div class="uc-item">
|
|
1537
|
+
<div class="uc-header">
|
|
1538
|
+
<span class="priority priority-${p}">${formatPriority(p)}</span>
|
|
1539
|
+
<span class="uc-title">${item.name}</span>
|
|
1540
|
+
<div class="uc-actions">
|
|
1541
|
+
<button class="btn btn-sm" onclick="removeScopeItem('${p}',${i})">Supprimer</button>
|
|
1542
|
+
</div>
|
|
1543
|
+
</div>
|
|
1544
|
+
${item.description ? '<div class="uc-detail">' + item.description + '</div>' : ''}
|
|
1545
|
+
</div>
|
|
1546
|
+
`).join('');
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
function removeScopeItem(priority, index) {
|
|
1551
|
+
data.cadrage.scope[priority].splice(index, 1);
|
|
1552
|
+
renderScope();
|
|
1553
|
+
autoSave();
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
/* ============================================
|
|
1557
|
+
RISKS
|
|
1558
|
+
============================================ */
|
|
1559
|
+
function addRisk() {
|
|
1560
|
+
const desc = document.getElementById('risk-desc').value.trim();
|
|
1561
|
+
if (!desc) return;
|
|
1562
|
+
|
|
1563
|
+
data.cadrage.risks.push({
|
|
1564
|
+
description: desc,
|
|
1565
|
+
probability: document.getElementById('risk-probability').value,
|
|
1566
|
+
impact: document.getElementById('risk-impact').value,
|
|
1567
|
+
mitigation: document.getElementById('risk-mitigation').value.trim()
|
|
1568
|
+
});
|
|
1569
|
+
|
|
1570
|
+
renderRisks();
|
|
1571
|
+
toggleForm('addRiskForm');
|
|
1572
|
+
clearForm('addRiskForm');
|
|
1573
|
+
autoSave();
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
function renderRisks() {
|
|
1577
|
+
const list = document.getElementById('risksList');
|
|
1578
|
+
list.innerHTML = data.cadrage.risks.map((r, i) => {
|
|
1579
|
+
const level = (r.probability === 'high' && r.impact === 'high') ? 'critical'
|
|
1580
|
+
: (r.probability === 'low' && r.impact === 'low') ? 'low' : 'medium';
|
|
1581
|
+
return `
|
|
1582
|
+
<div class="risk-item">
|
|
1583
|
+
<div class="risk-level risk-${level}"></div>
|
|
1584
|
+
<div>
|
|
1585
|
+
<div class="risk-text">${r.description}</div>
|
|
1586
|
+
${r.mitigation ? '<div style="font-size:0.75rem;color:var(--text-muted);margin-top:0.25rem;">Prevention : ' + r.mitigation + '</div>' : ''}
|
|
1587
|
+
</div>
|
|
1588
|
+
<div class="risk-probability">${formatLevel(r.probability)}</div>
|
|
1589
|
+
<div class="risk-impact">${formatLevel(r.impact)}</div>
|
|
1590
|
+
</div>
|
|
1591
|
+
`;
|
|
1592
|
+
}).join('');
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/* ============================================
|
|
1596
|
+
PROCESS STEPS
|
|
1597
|
+
============================================ */
|
|
1598
|
+
function addProcessStep() {
|
|
1599
|
+
const label = prompt('Nom de l\'etape :');
|
|
1600
|
+
if (!label) return;
|
|
1601
|
+
if (!data.cadrage.current.steps) data.cadrage.current.steps = [];
|
|
1602
|
+
data.cadrage.current.steps.push(label);
|
|
1603
|
+
renderProcessFlow();
|
|
1604
|
+
autoSave();
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
function renderProcessFlow() {
|
|
1608
|
+
const container = document.getElementById('processFlow');
|
|
1609
|
+
const steps = data.cadrage.current.steps || [];
|
|
1610
|
+
container.innerHTML = steps.map((step, i) => `
|
|
1611
|
+
<div class="process-step">
|
|
1612
|
+
<div class="process-step-number">Etape ${i + 1}</div>
|
|
1613
|
+
<div class="process-step-label">${step}</div>
|
|
1614
|
+
</div>
|
|
1615
|
+
${i < steps.length - 1 ? '<div class="process-arrow">→</div>' : ''}
|
|
1616
|
+
`).join('');
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
/* ============================================
|
|
1620
|
+
PERSISTENCE
|
|
1621
|
+
============================================ */
|
|
1622
|
+
function autoSave() {
|
|
1623
|
+
data.metadata.lastModified = new Date().toISOString();
|
|
1624
|
+
localStorage.setItem(APP_KEY, JSON.stringify(data));
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
function saveToLocalStorage() {
|
|
1628
|
+
autoSave();
|
|
1629
|
+
showNotification('Modifications sauvegardees');
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
function loadFromLocalStorage() {
|
|
1633
|
+
const saved = localStorage.getItem(APP_KEY);
|
|
1634
|
+
if (saved) {
|
|
1635
|
+
try {
|
|
1636
|
+
const parsed = JSON.parse(saved);
|
|
1637
|
+
// Deep merge with defaults
|
|
1638
|
+
data.metadata = { ...data.metadata, ...parsed.metadata };
|
|
1639
|
+
data.cadrage = {
|
|
1640
|
+
...data.cadrage,
|
|
1641
|
+
...parsed.cadrage,
|
|
1642
|
+
scope: { ...data.cadrage.scope, ...(parsed.cadrage?.scope || {}) }
|
|
1643
|
+
};
|
|
1644
|
+
data.modules = parsed.modules || [];
|
|
1645
|
+
data.dependencies = parsed.dependencies || [];
|
|
1646
|
+
data.moduleSpecs = parsed.moduleSpecs || {};
|
|
1647
|
+
data.consolidation = { ...data.consolidation, ...(parsed.consolidation || {}) };
|
|
1648
|
+
data.handoff = parsed.handoff || {};
|
|
1649
|
+
|
|
1650
|
+
// Restore editable fields
|
|
1651
|
+
document.querySelectorAll('.editable[data-field]').forEach(el => {
|
|
1652
|
+
const value = getNestedValue(data, 'cadrage.' + el.dataset.field);
|
|
1653
|
+
if (value) el.textContent = value;
|
|
1654
|
+
});
|
|
1655
|
+
renderProcessFlow();
|
|
1656
|
+
} catch (e) { console.error('Error loading saved data:', e); }
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
function exportJSON() {
|
|
1661
|
+
// Collect all editable fields (cadrage)
|
|
1662
|
+
document.querySelectorAll('.editable[data-field]').forEach(el => {
|
|
1663
|
+
setNestedValue(data, 'cadrage.' + el.dataset.field, el.textContent.trim());
|
|
1664
|
+
});
|
|
1665
|
+
|
|
1666
|
+
// Collect module editable fields
|
|
1667
|
+
document.querySelectorAll('.editable[data-module-field]').forEach(el => {
|
|
1668
|
+
const code = el.dataset.moduleCode;
|
|
1669
|
+
const field = el.dataset.moduleField;
|
|
1670
|
+
if (data.moduleSpecs[code]) {
|
|
1671
|
+
data.moduleSpecs[code][field] = el.textContent.trim();
|
|
1672
|
+
}
|
|
1673
|
+
});
|
|
1674
|
+
|
|
1675
|
+
data.metadata.lastModified = new Date().toISOString();
|
|
1676
|
+
data.metadata.exportedAt = new Date().toISOString();
|
|
1677
|
+
|
|
1678
|
+
// Build complete export with structured data
|
|
1679
|
+
const exportData = {
|
|
1680
|
+
metadata: data.metadata,
|
|
1681
|
+
cadrage: data.cadrage,
|
|
1682
|
+
modules: data.modules,
|
|
1683
|
+
dependencies: data.dependencies,
|
|
1684
|
+
moduleSpecifications: {},
|
|
1685
|
+
consolidation: data.consolidation
|
|
1686
|
+
};
|
|
1687
|
+
|
|
1688
|
+
// Structure module specs for export
|
|
1689
|
+
data.modules.forEach(m => {
|
|
1690
|
+
const spec = data.moduleSpecs[m.code] || {};
|
|
1691
|
+
exportData.moduleSpecifications[m.code] = {
|
|
1692
|
+
module: m,
|
|
1693
|
+
useCases: (spec.useCases || []).map((uc, i) => ({
|
|
1694
|
+
id: 'UC-' + String(i + 1).padStart(3, '0'),
|
|
1695
|
+
...uc
|
|
1696
|
+
})),
|
|
1697
|
+
businessRules: (spec.businessRules || []).map((br, i) => ({
|
|
1698
|
+
id: 'BR-' + br.category.toUpperCase().substring(0, 4) + '-' + String(i + 1).padStart(3, '0'),
|
|
1699
|
+
...br
|
|
1700
|
+
})),
|
|
1701
|
+
entities: spec.entities || [],
|
|
1702
|
+
permissions: spec.permissions || [],
|
|
1703
|
+
notes: spec.notes || '',
|
|
1704
|
+
mockupNotes: spec.mockupNotes || ''
|
|
1705
|
+
};
|
|
1706
|
+
});
|
|
1707
|
+
|
|
1708
|
+
const blob = new Blob([JSON.stringify(exportData, null, 2)], { type: 'application/json' });
|
|
1709
|
+
const url = URL.createObjectURL(blob);
|
|
1710
|
+
const a = document.createElement('a');
|
|
1711
|
+
a.href = url;
|
|
1712
|
+
a.download = (data.metadata.applicationId || 'analyse') + '-export.json';
|
|
1713
|
+
a.click();
|
|
1714
|
+
URL.revokeObjectURL(url);
|
|
1715
|
+
showNotification('Export JSON telecharge');
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
/* ============================================
|
|
1719
|
+
UTILITIES
|
|
1720
|
+
============================================ */
|
|
1721
|
+
function showNotification(message) {
|
|
1722
|
+
const el = document.getElementById('notification');
|
|
1723
|
+
el.textContent = message;
|
|
1724
|
+
el.classList.add('visible');
|
|
1725
|
+
setTimeout(() => el.classList.remove('visible'), 2500);
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
function toggleForm(formId) {
|
|
1729
|
+
document.getElementById(formId).classList.toggle('visible');
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
function clearForm(formId) {
|
|
1733
|
+
document.querySelectorAll('#' + formId + ' input, #' + formId + ' textarea').forEach(el => el.value = '');
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
function getNestedValue(obj, path) {
|
|
1737
|
+
return path.split('.').reduce((o, k) => (o || {})[k], obj);
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
function setNestedValue(obj, path, value) {
|
|
1741
|
+
const keys = path.split('.');
|
|
1742
|
+
let current = obj;
|
|
1743
|
+
for (let i = 0; i < keys.length - 1; i++) {
|
|
1744
|
+
if (!current[keys[i]]) current[keys[i]] = {};
|
|
1745
|
+
current = current[keys[i]];
|
|
1746
|
+
}
|
|
1747
|
+
current[keys[keys.length - 1]] = value;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
function updateCounts() {
|
|
1751
|
+
document.getElementById('stakeholderCount').textContent = data.cadrage.stakeholders.length;
|
|
1752
|
+
document.getElementById('moduleCount').textContent = data.modules.length;
|
|
1753
|
+
updateModulesNav();
|
|
1754
|
+
updateDepSelects();
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
function formatFrequency(f) {
|
|
1758
|
+
return { daily: 'Quotidien', weekly: 'Hebdomadaire', monthly: 'Mensuel', occasional: 'Occasionnel' }[f] || f;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
function formatAccess(a) {
|
|
1762
|
+
return { admin: 'Administration', manager: 'Supervision', contributor: 'Contribution', viewer: 'Consultation' }[a] || a;
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
function formatPriority(p) {
|
|
1766
|
+
return { vital: 'Indispensable', important: 'Important', optional: 'Optionnel', excluded: 'Hors perimetre' }[p] || p;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
function formatLevel(l) {
|
|
1770
|
+
return { high: 'Fort', medium: 'Moyen', low: 'Faible' }[l] || l;
|
|
1771
|
+
}
|
|
1772
|
+
/* ============================================
|
|
1773
|
+
MODULE MANAGEMENT
|
|
1774
|
+
============================================ */
|
|
1775
|
+
function addModule() {
|
|
1776
|
+
const name = document.getElementById('mod-name').value.trim();
|
|
1777
|
+
if (!name) return;
|
|
1778
|
+
const code = name.replace(/[^a-zA-Z0-9]/g, '');
|
|
1779
|
+
|
|
1780
|
+
data.modules.push({
|
|
1781
|
+
code: code,
|
|
1782
|
+
name: name,
|
|
1783
|
+
description: document.getElementById('mod-desc').value.trim(),
|
|
1784
|
+
featureType: document.getElementById('mod-type').value,
|
|
1785
|
+
priority: document.getElementById('mod-priority').value,
|
|
1786
|
+
entities: document.getElementById('mod-entities').value.split('\n').filter(e => e.trim()),
|
|
1787
|
+
status: 'pending'
|
|
1788
|
+
});
|
|
1789
|
+
|
|
1790
|
+
// Initialize module spec
|
|
1791
|
+
if (!data.moduleSpecs[code]) {
|
|
1792
|
+
data.moduleSpecs[code] = {
|
|
1793
|
+
useCases: [],
|
|
1794
|
+
businessRules: [],
|
|
1795
|
+
entities: [],
|
|
1796
|
+
permissions: [],
|
|
1797
|
+
notes: ''
|
|
1798
|
+
};
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
renderModules();
|
|
1802
|
+
renderDependencies();
|
|
1803
|
+
renderAllModuleSpecs();
|
|
1804
|
+
toggleForm('addModuleForm');
|
|
1805
|
+
clearForm('addModuleForm');
|
|
1806
|
+
updateCounts();
|
|
1807
|
+
autoSave();
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
function removeModule(index) {
|
|
1811
|
+
if (!confirm('Supprimer ce domaine fonctionnel ?')) return;
|
|
1812
|
+
const code = data.modules[index].code;
|
|
1813
|
+
data.modules.splice(index, 1);
|
|
1814
|
+
delete data.moduleSpecs[code];
|
|
1815
|
+
data.dependencies = data.dependencies.filter(d => d.from !== code && d.to !== code);
|
|
1816
|
+
renderModules();
|
|
1817
|
+
renderDependencies();
|
|
1818
|
+
renderAllModuleSpecs();
|
|
1819
|
+
updateCounts();
|
|
1820
|
+
autoSave();
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
function renderModules() {
|
|
1824
|
+
const grid = document.getElementById('moduleGrid');
|
|
1825
|
+
grid.innerHTML = data.modules.map((m, i) => `
|
|
1826
|
+
<div class="module-card" onclick="showSection('module-spec-${m.code}')">
|
|
1827
|
+
<button class="module-card-remove" onclick="event.stopPropagation();removeModule(${i})">✕</button>
|
|
1828
|
+
<div class="module-card-header">
|
|
1829
|
+
<span class="module-card-code">${m.name}</span>
|
|
1830
|
+
<span class="module-card-type">${formatModuleType(m.featureType)}</span>
|
|
1831
|
+
</div>
|
|
1832
|
+
<div class="module-card-desc">${m.description || ''}</div>
|
|
1833
|
+
<div class="module-card-meta">
|
|
1834
|
+
<span class="priority priority-${m.priority === 'must' ? 'vital' : m.priority === 'should' ? 'important' : 'optional'}">${formatModulePriority(m.priority)}</span>
|
|
1835
|
+
<span>${(m.entities || []).length} donnees</span>
|
|
1836
|
+
<span>${(data.moduleSpecs[m.code]?.useCases || []).length} cas d'utilisation</span>
|
|
1837
|
+
</div>
|
|
1838
|
+
</div>
|
|
1839
|
+
`).join('') || '<p style="color:var(--text-muted);text-align:center;padding:2rem;grid-column:1/-1;">Aucun domaine fonctionnel defini. Cliquez sur le bouton ci-dessous pour commencer.</p>';
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
function updateModulesNav() {
|
|
1843
|
+
const nav = document.getElementById('modulesNav');
|
|
1844
|
+
const navItems = data.modules.map(m => `
|
|
1845
|
+
<a class="nav-item" onclick="showSection('module-spec-${m.code}')" data-section="module-spec-${m.code}">
|
|
1846
|
+
<span class="nav-icon">●</span> ${m.name}
|
|
1847
|
+
<span class="nav-badge">${(data.moduleSpecs[m.code]?.useCases || []).length}</span>
|
|
1848
|
+
</a>
|
|
1849
|
+
`).join('');
|
|
1850
|
+
nav.innerHTML = '<div class="nav-group-title">3. Specification</div>' + (navItems || '<div style="padding:0.3rem 1rem;font-size:0.8rem;color:var(--text-muted);font-style:italic;">Aucun domaine</div>');
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
/* ============================================
|
|
1854
|
+
DEPENDENCY MANAGEMENT
|
|
1855
|
+
============================================ */
|
|
1856
|
+
function updateDepSelects() {
|
|
1857
|
+
const fromSel = document.getElementById('dep-from');
|
|
1858
|
+
const toSel = document.getElementById('dep-to');
|
|
1859
|
+
if (!fromSel || !toSel) return;
|
|
1860
|
+
const opts = data.modules.map(m => `<option value="${m.code}">${m.name}</option>`).join('');
|
|
1861
|
+
fromSel.innerHTML = opts;
|
|
1862
|
+
toSel.innerHTML = opts;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
function addDependency() {
|
|
1866
|
+
const from = document.getElementById('dep-from').value;
|
|
1867
|
+
const to = document.getElementById('dep-to').value;
|
|
1868
|
+
if (!from || !to || from === to) return;
|
|
1869
|
+
if (data.dependencies.some(d => d.from === from && d.to === to)) return;
|
|
1870
|
+
|
|
1871
|
+
data.dependencies.push({
|
|
1872
|
+
from: from,
|
|
1873
|
+
to: to,
|
|
1874
|
+
description: document.getElementById('dep-desc').value.trim()
|
|
1875
|
+
});
|
|
1876
|
+
document.getElementById('dep-desc').value = '';
|
|
1877
|
+
|
|
1878
|
+
renderDependencies();
|
|
1879
|
+
autoSave();
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
function removeDependency(index) {
|
|
1883
|
+
data.dependencies.splice(index, 1);
|
|
1884
|
+
renderDependencies();
|
|
1885
|
+
autoSave();
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
function renderDependencies() {
|
|
1889
|
+
// Render dependency list
|
|
1890
|
+
const depList = document.getElementById('depList');
|
|
1891
|
+
if (depList) {
|
|
1892
|
+
depList.innerHTML = data.dependencies.map((d, i) => {
|
|
1893
|
+
const fromName = data.modules.find(m => m.code === d.from)?.name || d.from;
|
|
1894
|
+
const toName = data.modules.find(m => m.code === d.to)?.name || d.to;
|
|
1895
|
+
return `
|
|
1896
|
+
<div class="interaction-item">
|
|
1897
|
+
<span style="font-weight:600;color:var(--text-bright);">${fromName}</span>
|
|
1898
|
+
<span class="interaction-arrow">→</span>
|
|
1899
|
+
<span style="font-weight:600;color:var(--text-bright);">${toName}</span>
|
|
1900
|
+
<span style="flex:1;font-size:0.8rem;color:var(--text-muted);">${d.description || ''}</span>
|
|
1901
|
+
<button class="btn btn-sm" onclick="removeDependency(${i})" style="opacity:0.5;">Supprimer</button>
|
|
1902
|
+
</div>
|
|
1903
|
+
`;
|
|
1904
|
+
}).join('');
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
// Render graph
|
|
1908
|
+
renderDepGraph();
|
|
1909
|
+
// Render processing order
|
|
1910
|
+
renderProcessingOrder();
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
function renderDepGraph() {
|
|
1914
|
+
const graph = document.getElementById('depGraph');
|
|
1915
|
+
if (!graph || data.modules.length === 0) return;
|
|
1916
|
+
|
|
1917
|
+
const layers = computeTopologicalLayers();
|
|
1918
|
+
if (!layers) {
|
|
1919
|
+
graph.innerHTML = '<p style="color:var(--error);text-align:center;padding:1rem;">Dependance circulaire detectee ! Corrigez les dependances.</p>';
|
|
1920
|
+
return;
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
graph.innerHTML = layers.map((layer, i) => `
|
|
1924
|
+
<div class="dep-layer">
|
|
1925
|
+
<div class="dep-layer-label">Couche ${i + 1}</div>
|
|
1926
|
+
<div class="dep-layer-modules">
|
|
1927
|
+
${layer.map(code => {
|
|
1928
|
+
const m = data.modules.find(mod => mod.code === code);
|
|
1929
|
+
return `<div class="dep-module">${m ? m.name : code}</div>`;
|
|
1930
|
+
}).join('')}
|
|
1931
|
+
</div>
|
|
1932
|
+
</div>
|
|
1933
|
+
${i < layers.length - 1 ? '<div class="dep-arrow">↓</div>' : ''}
|
|
1934
|
+
`).join('');
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
function computeTopologicalLayers() {
|
|
1938
|
+
const codes = data.modules.map(m => m.code);
|
|
1939
|
+
const inDeg = {};
|
|
1940
|
+
const adj = {};
|
|
1941
|
+
codes.forEach(c => { inDeg[c] = 0; adj[c] = []; });
|
|
1942
|
+
data.dependencies.forEach(d => {
|
|
1943
|
+
if (inDeg[d.from] !== undefined && adj[d.to] !== undefined) {
|
|
1944
|
+
adj[d.to].push(d.from);
|
|
1945
|
+
inDeg[d.from]++;
|
|
1946
|
+
}
|
|
1947
|
+
});
|
|
1948
|
+
|
|
1949
|
+
const layers = [];
|
|
1950
|
+
let remaining = new Set(codes);
|
|
1951
|
+
while (remaining.size > 0) {
|
|
1952
|
+
const layer = [];
|
|
1953
|
+
remaining.forEach(c => {
|
|
1954
|
+
if (inDeg[c] === 0) layer.push(c);
|
|
1955
|
+
});
|
|
1956
|
+
if (layer.length === 0) return null; // cycle
|
|
1957
|
+
layers.push(layer);
|
|
1958
|
+
layer.forEach(c => {
|
|
1959
|
+
remaining.delete(c);
|
|
1960
|
+
(adj[c] || []).forEach(dep => { inDeg[dep]--; });
|
|
1961
|
+
});
|
|
1962
|
+
}
|
|
1963
|
+
return layers;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
function renderProcessingOrder() {
|
|
1967
|
+
const container = document.getElementById('processingOrder');
|
|
1968
|
+
if (!container) return;
|
|
1969
|
+
const layers = computeTopologicalLayers();
|
|
1970
|
+
if (!layers) { container.innerHTML = ''; return; }
|
|
1971
|
+
const order = layers.flat();
|
|
1972
|
+
container.innerHTML = order.map((code, i) => {
|
|
1973
|
+
const m = data.modules.find(mod => mod.code === code);
|
|
1974
|
+
return `
|
|
1975
|
+
<div class="process-step">
|
|
1976
|
+
<div class="process-step-number">Etape ${i + 1}</div>
|
|
1977
|
+
<div class="process-step-label">${m ? m.name : code}</div>
|
|
1978
|
+
</div>
|
|
1979
|
+
${i < order.length - 1 ? '<div class="process-arrow">→</div>' : ''}
|
|
1980
|
+
`;
|
|
1981
|
+
}).join('');
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
/* ============================================
|
|
1985
|
+
MODULE SPECIFICATION (per module)
|
|
1986
|
+
============================================ */
|
|
1987
|
+
function renderAllModuleSpecs() {
|
|
1988
|
+
const container = document.getElementById('moduleSpecContainer');
|
|
1989
|
+
container.innerHTML = data.modules.map(m => renderModuleSpecSection(m)).join('');
|
|
1990
|
+
// Bind editable fields in module specs
|
|
1991
|
+
container.querySelectorAll('.editable[data-module-field]').forEach(el => {
|
|
1992
|
+
el.addEventListener('blur', function() {
|
|
1993
|
+
const code = this.dataset.moduleCode;
|
|
1994
|
+
const field = this.dataset.moduleField;
|
|
1995
|
+
if (data.moduleSpecs[code]) {
|
|
1996
|
+
data.moduleSpecs[code][field] = this.textContent.trim();
|
|
1997
|
+
autoSave();
|
|
1998
|
+
}
|
|
1999
|
+
});
|
|
2000
|
+
});
|
|
2001
|
+
// Restore currently visible section after re-render
|
|
2002
|
+
restoreCurrentSection();
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
function renderModuleSpecSection(mod) {
|
|
2006
|
+
const code = mod.code;
|
|
2007
|
+
const spec = data.moduleSpecs[code] || { useCases: [], businessRules: [], entities: [], permissions: [], notes: '' };
|
|
2008
|
+
|
|
2009
|
+
return `
|
|
2010
|
+
<div class="section" id="module-spec-${code}" style="display:none;">
|
|
2011
|
+
<h2 class="section-title">${mod.name}</h2>
|
|
2012
|
+
<p class="section-subtitle">${mod.description || 'Specification detaillee de ce domaine fonctionnel.'}</p>
|
|
2013
|
+
|
|
2014
|
+
<div class="tab-bar">
|
|
2015
|
+
<button class="tab-btn active" onclick="switchTab('${code}', 'uc')">Cas d'utilisation</button>
|
|
2016
|
+
<button class="tab-btn" onclick="switchTab('${code}', 'br')">Regles metier</button>
|
|
2017
|
+
<button class="tab-btn" onclick="switchTab('${code}', 'ent')">Donnees</button>
|
|
2018
|
+
<button class="tab-btn" onclick="switchTab('${code}', 'perm')">Droits d'acces</button>
|
|
2019
|
+
<button class="tab-btn" onclick="switchTab('${code}', 'mock')">Maquettes</button>
|
|
2020
|
+
<button class="tab-btn" onclick="switchTab('${code}', 'notes')">Notes</button>
|
|
2021
|
+
</div>
|
|
2022
|
+
|
|
2023
|
+
<!-- TAB: Cas d'utilisation -->
|
|
2024
|
+
<div class="tab-panel active" id="tab-${code}-uc">
|
|
2025
|
+
<p style="font-size:0.85rem;color:var(--text-muted);margin-bottom:1rem;">Decrivez ce que chaque type d'utilisateur peut faire dans ce domaine. Un cas d'utilisation = une action concrete.</p>
|
|
2026
|
+
<div id="ucList-${code}" class="uc-list">
|
|
2027
|
+
${spec.useCases.map((uc, i) => renderUseCase(code, uc, i)).join('')}
|
|
2028
|
+
</div>
|
|
2029
|
+
<button class="add-btn" onclick="toggleForm('addUcForm-${code}')">+ Ajouter un cas d'utilisation</button>
|
|
2030
|
+
<div class="inline-form" id="addUcForm-${code}">
|
|
2031
|
+
<div class="inline-form-title">Nouveau cas d'utilisation</div>
|
|
2032
|
+
<div class="form-group">
|
|
2033
|
+
<label class="form-label">Que fait l'utilisateur ? (exemple : Creer une commande)</label>
|
|
2034
|
+
<input type="text" class="form-input" id="uc-name-${code}" placeholder="Action concrete de l'utilisateur">
|
|
2035
|
+
</div>
|
|
2036
|
+
<div class="form-group">
|
|
2037
|
+
<label class="form-label">Qui realise cette action ? (profil utilisateur)</label>
|
|
2038
|
+
<input type="text" class="form-input" id="uc-actor-${code}" placeholder="Exemple : Responsable de production">
|
|
2039
|
+
</div>
|
|
2040
|
+
<div class="form-group">
|
|
2041
|
+
<label class="form-label">Deroulement normal, etape par etape (une par ligne)</label>
|
|
2042
|
+
<textarea class="form-textarea" id="uc-steps-${code}" placeholder="1. L'utilisateur ouvre la page de creation 2. Il remplit les champs obligatoires 3. Il valide le formulaire 4. Le systeme enregistre et confirme"></textarea>
|
|
2043
|
+
</div>
|
|
2044
|
+
<div class="form-group">
|
|
2045
|
+
<label class="form-label">Que se passe-t-il si quelque chose ne va pas ? (optionnel)</label>
|
|
2046
|
+
<textarea class="form-textarea" id="uc-alt-${code}" placeholder="Exemple : Si les donnees sont incorrectes, le systeme affiche un message d'erreur" style="min-height:50px;"></textarea>
|
|
2047
|
+
</div>
|
|
2048
|
+
<div class="form-actions">
|
|
2049
|
+
<button class="btn" onclick="toggleForm('addUcForm-${code}')">Annuler</button>
|
|
2050
|
+
<button class="btn btn-primary" onclick="addUseCase('${code}')">Ajouter</button>
|
|
2051
|
+
</div>
|
|
2052
|
+
</div>
|
|
2053
|
+
</div>
|
|
2054
|
+
|
|
2055
|
+
<!-- TAB: Regles metier -->
|
|
2056
|
+
<div class="tab-panel" id="tab-${code}-br">
|
|
2057
|
+
<p style="font-size:0.85rem;color:var(--text-muted);margin-bottom:1rem;">Les regles que le systeme doit respecter. Formulez-les sous forme de conditions : "Si... alors... sinon..."</p>
|
|
2058
|
+
<div id="brList-${code}">
|
|
2059
|
+
${spec.businessRules.map((br, i) => renderBusinessRule(code, br, i)).join('')}
|
|
2060
|
+
</div>
|
|
2061
|
+
<button class="add-btn" onclick="toggleForm('addBrForm-${code}')">+ Ajouter une regle metier</button>
|
|
2062
|
+
<div class="inline-form" id="addBrForm-${code}">
|
|
2063
|
+
<div class="inline-form-title">Nouvelle regle metier</div>
|
|
2064
|
+
<div class="form-group">
|
|
2065
|
+
<label class="form-label">Nom court de la regle</label>
|
|
2066
|
+
<input type="text" class="form-input" id="br-name-${code}" placeholder="Exemple : Verification du budget disponible">
|
|
2067
|
+
</div>
|
|
2068
|
+
<div class="form-group">
|
|
2069
|
+
<label class="form-label">Categorie</label>
|
|
2070
|
+
<select class="form-select" id="br-cat-${code}">
|
|
2071
|
+
<option value="validation">Verification (le systeme verifie que...)</option>
|
|
2072
|
+
<option value="calculation">Calcul (le systeme calcule...)</option>
|
|
2073
|
+
<option value="workflow">Processus (quand X se produit, alors...)</option>
|
|
2074
|
+
<option value="security">Securite (seul... peut...)</option>
|
|
2075
|
+
<option value="data">Donnees (les donnees doivent...)</option>
|
|
2076
|
+
</select>
|
|
2077
|
+
</div>
|
|
2078
|
+
<div class="form-group">
|
|
2079
|
+
<label class="form-label">Formulation de la regle (Si... alors... sinon...)</label>
|
|
2080
|
+
<textarea class="form-textarea" id="br-statement-${code}" placeholder="Si le montant de la commande depasse le budget du client, alors la commande est refusee et un message d'erreur s'affiche"></textarea>
|
|
2081
|
+
</div>
|
|
2082
|
+
<div class="form-group">
|
|
2083
|
+
<label class="form-label">Exemple concret (optionnel)</label>
|
|
2084
|
+
<input type="text" class="form-input" id="br-example-${code}" placeholder="Exemple : Commande de 5000 CHF, budget de 2000 CHF → refusee">
|
|
2085
|
+
</div>
|
|
2086
|
+
<div class="form-actions">
|
|
2087
|
+
<button class="btn" onclick="toggleForm('addBrForm-${code}')">Annuler</button>
|
|
2088
|
+
<button class="btn btn-primary" onclick="addBusinessRule('${code}')">Ajouter</button>
|
|
2089
|
+
</div>
|
|
2090
|
+
</div>
|
|
2091
|
+
</div>
|
|
2092
|
+
|
|
2093
|
+
<!-- TAB: Donnees (Entites) -->
|
|
2094
|
+
<div class="tab-panel" id="tab-${code}-ent">
|
|
2095
|
+
<p style="font-size:0.85rem;color:var(--text-muted);margin-bottom:1rem;">Les types de donnees que ce domaine gere. Decrivez les informations importantes a enregistrer pour chaque type.</p>
|
|
2096
|
+
<div id="entList-${code}">
|
|
2097
|
+
${spec.entities.map((ent, i) => renderEntity(code, ent, i)).join('')}
|
|
2098
|
+
</div>
|
|
2099
|
+
<button class="add-btn" onclick="toggleForm('addEntForm-${code}')">+ Ajouter un type de donnees</button>
|
|
2100
|
+
<div class="inline-form" id="addEntForm-${code}">
|
|
2101
|
+
<div class="inline-form-title">Nouveau type de donnees</div>
|
|
2102
|
+
<div class="form-group">
|
|
2103
|
+
<label class="form-label">Nom (exemple : Commande, Client, Facture)</label>
|
|
2104
|
+
<input type="text" class="form-input" id="ent-name-${code}" placeholder="Nom du type de donnees">
|
|
2105
|
+
</div>
|
|
2106
|
+
<div class="form-group">
|
|
2107
|
+
<label class="form-label">Description : a quoi sert cette donnee ?</label>
|
|
2108
|
+
<textarea class="form-textarea" id="ent-desc-${code}" placeholder="En une ou deux phrases, decrivez ce que represente cette donnee dans votre activite" style="min-height:50px;"></textarea>
|
|
2109
|
+
</div>
|
|
2110
|
+
<div class="form-group">
|
|
2111
|
+
<label class="form-label">Informations a enregistrer (une par ligne : Nom - Description)</label>
|
|
2112
|
+
<textarea class="form-textarea" id="ent-attrs-${code}" placeholder="Numero - Identifiant unique de la commande Date - Date de creation de la commande Montant total - Somme des lignes Statut - Brouillon, Envoyee, Validee, Refusee"></textarea>
|
|
2113
|
+
</div>
|
|
2114
|
+
<div class="form-group">
|
|
2115
|
+
<label class="form-label">Relations avec d'autres donnees (optionnel, une par ligne)</label>
|
|
2116
|
+
<textarea class="form-textarea" id="ent-rels-${code}" placeholder="Client - Chaque commande appartient a un client Ligne de commande - Une commande contient plusieurs lignes" style="min-height:50px;"></textarea>
|
|
2117
|
+
</div>
|
|
2118
|
+
<div class="form-actions">
|
|
2119
|
+
<button class="btn" onclick="toggleForm('addEntForm-${code}')">Annuler</button>
|
|
2120
|
+
<button class="btn btn-primary" onclick="addEntity('${code}')">Ajouter</button>
|
|
2121
|
+
</div>
|
|
2122
|
+
</div>
|
|
2123
|
+
</div>
|
|
2124
|
+
|
|
2125
|
+
<!-- TAB: Droits d'acces -->
|
|
2126
|
+
<div class="tab-panel" id="tab-${code}-perm">
|
|
2127
|
+
<p style="font-size:0.85rem;color:var(--text-muted);margin-bottom:1rem;">Definissez qui peut faire quoi dans ce domaine. Cochez les actions autorisees pour chaque profil.</p>
|
|
2128
|
+
<div id="permGrid-${code}">
|
|
2129
|
+
${renderPermissionGrid(code)}
|
|
2130
|
+
</div>
|
|
2131
|
+
</div>
|
|
2132
|
+
|
|
2133
|
+
<!-- TAB: Maquettes -->
|
|
2134
|
+
<div class="tab-panel" id="tab-${code}-mock">
|
|
2135
|
+
<p style="font-size:0.85rem;color:var(--text-muted);margin-bottom:1rem;">Exemples visuels des ecrans principaux de ce domaine. Ces maquettes montrent la disposition generale, pas le design final.</p>
|
|
2136
|
+
|
|
2137
|
+
<div class="mockup-frame">
|
|
2138
|
+
<div class="mockup-toolbar">
|
|
2139
|
+
<div class="mockup-dot mockup-dot-red"></div>
|
|
2140
|
+
<div class="mockup-dot mockup-dot-yellow"></div>
|
|
2141
|
+
<div class="mockup-dot mockup-dot-green"></div>
|
|
2142
|
+
<span class="mockup-title">${mod.name} - Liste</span>
|
|
2143
|
+
</div>
|
|
2144
|
+
<div class="mockup-content">
|
|
2145
|
+
<div class="mock-header">
|
|
2146
|
+
<div class="mock-title">${mod.name}</div>
|
|
2147
|
+
<div class="mock-btn">+ Nouveau</div>
|
|
2148
|
+
</div>
|
|
2149
|
+
<div class="mock-search">Rechercher...</div>
|
|
2150
|
+
<table class="mock-table">
|
|
2151
|
+
<thead><tr>
|
|
2152
|
+
${(mod.entities || []).slice(0, 1).length > 0 ? '<th>Identifiant</th><th>Nom</th><th>Statut</th><th>Date</th><th>Actions</th>' : '<th>Colonne 1</th><th>Colonne 2</th><th>Statut</th><th>Actions</th>'}
|
|
2153
|
+
</tr></thead>
|
|
2154
|
+
<tbody>
|
|
2155
|
+
<tr><td style="color:var(--primary-light);">001</td><td>Exemple 1</td><td><span class="mock-status mock-status-active">Actif</span></td><td>Aujourd'hui</td><td style="color:var(--text-muted);">Voir | Modifier</td></tr>
|
|
2156
|
+
<tr><td style="color:var(--primary-light);">002</td><td>Exemple 2</td><td><span class="mock-status mock-status-pending">En attente</span></td><td>Hier</td><td style="color:var(--text-muted);">Voir | Modifier</td></tr>
|
|
2157
|
+
<tr><td style="color:var(--primary-light);">003</td><td>Exemple 3</td><td><span class="mock-status mock-status-draft">Brouillon</span></td><td>Il y a 3 jours</td><td style="color:var(--text-muted);">Voir | Modifier</td></tr>
|
|
2158
|
+
</tbody>
|
|
2159
|
+
</table>
|
|
2160
|
+
</div>
|
|
2161
|
+
</div>
|
|
2162
|
+
|
|
2163
|
+
<div class="mockup-frame" style="margin-top:1rem;">
|
|
2164
|
+
<div class="mockup-toolbar">
|
|
2165
|
+
<div class="mockup-dot mockup-dot-red"></div>
|
|
2166
|
+
<div class="mockup-dot mockup-dot-yellow"></div>
|
|
2167
|
+
<div class="mockup-dot mockup-dot-green"></div>
|
|
2168
|
+
<span class="mockup-title">${mod.name} - Formulaire de creation</span>
|
|
2169
|
+
</div>
|
|
2170
|
+
<div class="mockup-content">
|
|
2171
|
+
<div class="mock-header">
|
|
2172
|
+
<div class="mock-title">Nouveau ${(mod.entities || [])[0] || 'enregistrement'}</div>
|
|
2173
|
+
</div>
|
|
2174
|
+
<div class="mock-form-row">
|
|
2175
|
+
<div class="mock-form-group"><div class="mock-label">Identifiant</div><div class="mock-input" style="color:var(--text-muted);">Genere automatiquement</div></div>
|
|
2176
|
+
<div class="mock-form-group"><div class="mock-label">Nom</div><div class="mock-input"></div></div>
|
|
2177
|
+
</div>
|
|
2178
|
+
<div class="mock-form-group"><div class="mock-label">Description</div><div class="mock-input" style="height:60px;"></div></div>
|
|
2179
|
+
<div class="mock-form-actions">
|
|
2180
|
+
<div class="mock-btn" style="background:var(--bg-hover);color:var(--text);">Annuler</div>
|
|
2181
|
+
<div class="mock-btn">Enregistrer</div>
|
|
2182
|
+
</div>
|
|
2183
|
+
</div>
|
|
2184
|
+
</div>
|
|
2185
|
+
|
|
2186
|
+
<div class="card" style="margin-top:1rem;">
|
|
2187
|
+
<div class="card-label">Notes sur les maquettes</div>
|
|
2188
|
+
<div class="editable" contenteditable="true" data-module-code="${code}" data-module-field="mockupNotes" data-placeholder="Ajoutez vos remarques sur les maquettes : elements manquants, disposition souhaitee, comportements particuliers...">${spec.mockupNotes || ''}</div>
|
|
2189
|
+
</div>
|
|
2190
|
+
</div>
|
|
2191
|
+
|
|
2192
|
+
<!-- TAB: Notes -->
|
|
2193
|
+
<div class="tab-panel" id="tab-${code}-notes">
|
|
2194
|
+
<p style="font-size:0.85rem;color:var(--text-muted);margin-bottom:1rem;">Notes libres, questions en suspens, elements a clarifier pour ce domaine.</p>
|
|
2195
|
+
<div class="card">
|
|
2196
|
+
<div class="editable" contenteditable="true" data-module-code="${code}" data-module-field="notes" data-placeholder="Notez ici tout ce qui concerne ce domaine : questions, precisions, contraintes particulieres...">${spec.notes || ''}</div>
|
|
2197
|
+
</div>
|
|
2198
|
+
</div>
|
|
2199
|
+
</div>`;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
function renderUseCase(code, uc, index) {
|
|
2203
|
+
return `
|
|
2204
|
+
<div class="uc-item">
|
|
2205
|
+
<div class="uc-header">
|
|
2206
|
+
<span class="uc-id">UC-${String(index + 1).padStart(3, '0')}</span>
|
|
2207
|
+
<span class="uc-title">${uc.name}</span>
|
|
2208
|
+
<div class="uc-actions">
|
|
2209
|
+
<button class="btn btn-sm" onclick="removeUseCase('${code}',${index})">Supprimer</button>
|
|
2210
|
+
</div>
|
|
2211
|
+
</div>
|
|
2212
|
+
<div class="uc-actors"><div class="uc-actor">${uc.actor}</div></div>
|
|
2213
|
+
${uc.steps ? `<div class="uc-detail-label">Deroulement</div><div class="uc-detail">${uc.steps.replace(/\n/g, '<br>')}</div>` : ''}
|
|
2214
|
+
${uc.alternative ? `<div class="uc-detail-label">En cas de probleme</div><div class="uc-detail" style="color:var(--warning);">${uc.alternative}</div>` : ''}
|
|
2215
|
+
</div>`;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
function addUseCase(code) {
|
|
2219
|
+
const name = document.getElementById('uc-name-' + code).value.trim();
|
|
2220
|
+
if (!name) return;
|
|
2221
|
+
if (!data.moduleSpecs[code]) data.moduleSpecs[code] = { useCases: [], businessRules: [], entities: [], permissions: [], notes: '' };
|
|
2222
|
+
|
|
2223
|
+
data.moduleSpecs[code].useCases.push({
|
|
2224
|
+
name: name,
|
|
2225
|
+
actor: document.getElementById('uc-actor-' + code).value.trim(),
|
|
2226
|
+
steps: document.getElementById('uc-steps-' + code).value.trim(),
|
|
2227
|
+
alternative: document.getElementById('uc-alt-' + code).value.trim()
|
|
2228
|
+
});
|
|
2229
|
+
|
|
2230
|
+
renderAllModuleSpecs();
|
|
2231
|
+
updateCounts();
|
|
2232
|
+
autoSave();
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
function removeUseCase(code, index) {
|
|
2236
|
+
data.moduleSpecs[code].useCases.splice(index, 1);
|
|
2237
|
+
renderAllModuleSpecs();
|
|
2238
|
+
updateCounts();
|
|
2239
|
+
autoSave();
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
function renderBusinessRule(code, br, index) {
|
|
2243
|
+
const catColors = { validation: 'br-cat-validation', calculation: 'br-cat-calculation', workflow: 'br-cat-workflow', security: 'br-cat-security', data: 'br-cat-data' };
|
|
2244
|
+
const catLabels = { validation: 'Verification', calculation: 'Calcul', workflow: 'Processus', security: 'Securite', data: 'Donnees' };
|
|
2245
|
+
return `
|
|
2246
|
+
<div class="br-item">
|
|
2247
|
+
<span class="br-category ${catColors[br.category] || 'br-cat-validation'}">${catLabels[br.category] || br.category}</span>
|
|
2248
|
+
<div class="br-text">
|
|
2249
|
+
<div style="font-weight:600;color:var(--text-bright);margin-bottom:0.2rem;">${br.name}</div>
|
|
2250
|
+
<div>${br.statement}</div>
|
|
2251
|
+
${br.example ? `<div style="font-size:0.8rem;color:var(--text-muted);margin-top:0.25rem;font-style:italic;">Exemple : ${br.example}</div>` : ''}
|
|
2252
|
+
</div>
|
|
2253
|
+
<button class="btn btn-sm" onclick="removeBusinessRule('${code}',${index})" style="opacity:0.5;flex-shrink:0;">✕</button>
|
|
2254
|
+
</div>`;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
function addBusinessRule(code) {
|
|
2258
|
+
const name = document.getElementById('br-name-' + code).value.trim();
|
|
2259
|
+
if (!name) return;
|
|
2260
|
+
if (!data.moduleSpecs[code]) data.moduleSpecs[code] = { useCases: [], businessRules: [], entities: [], permissions: [], notes: '' };
|
|
2261
|
+
|
|
2262
|
+
data.moduleSpecs[code].businessRules.push({
|
|
2263
|
+
name: name,
|
|
2264
|
+
category: document.getElementById('br-cat-' + code).value,
|
|
2265
|
+
statement: document.getElementById('br-statement-' + code).value.trim(),
|
|
2266
|
+
example: document.getElementById('br-example-' + code).value.trim()
|
|
2267
|
+
});
|
|
2268
|
+
|
|
2269
|
+
renderAllModuleSpecs();
|
|
2270
|
+
autoSave();
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
function removeBusinessRule(code, index) {
|
|
2274
|
+
data.moduleSpecs[code].businessRules.splice(index, 1);
|
|
2275
|
+
renderAllModuleSpecs();
|
|
2276
|
+
autoSave();
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
function renderEntity(code, ent, index) {
|
|
2280
|
+
return `
|
|
2281
|
+
<div class="entity-block">
|
|
2282
|
+
<div class="entity-header">
|
|
2283
|
+
<div>
|
|
2284
|
+
<div class="entity-name">${ent.name}</div>
|
|
2285
|
+
<div class="entity-desc">${ent.description || ''}</div>
|
|
2286
|
+
</div>
|
|
2287
|
+
<button class="btn btn-sm" onclick="removeEntity('${code}',${index})" style="opacity:0.5;">Supprimer</button>
|
|
2288
|
+
</div>
|
|
2289
|
+
${(ent.attributes || []).length > 0 ? `
|
|
2290
|
+
<table class="attr-table">
|
|
2291
|
+
<thead><tr><th>Information</th><th>Description</th></tr></thead>
|
|
2292
|
+
<tbody>
|
|
2293
|
+
${ent.attributes.map(a => `<tr><td style="font-weight:500;color:var(--text-bright);">${a.name}</td><td>${a.description || ''}</td></tr>`).join('')}
|
|
2294
|
+
</tbody>
|
|
2295
|
+
</table>` : ''}
|
|
2296
|
+
${(ent.relationships || []).length > 0 ? `
|
|
2297
|
+
<div style="padding:0.5rem 0.75rem;font-size:0.8rem;color:var(--text-muted);border-top:1px solid var(--border);">
|
|
2298
|
+
Relations : ${ent.relationships.map(r => `<span style="color:var(--accent);">${r}</span>`).join(', ')}
|
|
2299
|
+
</div>` : ''}
|
|
2300
|
+
</div>`;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
function addEntity(code) {
|
|
2304
|
+
const name = document.getElementById('ent-name-' + code).value.trim();
|
|
2305
|
+
if (!name) return;
|
|
2306
|
+
if (!data.moduleSpecs[code]) data.moduleSpecs[code] = { useCases: [], businessRules: [], entities: [], permissions: [], notes: '' };
|
|
2307
|
+
|
|
2308
|
+
const attrs = document.getElementById('ent-attrs-' + code).value.split('\n').filter(l => l.trim()).map(l => {
|
|
2309
|
+
const parts = l.split(' - ');
|
|
2310
|
+
return { name: parts[0]?.trim() || l.trim(), description: parts.slice(1).join(' - ').trim() };
|
|
2311
|
+
});
|
|
2312
|
+
const rels = document.getElementById('ent-rels-' + code).value.split('\n').filter(l => l.trim());
|
|
2313
|
+
|
|
2314
|
+
data.moduleSpecs[code].entities.push({
|
|
2315
|
+
name: name,
|
|
2316
|
+
description: document.getElementById('ent-desc-' + code).value.trim(),
|
|
2317
|
+
attributes: attrs,
|
|
2318
|
+
relationships: rels
|
|
2319
|
+
});
|
|
2320
|
+
|
|
2321
|
+
renderAllModuleSpecs();
|
|
2322
|
+
autoSave();
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2325
|
+
function removeEntity(code, index) {
|
|
2326
|
+
data.moduleSpecs[code].entities.splice(index, 1);
|
|
2327
|
+
renderAllModuleSpecs();
|
|
2328
|
+
autoSave();
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
function renderPermissionGrid(code) {
|
|
2332
|
+
const roles = data.cadrage.stakeholders.length > 0
|
|
2333
|
+
? data.cadrage.stakeholders.map(s => s.role)
|
|
2334
|
+
: ['Administrateur', 'Responsable', 'Contributeur', 'Lecteur'];
|
|
2335
|
+
const actions = ['Consulter', 'Creer', 'Modifier', 'Supprimer', 'Valider', 'Exporter'];
|
|
2336
|
+
|
|
2337
|
+
const perms = data.moduleSpecs[code]?.permissions || [];
|
|
2338
|
+
|
|
2339
|
+
return `
|
|
2340
|
+
<table class="mock-table" style="background:var(--bg-card);border-radius:8px;overflow:hidden;">
|
|
2341
|
+
<thead><tr>
|
|
2342
|
+
<th>Profil</th>
|
|
2343
|
+
${actions.map(a => `<th style="text-align:center;">${a}</th>`).join('')}
|
|
2344
|
+
</tr></thead>
|
|
2345
|
+
<tbody>
|
|
2346
|
+
${roles.map(role => `
|
|
2347
|
+
<tr>
|
|
2348
|
+
<td style="font-weight:500;color:var(--text-bright);">${role}</td>
|
|
2349
|
+
${actions.map(action => {
|
|
2350
|
+
const key = role + '|' + action;
|
|
2351
|
+
const checked = perms.includes(key);
|
|
2352
|
+
return `<td style="text-align:center;"><input type="checkbox" ${checked ? 'checked' : ''} onchange="togglePermission('${code}','${key}',this.checked)" style="cursor:pointer;width:16px;height:16px;"></td>`;
|
|
2353
|
+
}).join('')}
|
|
2354
|
+
</tr>
|
|
2355
|
+
`).join('')}
|
|
2356
|
+
</tbody>
|
|
2357
|
+
</table>`;
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
function togglePermission(code, key, checked) {
|
|
2361
|
+
if (!data.moduleSpecs[code]) data.moduleSpecs[code] = { useCases: [], businessRules: [], entities: [], permissions: [], notes: '' };
|
|
2362
|
+
if (!data.moduleSpecs[code].permissions) data.moduleSpecs[code].permissions = [];
|
|
2363
|
+
if (checked) {
|
|
2364
|
+
if (!data.moduleSpecs[code].permissions.includes(key)) data.moduleSpecs[code].permissions.push(key);
|
|
2365
|
+
} else {
|
|
2366
|
+
data.moduleSpecs[code].permissions = data.moduleSpecs[code].permissions.filter(p => p !== key);
|
|
2367
|
+
}
|
|
2368
|
+
autoSave();
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
function switchTab(code, tabId) {
|
|
2372
|
+
const section = document.getElementById('module-spec-' + code);
|
|
2373
|
+
if (!section) return;
|
|
2374
|
+
section.querySelectorAll('.tab-btn').forEach(btn => btn.classList.remove('active'));
|
|
2375
|
+
section.querySelectorAll('.tab-panel').forEach(panel => panel.classList.remove('active'));
|
|
2376
|
+
const targetPanel = document.getElementById('tab-' + code + '-' + tabId);
|
|
2377
|
+
if (targetPanel) targetPanel.classList.add('active');
|
|
2378
|
+
// Activate the clicked button
|
|
2379
|
+
const buttons = section.querySelectorAll('.tab-btn');
|
|
2380
|
+
const tabIndex = { uc: 0, br: 1, ent: 2, perm: 3, mock: 4, notes: 5 }[tabId];
|
|
2381
|
+
if (buttons[tabIndex]) buttons[tabIndex].classList.add('active');
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
/* ============================================
|
|
2385
|
+
CONSOLIDATION
|
|
2386
|
+
============================================ */
|
|
2387
|
+
function renderConsolidation() {
|
|
2388
|
+
renderConsolInteractions();
|
|
2389
|
+
renderConsolPermissions();
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
function renderConsolInteractions() {
|
|
2393
|
+
const container = document.getElementById('consolInteractions');
|
|
2394
|
+
if (!container || data.dependencies.length === 0) return;
|
|
2395
|
+
|
|
2396
|
+
container.innerHTML = data.dependencies.map(d => {
|
|
2397
|
+
const fromName = data.modules.find(m => m.code === d.from)?.name || d.from;
|
|
2398
|
+
const toName = data.modules.find(m => m.code === d.to)?.name || d.to;
|
|
2399
|
+
return `
|
|
2400
|
+
<div class="interaction-item">
|
|
2401
|
+
<span style="font-weight:600;color:var(--text-bright);">${fromName}</span>
|
|
2402
|
+
<span class="interaction-arrow">→</span>
|
|
2403
|
+
<span style="font-weight:600;color:var(--text-bright);">${toName}</span>
|
|
2404
|
+
<span class="interaction-type">Dependance</span>
|
|
2405
|
+
<span style="flex:1;font-size:0.8rem;color:var(--text-muted);">${d.description || ''}</span>
|
|
2406
|
+
</div>`;
|
|
2407
|
+
}).join('');
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
function renderConsolPermissions() {
|
|
2411
|
+
const container = document.getElementById('consolPermissions');
|
|
2412
|
+
if (!container || data.modules.length === 0) return;
|
|
2413
|
+
|
|
2414
|
+
const roles = data.cadrage.stakeholders.length > 0
|
|
2415
|
+
? data.cadrage.stakeholders.map(s => s.role)
|
|
2416
|
+
: ['Administrateur', 'Responsable', 'Contributeur', 'Lecteur'];
|
|
2417
|
+
|
|
2418
|
+
let html = '<table class="mock-table" style="background:var(--bg-card);border-radius:8px;overflow:hidden;">';
|
|
2419
|
+
html += '<thead><tr><th>Profil</th>';
|
|
2420
|
+
data.modules.forEach(m => { html += `<th style="text-align:center;">${m.name}</th>`; });
|
|
2421
|
+
html += '</tr></thead><tbody>';
|
|
2422
|
+
|
|
2423
|
+
roles.forEach(role => {
|
|
2424
|
+
html += `<tr><td style="font-weight:500;color:var(--text-bright);">${role}</td>`;
|
|
2425
|
+
data.modules.forEach(m => {
|
|
2426
|
+
const perms = (data.moduleSpecs[m.code]?.permissions || []).filter(p => p.startsWith(role + '|'));
|
|
2427
|
+
const count = perms.length;
|
|
2428
|
+
const color = count > 4 ? 'var(--success)' : count > 2 ? 'var(--warning)' : count > 0 ? 'var(--text-muted)' : 'var(--border)';
|
|
2429
|
+
html += `<td style="text-align:center;color:${color};font-weight:600;">${count > 0 ? count + ' droits' : 'Aucun'}</td>`;
|
|
2430
|
+
});
|
|
2431
|
+
html += '</tr>';
|
|
2432
|
+
});
|
|
2433
|
+
|
|
2434
|
+
html += '</tbody></table>';
|
|
2435
|
+
container.innerHTML = html;
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
/* ============================================
|
|
2439
|
+
E2E FLOWS
|
|
2440
|
+
============================================ */
|
|
2441
|
+
function addE2EFlow() {
|
|
2442
|
+
const name = document.getElementById('flow-name').value.trim();
|
|
2443
|
+
if (!name) return;
|
|
2444
|
+
|
|
2445
|
+
const steps = document.getElementById('flow-steps').value.split('\n').filter(l => l.trim()).map(l => {
|
|
2446
|
+
const parts = l.split(' - ');
|
|
2447
|
+
return { module: parts[0]?.trim() || '', action: parts.slice(1).join(' - ').trim() || l.trim() };
|
|
2448
|
+
});
|
|
2449
|
+
|
|
2450
|
+
data.consolidation.e2eFlows.push({
|
|
2451
|
+
name: name,
|
|
2452
|
+
steps: steps,
|
|
2453
|
+
actors: document.getElementById('flow-actors').value.trim()
|
|
2454
|
+
});
|
|
2455
|
+
|
|
2456
|
+
renderE2EFlows();
|
|
2457
|
+
toggleForm('addFlowForm');
|
|
2458
|
+
clearForm('addFlowForm');
|
|
2459
|
+
autoSave();
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
function removeE2EFlow(index) {
|
|
2463
|
+
data.consolidation.e2eFlows.splice(index, 1);
|
|
2464
|
+
renderE2EFlows();
|
|
2465
|
+
autoSave();
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
function renderE2EFlows() {
|
|
2469
|
+
const container = document.getElementById('e2eFlowsList');
|
|
2470
|
+
if (!container) return;
|
|
2471
|
+
|
|
2472
|
+
container.innerHTML = data.consolidation.e2eFlows.map((flow, fi) => `
|
|
2473
|
+
<div class="card" style="margin-bottom:1rem;">
|
|
2474
|
+
<div class="card-header">
|
|
2475
|
+
<span class="card-title">${flow.name}</span>
|
|
2476
|
+
<button class="btn btn-sm" onclick="removeE2EFlow(${fi})" style="opacity:0.5;">Supprimer</button>
|
|
2477
|
+
</div>
|
|
2478
|
+
${flow.actors ? `<div style="font-size:0.8rem;color:var(--text-muted);margin-bottom:0.5rem;">Intervenants : ${flow.actors}</div>` : ''}
|
|
2479
|
+
<div class="e2e-flow">
|
|
2480
|
+
${flow.steps.map((s, i) => `
|
|
2481
|
+
<div class="e2e-step">
|
|
2482
|
+
<div class="e2e-step-module">${s.module}</div>
|
|
2483
|
+
<div class="e2e-step-action">${s.action}</div>
|
|
2484
|
+
</div>
|
|
2485
|
+
${i < flow.steps.length - 1 ? '<div class="process-arrow">→</div>' : ''}
|
|
2486
|
+
`).join('')}
|
|
2487
|
+
</div>
|
|
2488
|
+
</div>
|
|
2489
|
+
`).join('');
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
/* ============================================
|
|
2493
|
+
HANDOFF / SYNTHESE
|
|
2494
|
+
============================================ */
|
|
2495
|
+
function renderHandoff() {
|
|
2496
|
+
renderHandoffStats();
|
|
2497
|
+
renderHandoffModules();
|
|
2498
|
+
renderCoverageMatrix();
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
function renderHandoffStats() {
|
|
2502
|
+
const container = document.getElementById('handoffStats');
|
|
2503
|
+
if (!container) return;
|
|
2504
|
+
|
|
2505
|
+
const totalUCs = data.modules.reduce((sum, m) => sum + (data.moduleSpecs[m.code]?.useCases || []).length, 0);
|
|
2506
|
+
const totalBRs = data.modules.reduce((sum, m) => sum + (data.moduleSpecs[m.code]?.businessRules || []).length, 0);
|
|
2507
|
+
const totalEnts = data.modules.reduce((sum, m) => sum + (data.moduleSpecs[m.code]?.entities || []).length, 0);
|
|
2508
|
+
const totalStakeholders = data.cadrage.stakeholders.length;
|
|
2509
|
+
|
|
2510
|
+
container.innerHTML = `
|
|
2511
|
+
<div class="stat-card"><div class="stat-value">${data.modules.length}</div><div class="stat-label">Domaines fonctionnels</div></div>
|
|
2512
|
+
<div class="stat-card"><div class="stat-value">${totalUCs}</div><div class="stat-label">Cas d'utilisation</div></div>
|
|
2513
|
+
<div class="stat-card"><div class="stat-value">${totalBRs}</div><div class="stat-label">Regles metier</div></div>
|
|
2514
|
+
<div class="stat-card"><div class="stat-value">${totalEnts}</div><div class="stat-label">Types de donnees</div></div>
|
|
2515
|
+
<div class="stat-card"><div class="stat-value">${totalStakeholders}</div><div class="stat-label">Profils utilisateurs</div></div>
|
|
2516
|
+
<div class="stat-card"><div class="stat-value">${data.dependencies.length}</div><div class="stat-label">Dependances</div></div>
|
|
2517
|
+
<div class="stat-card"><div class="stat-value">${data.consolidation.e2eFlows.length}</div><div class="stat-label">Parcours bout en bout</div></div>
|
|
2518
|
+
<div class="stat-card"><div class="stat-value">${data.cadrage.risks.length}</div><div class="stat-label">Risques identifies</div></div>
|
|
2519
|
+
`;
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
function renderHandoffModules() {
|
|
2523
|
+
const container = document.getElementById('handoffModuleList');
|
|
2524
|
+
if (!container) return;
|
|
2525
|
+
|
|
2526
|
+
const layers = computeTopologicalLayers();
|
|
2527
|
+
const order = layers ? layers.flat() : data.modules.map(m => m.code);
|
|
2528
|
+
|
|
2529
|
+
container.innerHTML = order.map((code, i) => {
|
|
2530
|
+
const m = data.modules.find(mod => mod.code === code);
|
|
2531
|
+
if (!m) return '';
|
|
2532
|
+
const spec = data.moduleSpecs[code] || {};
|
|
2533
|
+
return `
|
|
2534
|
+
<div class="card" style="margin-bottom:0.75rem;">
|
|
2535
|
+
<div style="display:flex;align-items:center;gap:0.75rem;">
|
|
2536
|
+
<div style="width:28px;height:28px;border-radius:50%;background:var(--primary);display:flex;align-items:center;justify-content:center;color:#fff;font-size:0.75rem;font-weight:700;flex-shrink:0;">${i + 1}</div>
|
|
2537
|
+
<div style="flex:1;">
|
|
2538
|
+
<div style="font-weight:600;color:var(--text-bright);">${m.name}</div>
|
|
2539
|
+
<div style="font-size:0.8rem;color:var(--text-muted);">${m.description || ''}</div>
|
|
2540
|
+
</div>
|
|
2541
|
+
<div style="display:flex;gap:1rem;font-size:0.75rem;color:var(--text-muted);">
|
|
2542
|
+
<span>${(spec.useCases || []).length} cas d'utilisation</span>
|
|
2543
|
+
<span>${(spec.businessRules || []).length} regles</span>
|
|
2544
|
+
<span>${(spec.entities || []).length} donnees</span>
|
|
2545
|
+
</div>
|
|
2546
|
+
<span class="priority priority-${m.priority === 'must' ? 'vital' : m.priority === 'should' ? 'important' : 'optional'}">${formatModulePriority(m.priority)}</span>
|
|
2547
|
+
</div>
|
|
2548
|
+
</div>`;
|
|
2549
|
+
}).join('');
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
function renderCoverageMatrix() {
|
|
2553
|
+
const container = document.getElementById('coverageMatrix');
|
|
2554
|
+
if (!container) return;
|
|
2555
|
+
|
|
2556
|
+
const allScope = ['vital', 'important', 'optional'].flatMap(p =>
|
|
2557
|
+
(data.cadrage.scope[p] || []).map(item => ({ ...item, priority: p }))
|
|
2558
|
+
);
|
|
2559
|
+
|
|
2560
|
+
if (allScope.length === 0) {
|
|
2561
|
+
container.innerHTML = '<p style="color:var(--text-muted);font-style:italic;">Aucun element de perimetre defini dans le cadrage.</p>';
|
|
2562
|
+
return;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
container.innerHTML = `
|
|
2566
|
+
<table class="mock-table" style="background:var(--bg-card);border-radius:8px;overflow:hidden;">
|
|
2567
|
+
<thead><tr><th>Besoin</th><th>Priorite</th><th>Domaine</th><th>Couvert</th></tr></thead>
|
|
2568
|
+
<tbody>
|
|
2569
|
+
${allScope.map(item => {
|
|
2570
|
+
const moduleName = data.modules.length > 0 ? data.modules[0].name : 'A definir';
|
|
2571
|
+
return `
|
|
2572
|
+
<tr>
|
|
2573
|
+
<td>${item.name}</td>
|
|
2574
|
+
<td><span class="priority priority-${item.priority}">${formatPriority(item.priority)}</span></td>
|
|
2575
|
+
<td style="color:var(--text-muted);">${moduleName}</td>
|
|
2576
|
+
<td style="text-align:center;color:var(--success);">✓</td>
|
|
2577
|
+
</tr>`;
|
|
2578
|
+
}).join('')}
|
|
2579
|
+
</tbody>
|
|
2580
|
+
</table>`;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
/* ============================================
|
|
2584
|
+
ADDITIONAL UTILITIES
|
|
2585
|
+
============================================ */
|
|
2586
|
+
function formatModuleType(t) {
|
|
2587
|
+
return { 'data-centric': 'Donnees', 'workflow': 'Processus', 'reporting': 'Rapports', 'integration': 'Integration', 'full-module': 'Complet' }[t] || t;
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
function formatModulePriority(p) {
|
|
2591
|
+
return { must: 'Indispensable', should: 'Important', could: 'Optionnel' }[p] || p;
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
</script>
|
|
2595
|
+
</body>
|
|
2596
|
+
</html>
|