aril 1.2.24 → 1.2.26
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/boot/config/api/src/interfaces.d.ts +1 -0
- package/esm2022/boot/config/api/src/interfaces.mjs +2 -1
- package/esm2022/theme/layout/app/environment-banner/environment-banner.component.mjs +36 -0
- package/esm2022/theme/layout/app/layout/app.layout.component.mjs +5 -3
- package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +64 -22
- package/esm2022/theme/layout/app/static-sidebar/static-sidebar.component.mjs +3 -3
- package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +8 -3
- package/esm2022/ui/table/src/table.component.mjs +8 -1
- package/fesm2022/aril-boot-config-api.mjs +1 -0
- package/fesm2022/aril-boot-config-api.mjs.map +1 -1
- package/fesm2022/aril-theme-layout.mjs +166 -87
- package/fesm2022/aril-theme-layout.mjs.map +1 -1
- package/fesm2022/aril-ui-table.mjs +7 -0
- package/fesm2022/aril-ui-table.mjs.map +1 -1
- package/package.json +217 -217
- package/theme/layout/app/environment-banner/environment-banner.component.d.ts +13 -0
- package/theme/layout/app/environment-banner/environment-banner.component.html +10 -0
- package/theme/layout/app/environment-banner/environment-banner.component.scss +103 -0
- package/theme/layout/app/environment-banner/environment-banner.component.ts +39 -0
- package/theme/layout/app/layout/app.layout.component.html +1 -0
- package/theme/layout/app/layout/app.layout.component.ts +2 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.d.ts +20 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.html +49 -111
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.scss +344 -152
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.ts +81 -19
- package/theme/layout/app/static-sidebar/static-sidebar.component.scss +1 -1
- package/theme/layout/app/topbar/app.topbar.component.d.ts +2 -0
- package/theme/layout/app/topbar/app.topbar.component.html +1 -1
- package/theme/layout/app/topbar/app.topbar.component.scss +1 -0
- package/theme/layout/app/topbar/app.topbar.component.ts +6 -0
- package/theme/styles/layout/_content.scss +2 -2
- package/theme/styles/layout/_expanded_sidebar.scss +1 -1
- package/theme/styles/layout/_main.scss +7 -0
- package/theme/styles/layout/_topbar.scss +1 -1
|
@@ -1,152 +1,344 @@
|
|
|
1
|
-
//
|
|
2
|
-
:host {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
1
|
+
// Kişisel Bilgiler slide-over paneli — design_handoff_kisisel_bilgiler_sidebar (hifi)
|
|
2
|
+
:host ::ng-deep {
|
|
3
|
+
.layout-profile-sidebar {
|
|
4
|
+
width: 330px;
|
|
5
|
+
max-width: 100vw;
|
|
6
|
+
box-shadow: -24px 0 60px -24px rgba(24, 28, 38, 0.28);
|
|
7
|
+
|
|
8
|
+
.p-sidebar-header {
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.p-sidebar-content {
|
|
13
|
+
padding: 0;
|
|
14
|
+
height: 100%;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.profile-panel {
|
|
21
|
+
// Kurum accent rengi — topbar env-indicator ile aynı data-co pattern'i
|
|
22
|
+
--pf-accent: var(--primary-color, #4c63c7);
|
|
23
|
+
|
|
24
|
+
&[data-co='depsas'] {
|
|
25
|
+
--pf-accent: rgb(252 80 0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&[data-co='dedas'] {
|
|
29
|
+
--pf-accent: rgb(0 173 186);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
height: 100%;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
background: #ffffff;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 1. Hero header
|
|
39
|
+
.panel-hero {
|
|
40
|
+
position: relative;
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
padding: 14px 24px 20px;
|
|
43
|
+
background: var(--pf-accent);
|
|
44
|
+
color: #fff;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
|
|
47
|
+
&::before,
|
|
48
|
+
&::after {
|
|
49
|
+
content: '';
|
|
50
|
+
position: absolute;
|
|
51
|
+
border-radius: 50%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
top: -70px;
|
|
56
|
+
right: -50px;
|
|
57
|
+
width: 200px;
|
|
58
|
+
height: 200px;
|
|
59
|
+
background: rgba(255, 255, 255, 0.08);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&::after {
|
|
63
|
+
bottom: -90px;
|
|
64
|
+
left: -40px;
|
|
65
|
+
width: 180px;
|
|
66
|
+
height: 180px;
|
|
67
|
+
background: rgba(255, 255, 255, 0.06);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.hero-top {
|
|
72
|
+
position: relative;
|
|
73
|
+
z-index: 1;
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: space-between;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.hero-title {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: 9px;
|
|
83
|
+
|
|
84
|
+
i {
|
|
85
|
+
font-size: 20px;
|
|
86
|
+
opacity: 0.9;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
span {
|
|
90
|
+
font-size: 13px;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
letter-spacing: 0.02em;
|
|
93
|
+
opacity: 0.92;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.hero-close {
|
|
98
|
+
width: 30px;
|
|
99
|
+
height: 30px;
|
|
100
|
+
border: none;
|
|
101
|
+
border-radius: 10px;
|
|
102
|
+
background: rgba(255, 255, 255, 0.14);
|
|
103
|
+
color: #fff;
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
transition: background 0.18s;
|
|
109
|
+
|
|
110
|
+
i {
|
|
111
|
+
font-size: 14px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:hover {
|
|
115
|
+
background: rgba(255, 255, 255, 0.28);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:focus-visible {
|
|
119
|
+
outline: 2px solid rgba(255, 255, 255, 0.85);
|
|
120
|
+
outline-offset: 2px;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.hero-profile {
|
|
125
|
+
position: relative;
|
|
126
|
+
z-index: 1;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
gap: 16px;
|
|
130
|
+
margin-top: 22px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.hero-avatar {
|
|
134
|
+
width: 66px;
|
|
135
|
+
height: 66px;
|
|
136
|
+
flex-shrink: 0;
|
|
137
|
+
border-radius: 20px;
|
|
138
|
+
background: rgba(255, 255, 255, 0.18);
|
|
139
|
+
border: 1px solid rgba(255, 255, 255, 0.35);
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
font-size: 22px;
|
|
144
|
+
font-weight: 700;
|
|
145
|
+
letter-spacing: 0.01em;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.hero-identity {
|
|
149
|
+
min-width: 0;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.hero-name {
|
|
153
|
+
font-size: 18px;
|
|
154
|
+
font-weight: 700;
|
|
155
|
+
line-height: 1.2;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.hero-username {
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
gap: 6px;
|
|
162
|
+
margin-top: 5px;
|
|
163
|
+
font-size: 12px;
|
|
164
|
+
opacity: 0.85;
|
|
165
|
+
|
|
166
|
+
i {
|
|
167
|
+
font-size: 14px;
|
|
168
|
+
flex-shrink: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
span {
|
|
172
|
+
overflow: hidden;
|
|
173
|
+
text-overflow: ellipsis;
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// 2. Bilgi listesi
|
|
179
|
+
.info-list {
|
|
180
|
+
flex: 1;
|
|
181
|
+
min-height: 0;
|
|
182
|
+
overflow-y: auto;
|
|
183
|
+
padding: 8px 12px 12px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.info-row {
|
|
187
|
+
display: flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
gap: 14px;
|
|
190
|
+
padding: 13px 12px;
|
|
191
|
+
border-radius: 14px;
|
|
192
|
+
transition: background 0.16s;
|
|
193
|
+
|
|
194
|
+
&:hover {
|
|
195
|
+
background: #f6f7f9;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.row-icon {
|
|
200
|
+
width: 40px;
|
|
201
|
+
height: 40px;
|
|
202
|
+
flex-shrink: 0;
|
|
203
|
+
border-radius: 12px;
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
|
|
208
|
+
i {
|
|
209
|
+
font-size: 21px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
&.tint-cool {
|
|
213
|
+
background: #eef1fb;
|
|
214
|
+
color: #4c63c7;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
&.tint-accent {
|
|
218
|
+
background: color-mix(in srgb, var(--pf-accent) 9%, transparent);
|
|
219
|
+
color: var(--pf-accent);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&.tint-teal {
|
|
223
|
+
background: #e7f4f3;
|
|
224
|
+
color: #1d8a82;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.row-body {
|
|
229
|
+
min-width: 0;
|
|
230
|
+
flex: 1;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.row-label {
|
|
234
|
+
font-size: 11px;
|
|
235
|
+
font-weight: 600;
|
|
236
|
+
letter-spacing: 0.04em;
|
|
237
|
+
text-transform: uppercase;
|
|
238
|
+
color: #98a0ad;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.row-value {
|
|
242
|
+
font-size: 14px;
|
|
243
|
+
font-weight: 500;
|
|
244
|
+
color: #242a33;
|
|
245
|
+
margin-top: 2px;
|
|
246
|
+
overflow: hidden;
|
|
247
|
+
text-overflow: ellipsis;
|
|
248
|
+
white-space: nowrap;
|
|
249
|
+
|
|
250
|
+
&.empty {
|
|
251
|
+
color: #b4bac3;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.row-badge {
|
|
256
|
+
display: inline-flex;
|
|
257
|
+
align-items: center;
|
|
258
|
+
gap: 5px;
|
|
259
|
+
margin-top: 5px;
|
|
260
|
+
padding: 3px 11px;
|
|
261
|
+
border-radius: 999px;
|
|
262
|
+
font-size: 11.5px;
|
|
263
|
+
font-weight: 600;
|
|
264
|
+
|
|
265
|
+
.badge-dot {
|
|
266
|
+
width: 6px;
|
|
267
|
+
height: 6px;
|
|
268
|
+
border-radius: 50%;
|
|
269
|
+
background: currentColor;
|
|
270
|
+
flex-shrink: 0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
&.tone-green {
|
|
274
|
+
background: #e7f5ec;
|
|
275
|
+
color: #1e8a4c;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&.tone-red {
|
|
279
|
+
background: #fdecec;
|
|
280
|
+
color: #d0342c;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&.tone-neutral {
|
|
284
|
+
background: #eef0f3;
|
|
285
|
+
color: #6b7480;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// 3. Footer
|
|
290
|
+
.panel-footer {
|
|
291
|
+
flex-shrink: 0;
|
|
292
|
+
padding: 14px 20px 20px;
|
|
293
|
+
border-top: 1px solid #eef0f3;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// Theme buton diliyle hizalı: $borderRadius 6px, $raisedButtonShadow, $transitionDuration 0.2s
|
|
297
|
+
.logout-btn {
|
|
298
|
+
width: 100%;
|
|
299
|
+
height: 40px;
|
|
300
|
+
border: none;
|
|
301
|
+
border-radius: 6px;
|
|
302
|
+
background: var(--pf-accent);
|
|
303
|
+
color: #fff;
|
|
304
|
+
font-family: inherit;
|
|
305
|
+
font-size: 14px;
|
|
306
|
+
font-weight: 500;
|
|
307
|
+
display: flex;
|
|
308
|
+
align-items: center;
|
|
309
|
+
justify-content: center;
|
|
310
|
+
gap: 7px;
|
|
311
|
+
cursor: pointer;
|
|
312
|
+
box-shadow:
|
|
313
|
+
0 3px 1px -2px rgba(0, 0, 0, 0.2),
|
|
314
|
+
0 2px 2px 0 rgba(0, 0, 0, 0.14),
|
|
315
|
+
0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
|
316
|
+
transition:
|
|
317
|
+
background-color 0.2s,
|
|
318
|
+
box-shadow 0.2s;
|
|
319
|
+
|
|
320
|
+
i {
|
|
321
|
+
font-size: 16px;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
&:hover {
|
|
325
|
+
background: color-mix(in srgb, var(--pf-accent) 92%, #000);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
&:active {
|
|
329
|
+
background: color-mix(in srgb, var(--pf-accent) 85%, #000);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
&:focus-visible {
|
|
333
|
+
outline: 2px solid var(--pf-accent);
|
|
334
|
+
outline-offset: 3px;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
@media (prefers-reduced-motion: reduce) {
|
|
339
|
+
.info-row,
|
|
340
|
+
.hero-close,
|
|
341
|
+
.logout-btn {
|
|
342
|
+
transition: none;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
@@ -1,40 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Component, OnInit, effect, signal } from '@angular/core';
|
|
1
|
+
import { Component, OnInit, computed, effect, signal } from '@angular/core';
|
|
3
2
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
3
|
|
|
5
|
-
import { AvatarModule } from 'primeng/avatar';
|
|
6
|
-
import { ButtonModule } from 'primeng/button';
|
|
7
|
-
import { ChipModule } from 'primeng/chip';
|
|
8
4
|
import { DialogService } from 'primeng/dynamicdialog';
|
|
9
5
|
import { SidebarModule } from 'primeng/sidebar';
|
|
10
|
-
import { SkeletonModule } from 'primeng/skeleton';
|
|
11
|
-
import { TagModule } from 'primeng/tag';
|
|
12
6
|
|
|
13
7
|
import { TranslocoModule, TranslocoService } from '@ngneat/transloco';
|
|
14
8
|
import { KeycloakService } from 'keycloak-angular';
|
|
15
9
|
import { Subject, switchMap } from 'rxjs';
|
|
16
10
|
|
|
17
|
-
import {
|
|
11
|
+
import { API_CONFIGS } from 'aril/boot/config/api';
|
|
18
12
|
|
|
19
13
|
import { LayoutService } from '../../service/app.layout.service';
|
|
14
|
+
import { Environment } from '../../service/interfaces/enum';
|
|
20
15
|
import { ChangePasswordModalComponent } from './modals/change-password-modal/change-password-modal.component';
|
|
21
16
|
import { EditProfileModalComponent } from './modals/edit-profile-modal/edit-profile-modal.component';
|
|
22
17
|
import { GetUserRequestDTO, ProfileService, UserResponseDTO } from './profile.service';
|
|
23
18
|
|
|
19
|
+
type ProfileIconTint = 'cool' | 'accent' | 'teal';
|
|
20
|
+
type ProfileBadgeTone = 'green' | 'red' | 'neutral';
|
|
21
|
+
|
|
22
|
+
interface ProfileRow {
|
|
23
|
+
icon: string;
|
|
24
|
+
labelKey: string;
|
|
25
|
+
tint: ProfileIconTint;
|
|
26
|
+
value?: string | null;
|
|
27
|
+
badge?: { tone: ProfileBadgeTone; labelKey?: string; label?: string };
|
|
28
|
+
}
|
|
29
|
+
|
|
24
30
|
@Component({
|
|
25
31
|
standalone: true,
|
|
26
32
|
selector: 'app-profilemenu',
|
|
27
|
-
imports: [
|
|
28
|
-
CommonModule,
|
|
29
|
-
SidebarModule,
|
|
30
|
-
TagModule,
|
|
31
|
-
ButtonModule,
|
|
32
|
-
SkeletonModule,
|
|
33
|
-
AvatarModule,
|
|
34
|
-
ChipModule,
|
|
35
|
-
TranslocoModule,
|
|
36
|
-
ButtonComponent
|
|
37
|
-
],
|
|
33
|
+
imports: [SidebarModule, TranslocoModule],
|
|
38
34
|
templateUrl: './app.profilesidebar.component.html',
|
|
39
35
|
styleUrls: ['./app.profilesidebar.component.scss'],
|
|
40
36
|
providers: [DialogService]
|
|
@@ -42,6 +38,56 @@ import { GetUserRequestDTO, ProfileService, UserResponseDTO } from './profile.se
|
|
|
42
38
|
export class AppProfileSidebarComponent implements OnInit {
|
|
43
39
|
username: string;
|
|
44
40
|
userProfile = signal<UserResponseDTO | null>(null);
|
|
41
|
+
envCode = this.resolveEnvironmentCode();
|
|
42
|
+
|
|
43
|
+
displayName = computed(() => {
|
|
44
|
+
const profile = this.userProfile();
|
|
45
|
+
const fullName = profile ? `${profile.firstName ?? ''} ${profile.lastName ?? ''}`.trim() : '';
|
|
46
|
+
return fullName || this.username;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
initials = computed(() =>
|
|
50
|
+
this.displayName()
|
|
51
|
+
.trim()
|
|
52
|
+
.split(/\s+/)
|
|
53
|
+
.filter(Boolean)
|
|
54
|
+
.slice(0, 2)
|
|
55
|
+
.map((word) => word[0])
|
|
56
|
+
.join('')
|
|
57
|
+
.toLocaleUpperCase('tr')
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
rows = computed<ProfileRow[]>(() => {
|
|
61
|
+
const profile = this.userProfile();
|
|
62
|
+
if (!profile) return [];
|
|
63
|
+
|
|
64
|
+
const clientOfSystemUser = this.asText(profile.clientOfSystemUser);
|
|
65
|
+
|
|
66
|
+
return [
|
|
67
|
+
{ icon: 'pi-id-card', labelKey: 'tcNumber', tint: 'cool', value: this.asText(profile.tckn) },
|
|
68
|
+
{ icon: 'pi-envelope', labelKey: 'email', tint: 'accent', value: this.asText(profile.email) },
|
|
69
|
+
{ icon: 'pi-phone', labelKey: 'phone', tint: 'teal', value: this.asText(profile.phone) },
|
|
70
|
+
{ icon: 'pi-at', labelKey: 'username', tint: 'cool', value: this.asText(profile.userName) },
|
|
71
|
+
{
|
|
72
|
+
icon: 'pi-verified',
|
|
73
|
+
labelKey: 'accountStatus',
|
|
74
|
+
tint: 'teal',
|
|
75
|
+
badge: profile.enabled ? { tone: 'green', labelKey: 'active' } : { tone: 'red', labelKey: 'inactive' }
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
icon: 'pi-shield',
|
|
79
|
+
labelKey: 'systemUser',
|
|
80
|
+
tint: 'accent',
|
|
81
|
+
badge: profile.systemUser ? { tone: 'green', labelKey: 'yes' } : { tone: 'red', labelKey: 'no' }
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
icon: 'pi-building',
|
|
85
|
+
labelKey: 'clientSystemUser',
|
|
86
|
+
tint: 'cool',
|
|
87
|
+
badge: clientOfSystemUser ? { tone: 'green', label: clientOfSystemUser } : { tone: 'neutral', labelKey: 'no' }
|
|
88
|
+
}
|
|
89
|
+
];
|
|
90
|
+
});
|
|
45
91
|
|
|
46
92
|
private subjects = {
|
|
47
93
|
getUser: new Subject<GetUserRequestDTO>()
|
|
@@ -83,6 +129,22 @@ export class AppProfileSidebarComponent implements OnInit {
|
|
|
83
129
|
}
|
|
84
130
|
}
|
|
85
131
|
|
|
132
|
+
private resolveEnvironmentCode(): string | null {
|
|
133
|
+
switch (API_CONFIGS.environment) {
|
|
134
|
+
case Environment.PER:
|
|
135
|
+
return 'depsas';
|
|
136
|
+
case Environment.DG:
|
|
137
|
+
return 'dedas';
|
|
138
|
+
default:
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
private asText(value?: string | string[] | null): string | null {
|
|
144
|
+
const text = (Array.isArray(value) ? value.filter(Boolean).join(', ') : (value ?? '')).trim();
|
|
145
|
+
return text.length ? text : null;
|
|
146
|
+
}
|
|
147
|
+
|
|
86
148
|
get visible(): boolean {
|
|
87
149
|
return this.layoutService.state.profileSidebarVisible;
|
|
88
150
|
}
|
|
@@ -13,6 +13,7 @@ export declare class AppTopbarComponent {
|
|
|
13
13
|
menuButton: ElementRef;
|
|
14
14
|
username: string;
|
|
15
15
|
layoutService: LayoutService;
|
|
16
|
+
private readonly router;
|
|
16
17
|
search: string;
|
|
17
18
|
logoPath: string;
|
|
18
19
|
environmentBadge: {
|
|
@@ -25,6 +26,7 @@ export declare class AppTopbarComponent {
|
|
|
25
26
|
constructor(translocoService: TranslocoService, pubSubService: PubSubService, keycloak: KeycloakService);
|
|
26
27
|
get unreadCount(): number;
|
|
27
28
|
onMenuButtonClick(): void;
|
|
29
|
+
onLogoClick(): void;
|
|
28
30
|
onProfileButtonClick(): void;
|
|
29
31
|
onHistoryButtonClick(): void;
|
|
30
32
|
onSiteMapButtonClick(): void;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<button #menubutton type="button" class="topbar-menubutton p-link p-trigger" (click)="onMenuButtonClick()">
|
|
4
4
|
<i class="pi pi-bars"></i>
|
|
5
5
|
</button>
|
|
6
|
-
<img [src]="logoPath" class="topbar-logo" alt="logo" />
|
|
6
|
+
<img [src]="logoPath" class="topbar-logo" alt="logo" (click)="onLogoClick()" />
|
|
7
7
|
@if (environmentBadge) {
|
|
8
8
|
<span class="env-indicator" [attr.data-co]="environmentBadge.code">{{ environmentBadge.label }}</span>
|
|
9
9
|
}
|