@hed-hog/operations 0.0.329 → 0.0.330
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controllers/operations-tasks.controller.d.ts +4 -4
- package/dist/operations.service.d.ts +4 -4
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +24 -4
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.js +1 -1
- package/dist/operations.service.spec.js.map +1 -1
- package/hedhog/data/dashboard_component_role.yaml +8 -8
- package/hedhog/data/dashboard_role.yaml +1 -1
- package/hedhog/data/menu.yaml +6 -16
- package/hedhog/data/role.yaml +1 -1
- package/hedhog/data/route.yaml +55 -55
- package/hedhog/frontend/app/_components/async-options-combobox.tsx.ejs +15 -9
- package/hedhog/frontend/app/_components/project-costs-section.tsx.ejs +51 -81
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +39 -11
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +21 -4
- package/hedhog/frontend/app/_components/task-file-attachments.tsx.ejs +10 -8
- package/hedhog/frontend/app/_lib/hooks/use-values-visibility.ts.ejs +61 -0
- package/hedhog/frontend/app/approvals/page.tsx.ejs +5 -1
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +68 -34
- package/hedhog/frontend/app/my-projects/page.tsx.ejs +45 -6
- package/hedhog/frontend/app/my-tasks/page.tsx.ejs +1 -1
- package/hedhog/frontend/app/projects/page.tsx.ejs +60 -5
- package/hedhog/frontend/app/reports/collaborators/page.tsx.ejs +65 -52
- package/hedhog/frontend/app/reports/projects/page.tsx.ejs +80 -82
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +7 -1
- package/hedhog/frontend/messages/en.json +223 -16
- package/hedhog/frontend/messages/pt.json +223 -16
- package/package.json +4 -4
- package/src/operations.service.spec.ts +1 -1
- package/src/operations.service.ts +25 -5
package/hedhog/data/route.yaml
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
- where:
|
|
6
6
|
slug: admin
|
|
7
7
|
- where:
|
|
8
|
-
slug:
|
|
8
|
+
slug: operations-collaborator
|
|
9
9
|
- where:
|
|
10
10
|
slug: admin-operations-supervisor
|
|
11
11
|
- where:
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
- where:
|
|
41
41
|
slug: admin
|
|
42
42
|
- where:
|
|
43
|
-
slug:
|
|
43
|
+
slug: operations-collaborator
|
|
44
44
|
- where:
|
|
45
45
|
slug: admin-operations-supervisor
|
|
46
46
|
- where:
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
- where:
|
|
54
54
|
slug: admin
|
|
55
55
|
- where:
|
|
56
|
-
slug:
|
|
56
|
+
slug: operations-collaborator
|
|
57
57
|
- where:
|
|
58
58
|
slug: admin-operations-supervisor
|
|
59
59
|
- where:
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
- where:
|
|
76
76
|
slug: admin
|
|
77
77
|
- where:
|
|
78
|
-
slug:
|
|
78
|
+
slug: operations-collaborator
|
|
79
79
|
- where:
|
|
80
80
|
slug: admin-operations-supervisor
|
|
81
81
|
- where:
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
- where:
|
|
109
109
|
slug: admin
|
|
110
110
|
- where:
|
|
111
|
-
slug:
|
|
111
|
+
slug: operations-collaborator
|
|
112
112
|
- where:
|
|
113
113
|
slug: admin-operations-supervisor
|
|
114
114
|
- where:
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
- where:
|
|
149
149
|
slug: admin
|
|
150
150
|
- where:
|
|
151
|
-
slug:
|
|
151
|
+
slug: operations-collaborator
|
|
152
152
|
- where:
|
|
153
153
|
slug: admin-operations-supervisor
|
|
154
154
|
- where:
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
- where:
|
|
180
180
|
slug: admin
|
|
181
181
|
- where:
|
|
182
|
-
slug:
|
|
182
|
+
slug: operations-collaborator
|
|
183
183
|
- where:
|
|
184
184
|
slug: admin-operations-supervisor
|
|
185
185
|
- where:
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
- where:
|
|
202
202
|
slug: admin
|
|
203
203
|
- where:
|
|
204
|
-
slug:
|
|
204
|
+
slug: operations-collaborator
|
|
205
205
|
- where:
|
|
206
206
|
slug: admin-operations-supervisor
|
|
207
207
|
- where:
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
- where:
|
|
224
224
|
slug: admin
|
|
225
225
|
- where:
|
|
226
|
-
slug:
|
|
226
|
+
slug: operations-collaborator
|
|
227
227
|
- where:
|
|
228
228
|
slug: admin-operations-supervisor
|
|
229
229
|
- where:
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
- where:
|
|
237
237
|
slug: admin
|
|
238
238
|
- where:
|
|
239
|
-
slug:
|
|
239
|
+
slug: operations-collaborator
|
|
240
240
|
- where:
|
|
241
241
|
slug: admin-operations-supervisor
|
|
242
242
|
- where:
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
- where:
|
|
250
250
|
slug: admin
|
|
251
251
|
- where:
|
|
252
|
-
slug:
|
|
252
|
+
slug: operations-collaborator
|
|
253
253
|
- where:
|
|
254
254
|
slug: admin-operations-supervisor
|
|
255
255
|
- where:
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
- where:
|
|
263
263
|
slug: admin
|
|
264
264
|
- where:
|
|
265
|
-
slug:
|
|
265
|
+
slug: operations-collaborator
|
|
266
266
|
- where:
|
|
267
267
|
slug: admin-operations-supervisor
|
|
268
268
|
- where:
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
- where:
|
|
276
276
|
slug: admin
|
|
277
277
|
- where:
|
|
278
|
-
slug:
|
|
278
|
+
slug: operations-collaborator
|
|
279
279
|
- where:
|
|
280
280
|
slug: admin-operations-supervisor
|
|
281
281
|
- where:
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
- where:
|
|
289
289
|
slug: admin
|
|
290
290
|
- where:
|
|
291
|
-
slug:
|
|
291
|
+
slug: operations-collaborator
|
|
292
292
|
- where:
|
|
293
293
|
slug: admin-operations-supervisor
|
|
294
294
|
- where:
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
- where:
|
|
302
302
|
slug: admin
|
|
303
303
|
- where:
|
|
304
|
-
slug:
|
|
304
|
+
slug: operations-collaborator
|
|
305
305
|
- where:
|
|
306
306
|
slug: admin-operations-supervisor
|
|
307
307
|
- where:
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
- where:
|
|
315
315
|
slug: admin
|
|
316
316
|
- where:
|
|
317
|
-
slug:
|
|
317
|
+
slug: operations-collaborator
|
|
318
318
|
- where:
|
|
319
319
|
slug: admin-operations-supervisor
|
|
320
320
|
- where:
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
- where:
|
|
328
328
|
slug: admin
|
|
329
329
|
- where:
|
|
330
|
-
slug:
|
|
330
|
+
slug: operations-collaborator
|
|
331
331
|
- where:
|
|
332
332
|
slug: admin-operations-supervisor
|
|
333
333
|
- where:
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
- where:
|
|
341
341
|
slug: admin
|
|
342
342
|
- where:
|
|
343
|
-
slug:
|
|
343
|
+
slug: operations-collaborator
|
|
344
344
|
- where:
|
|
345
345
|
slug: admin-operations-supervisor
|
|
346
346
|
- where:
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
- where:
|
|
354
354
|
slug: admin
|
|
355
355
|
- where:
|
|
356
|
-
slug:
|
|
356
|
+
slug: operations-collaborator
|
|
357
357
|
- where:
|
|
358
358
|
slug: admin-operations-supervisor
|
|
359
359
|
- where:
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
- where:
|
|
367
367
|
slug: admin
|
|
368
368
|
- where:
|
|
369
|
-
slug:
|
|
369
|
+
slug: operations-collaborator
|
|
370
370
|
- where:
|
|
371
371
|
slug: admin-operations-supervisor
|
|
372
372
|
- where:
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
- where:
|
|
380
380
|
slug: admin
|
|
381
381
|
- where:
|
|
382
|
-
slug:
|
|
382
|
+
slug: operations-collaborator
|
|
383
383
|
- where:
|
|
384
384
|
slug: admin-operations-supervisor
|
|
385
385
|
- where:
|
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
- where:
|
|
393
393
|
slug: admin
|
|
394
394
|
- where:
|
|
395
|
-
slug:
|
|
395
|
+
slug: operations-collaborator
|
|
396
396
|
- where:
|
|
397
397
|
slug: admin-operations-supervisor
|
|
398
398
|
- where:
|
|
@@ -405,7 +405,7 @@
|
|
|
405
405
|
- where:
|
|
406
406
|
slug: admin
|
|
407
407
|
- where:
|
|
408
|
-
slug:
|
|
408
|
+
slug: operations-collaborator
|
|
409
409
|
- where:
|
|
410
410
|
slug: admin-operations-supervisor
|
|
411
411
|
- where:
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
- where:
|
|
419
419
|
slug: admin
|
|
420
420
|
- where:
|
|
421
|
-
slug:
|
|
421
|
+
slug: operations-collaborator
|
|
422
422
|
- where:
|
|
423
423
|
slug: admin-operations-supervisor
|
|
424
424
|
- where:
|
|
@@ -431,7 +431,7 @@
|
|
|
431
431
|
- where:
|
|
432
432
|
slug: admin
|
|
433
433
|
- where:
|
|
434
|
-
slug:
|
|
434
|
+
slug: operations-collaborator
|
|
435
435
|
- where:
|
|
436
436
|
slug: admin-operations-supervisor
|
|
437
437
|
- where:
|
|
@@ -453,7 +453,7 @@
|
|
|
453
453
|
- where:
|
|
454
454
|
slug: admin
|
|
455
455
|
- where:
|
|
456
|
-
slug:
|
|
456
|
+
slug: operations-collaborator
|
|
457
457
|
- where:
|
|
458
458
|
slug: admin-operations-supervisor
|
|
459
459
|
- where:
|
|
@@ -466,7 +466,7 @@
|
|
|
466
466
|
- where:
|
|
467
467
|
slug: admin
|
|
468
468
|
- where:
|
|
469
|
-
slug:
|
|
469
|
+
slug: operations-collaborator
|
|
470
470
|
- where:
|
|
471
471
|
slug: admin-operations-supervisor
|
|
472
472
|
- where:
|
|
@@ -488,7 +488,7 @@
|
|
|
488
488
|
- where:
|
|
489
489
|
slug: admin
|
|
490
490
|
- where:
|
|
491
|
-
slug:
|
|
491
|
+
slug: operations-collaborator
|
|
492
492
|
- where:
|
|
493
493
|
slug: admin-operations-supervisor
|
|
494
494
|
- where:
|
|
@@ -501,7 +501,7 @@
|
|
|
501
501
|
- where:
|
|
502
502
|
slug: admin
|
|
503
503
|
- where:
|
|
504
|
-
slug:
|
|
504
|
+
slug: operations-collaborator
|
|
505
505
|
- where:
|
|
506
506
|
slug: admin-operations-supervisor
|
|
507
507
|
- where:
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
- where:
|
|
524
524
|
slug: admin
|
|
525
525
|
- where:
|
|
526
|
-
slug:
|
|
526
|
+
slug: operations-collaborator
|
|
527
527
|
- where:
|
|
528
528
|
slug: admin-operations-supervisor
|
|
529
529
|
- where:
|
|
@@ -554,7 +554,7 @@
|
|
|
554
554
|
- where:
|
|
555
555
|
slug: admin
|
|
556
556
|
- where:
|
|
557
|
-
slug:
|
|
557
|
+
slug: operations-collaborator
|
|
558
558
|
- where:
|
|
559
559
|
slug: admin-operations-supervisor
|
|
560
560
|
- where:
|
|
@@ -567,7 +567,7 @@
|
|
|
567
567
|
- where:
|
|
568
568
|
slug: admin
|
|
569
569
|
- where:
|
|
570
|
-
slug:
|
|
570
|
+
slug: operations-collaborator
|
|
571
571
|
- where:
|
|
572
572
|
slug: admin-operations-supervisor
|
|
573
573
|
- where:
|
|
@@ -580,7 +580,7 @@
|
|
|
580
580
|
- where:
|
|
581
581
|
slug: admin
|
|
582
582
|
- where:
|
|
583
|
-
slug:
|
|
583
|
+
slug: operations-collaborator
|
|
584
584
|
- where:
|
|
585
585
|
slug: admin-operations-supervisor
|
|
586
586
|
- where:
|
|
@@ -593,7 +593,7 @@
|
|
|
593
593
|
- where:
|
|
594
594
|
slug: admin
|
|
595
595
|
- where:
|
|
596
|
-
slug:
|
|
596
|
+
slug: operations-collaborator
|
|
597
597
|
- where:
|
|
598
598
|
slug: admin-operations-supervisor
|
|
599
599
|
- where:
|
|
@@ -606,7 +606,7 @@
|
|
|
606
606
|
- where:
|
|
607
607
|
slug: admin
|
|
608
608
|
- where:
|
|
609
|
-
slug:
|
|
609
|
+
slug: operations-collaborator
|
|
610
610
|
- where:
|
|
611
611
|
slug: admin-operations-supervisor
|
|
612
612
|
- where:
|
|
@@ -619,7 +619,7 @@
|
|
|
619
619
|
- where:
|
|
620
620
|
slug: admin
|
|
621
621
|
- where:
|
|
622
|
-
slug:
|
|
622
|
+
slug: operations-collaborator
|
|
623
623
|
- where:
|
|
624
624
|
slug: admin-operations-supervisor
|
|
625
625
|
- where:
|
|
@@ -632,7 +632,7 @@
|
|
|
632
632
|
- where:
|
|
633
633
|
slug: admin
|
|
634
634
|
- where:
|
|
635
|
-
slug:
|
|
635
|
+
slug: operations-collaborator
|
|
636
636
|
- where:
|
|
637
637
|
slug: admin-operations-supervisor
|
|
638
638
|
- where:
|
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
- where:
|
|
646
646
|
slug: admin
|
|
647
647
|
- where:
|
|
648
|
-
slug:
|
|
648
|
+
slug: operations-collaborator
|
|
649
649
|
- where:
|
|
650
650
|
slug: admin-operations-supervisor
|
|
651
651
|
- where:
|
|
@@ -658,7 +658,7 @@
|
|
|
658
658
|
- where:
|
|
659
659
|
slug: admin
|
|
660
660
|
- where:
|
|
661
|
-
slug:
|
|
661
|
+
slug: operations-collaborator
|
|
662
662
|
- where:
|
|
663
663
|
slug: admin-operations-supervisor
|
|
664
664
|
- where:
|
|
@@ -671,7 +671,7 @@
|
|
|
671
671
|
- where:
|
|
672
672
|
slug: admin
|
|
673
673
|
- where:
|
|
674
|
-
slug:
|
|
674
|
+
slug: operations-collaborator
|
|
675
675
|
- where:
|
|
676
676
|
slug: admin-operations-director
|
|
677
677
|
|
|
@@ -682,7 +682,7 @@
|
|
|
682
682
|
- where:
|
|
683
683
|
slug: admin
|
|
684
684
|
- where:
|
|
685
|
-
slug:
|
|
685
|
+
slug: operations-collaborator
|
|
686
686
|
- where:
|
|
687
687
|
slug: admin-operations-supervisor
|
|
688
688
|
- where:
|
|
@@ -695,7 +695,7 @@
|
|
|
695
695
|
- where:
|
|
696
696
|
slug: admin
|
|
697
697
|
- where:
|
|
698
|
-
slug:
|
|
698
|
+
slug: operations-collaborator
|
|
699
699
|
- where:
|
|
700
700
|
slug: admin-operations-director
|
|
701
701
|
|
|
@@ -810,7 +810,7 @@
|
|
|
810
810
|
- where:
|
|
811
811
|
slug: admin
|
|
812
812
|
- where:
|
|
813
|
-
slug:
|
|
813
|
+
slug: operations-collaborator
|
|
814
814
|
- where:
|
|
815
815
|
slug: admin-operations-supervisor
|
|
816
816
|
- where:
|
|
@@ -832,7 +832,7 @@
|
|
|
832
832
|
- where:
|
|
833
833
|
slug: admin
|
|
834
834
|
- where:
|
|
835
|
-
slug:
|
|
835
|
+
slug: operations-collaborator
|
|
836
836
|
- where:
|
|
837
837
|
slug: admin-operations-supervisor
|
|
838
838
|
- where:
|
|
@@ -872,7 +872,7 @@
|
|
|
872
872
|
- where:
|
|
873
873
|
slug: admin
|
|
874
874
|
- where:
|
|
875
|
-
slug:
|
|
875
|
+
slug: operations-collaborator
|
|
876
876
|
- where:
|
|
877
877
|
slug: admin-operations-supervisor
|
|
878
878
|
- where:
|
|
@@ -912,7 +912,7 @@
|
|
|
912
912
|
- where:
|
|
913
913
|
slug: admin
|
|
914
914
|
- where:
|
|
915
|
-
slug:
|
|
915
|
+
slug: operations-collaborator
|
|
916
916
|
- where:
|
|
917
917
|
slug: admin-operations-supervisor
|
|
918
918
|
- where:
|
|
@@ -925,7 +925,7 @@
|
|
|
925
925
|
- where:
|
|
926
926
|
slug: admin
|
|
927
927
|
- where:
|
|
928
|
-
slug:
|
|
928
|
+
slug: operations-collaborator
|
|
929
929
|
- where:
|
|
930
930
|
slug: admin-operations-supervisor
|
|
931
931
|
- where:
|
|
@@ -938,7 +938,7 @@
|
|
|
938
938
|
- where:
|
|
939
939
|
slug: admin
|
|
940
940
|
- where:
|
|
941
|
-
slug:
|
|
941
|
+
slug: operations-collaborator
|
|
942
942
|
- where:
|
|
943
943
|
slug: admin-operations-supervisor
|
|
944
944
|
- where:
|
|
@@ -978,7 +978,7 @@
|
|
|
978
978
|
- where:
|
|
979
979
|
slug: admin
|
|
980
980
|
- where:
|
|
981
|
-
slug:
|
|
981
|
+
slug: operations-collaborator
|
|
982
982
|
- where:
|
|
983
983
|
slug: admin-operations-supervisor
|
|
984
984
|
- where:
|
|
@@ -991,7 +991,7 @@
|
|
|
991
991
|
- where:
|
|
992
992
|
slug: admin
|
|
993
993
|
- where:
|
|
994
|
-
slug:
|
|
994
|
+
slug: operations-collaborator
|
|
995
995
|
- where:
|
|
996
996
|
slug: admin-operations-supervisor
|
|
997
997
|
- where:
|
|
@@ -1031,7 +1031,7 @@
|
|
|
1031
1031
|
- where:
|
|
1032
1032
|
slug: admin
|
|
1033
1033
|
- where:
|
|
1034
|
-
slug:
|
|
1034
|
+
slug: operations-collaborator
|
|
1035
1035
|
- where:
|
|
1036
1036
|
slug: admin-operations-supervisor
|
|
1037
1037
|
- where:
|
|
@@ -1044,7 +1044,7 @@
|
|
|
1044
1044
|
- where:
|
|
1045
1045
|
slug: admin
|
|
1046
1046
|
- where:
|
|
1047
|
-
slug:
|
|
1047
|
+
slug: operations-collaborator
|
|
1048
1048
|
- where:
|
|
1049
1049
|
slug: admin-operations-supervisor
|
|
1050
1050
|
- where:
|
|
@@ -1057,7 +1057,7 @@
|
|
|
1057
1057
|
- where:
|
|
1058
1058
|
slug: admin
|
|
1059
1059
|
- where:
|
|
1060
|
-
slug:
|
|
1060
|
+
slug: operations-collaborator
|
|
1061
1061
|
- where:
|
|
1062
1062
|
slug: admin-operations-supervisor
|
|
1063
1063
|
- where:
|
|
@@ -1070,7 +1070,7 @@
|
|
|
1070
1070
|
- where:
|
|
1071
1071
|
slug: admin
|
|
1072
1072
|
- where:
|
|
1073
|
-
slug:
|
|
1073
|
+
slug: operations-collaborator
|
|
1074
1074
|
- where:
|
|
1075
1075
|
slug: admin-operations-supervisor
|
|
1076
1076
|
- where:
|
|
@@ -1083,7 +1083,7 @@
|
|
|
1083
1083
|
- where:
|
|
1084
1084
|
slug: admin
|
|
1085
1085
|
- where:
|
|
1086
|
-
slug:
|
|
1086
|
+
slug: operations-collaborator
|
|
1087
1087
|
- where:
|
|
1088
1088
|
slug: admin-operations-supervisor
|
|
1089
1089
|
- where:
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
} from '@/components/ui/popover';
|
|
19
19
|
import { cn } from '@/lib/utils';
|
|
20
20
|
import { Check, ChevronsUpDown, Loader2, Plus, X } from 'lucide-react';
|
|
21
|
+
import { useTranslations } from 'next-intl';
|
|
21
22
|
|
|
22
23
|
export type AsyncOptionComboboxOption = {
|
|
23
24
|
id: number | string;
|
|
@@ -57,9 +58,9 @@ export function AsyncOptionsCombobox<T extends AsyncOptionComboboxOption>({
|
|
|
57
58
|
placeholder,
|
|
58
59
|
searchPlaceholder,
|
|
59
60
|
emptyLabel,
|
|
60
|
-
loadingLabel
|
|
61
|
-
loadMoreLabel
|
|
62
|
-
clearLabel
|
|
61
|
+
loadingLabel,
|
|
62
|
+
loadMoreLabel,
|
|
63
|
+
clearLabel,
|
|
63
64
|
createLabel,
|
|
64
65
|
onCreateClick,
|
|
65
66
|
isLoading = false,
|
|
@@ -68,7 +69,12 @@ export function AsyncOptionsCombobox<T extends AsyncOptionComboboxOption>({
|
|
|
68
69
|
disabled = false,
|
|
69
70
|
className,
|
|
70
71
|
}: AsyncOptionsComboboxProps<T>) {
|
|
72
|
+
const t = useTranslations('Common');
|
|
71
73
|
const [open, setOpen] = useState(false);
|
|
74
|
+
const resolvedLoadingLabel = loadingLabel ?? t('labels.loading');
|
|
75
|
+
const resolvedLoadMoreLabel = loadMoreLabel ?? t('actions.loadMore');
|
|
76
|
+
const resolvedClearLabel = clearLabel ?? t('actions.clearSelection');
|
|
77
|
+
const resolvedCreateLabel = createLabel ?? t('actions.create');
|
|
72
78
|
|
|
73
79
|
const normalizedOptions = useMemo(() => {
|
|
74
80
|
const unique = new Map<string, T>();
|
|
@@ -122,12 +128,12 @@ export function AsyncOptionsCombobox<T extends AsyncOptionComboboxOption>({
|
|
|
122
128
|
{isLoading ? (
|
|
123
129
|
<div className="flex items-center justify-center gap-2 text-muted-foreground">
|
|
124
130
|
<Loader2 className="size-4 animate-spin" />
|
|
125
|
-
<span>{
|
|
131
|
+
<span>{resolvedLoadingLabel}</span>
|
|
126
132
|
</div>
|
|
127
133
|
) : (
|
|
128
134
|
<div className="space-y-2">
|
|
129
135
|
<p className="text-muted-foreground">{emptyLabel}</p>
|
|
130
|
-
{onCreateClick
|
|
136
|
+
{onCreateClick ? (
|
|
131
137
|
<Button
|
|
132
138
|
type="button"
|
|
133
139
|
variant="outline"
|
|
@@ -138,7 +144,7 @@ export function AsyncOptionsCombobox<T extends AsyncOptionComboboxOption>({
|
|
|
138
144
|
}}
|
|
139
145
|
>
|
|
140
146
|
<Plus className="size-4" />
|
|
141
|
-
{
|
|
147
|
+
{resolvedCreateLabel}
|
|
142
148
|
</Button>
|
|
143
149
|
) : null}
|
|
144
150
|
</div>
|
|
@@ -192,7 +198,7 @@ export function AsyncOptionsCombobox<T extends AsyncOptionComboboxOption>({
|
|
|
192
198
|
{isLoading ? (
|
|
193
199
|
<Loader2 className="size-4 animate-spin" />
|
|
194
200
|
) : null}
|
|
195
|
-
{
|
|
201
|
+
{resolvedLoadMoreLabel}
|
|
196
202
|
</Button>
|
|
197
203
|
</div>
|
|
198
204
|
) : null}
|
|
@@ -207,7 +213,7 @@ export function AsyncOptionsCombobox<T extends AsyncOptionComboboxOption>({
|
|
|
207
213
|
variant="ghost"
|
|
208
214
|
size="icon"
|
|
209
215
|
className="shrink-0"
|
|
210
|
-
aria-label={
|
|
216
|
+
aria-label={resolvedClearLabel}
|
|
211
217
|
onClick={() => onSelect(null)}
|
|
212
218
|
disabled={disabled}
|
|
213
219
|
>
|
|
@@ -221,7 +227,7 @@ export function AsyncOptionsCombobox<T extends AsyncOptionComboboxOption>({
|
|
|
221
227
|
variant="outline"
|
|
222
228
|
size="icon"
|
|
223
229
|
className="shrink-0"
|
|
224
|
-
aria-label={createLabel ?? '
|
|
230
|
+
aria-label={createLabel ?? t('actions.create')}
|
|
225
231
|
onClick={onCreateClick}
|
|
226
232
|
disabled={disabled}
|
|
227
233
|
>
|