Skip to content

Commit f324614

Browse files
authored
Merge pull request #675 from AppQuality/custom-status
Custom-status
2 parents fe31a1a + fa703ad commit f324614

File tree

6 files changed

+174
-2
lines changed

6 files changed

+174
-2
lines changed

src/common/components/BugDetail/BugStateDropdown.tsx

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ import { appTheme } from 'src/app/theme';
2020
import { useTranslation } from 'react-i18next';
2121
import { BugStateIcon } from 'src/common/components/BugStateIcon';
2222
import { getCustomStatusInfo } from 'src/common/components/utils/getCustomStatusInfo';
23+
import { ReactComponent as GearIcon } from 'src/assets/icons/gear.svg';
24+
import { useAppDispatch } from 'src/app/hooks';
25+
import { setCustomStatusDrawerOpen } from 'src/features/bugsPage/bugsPageSlice';
26+
import useWindowSize from 'src/hooks/useWindowSize';
2327

2428
const StyledItem = styled(Item)`
2529
display: flex;
@@ -30,6 +34,13 @@ const StyledItem = styled(Item)`
3034
}
3135
`;
3236

37+
const ManageItem = styled(StyledItem)`
38+
padding-left: ${({ theme }) => theme.space.sm};
39+
color: ${({ theme }) => theme.palette.blue[600]};
40+
font-weight: ${({ theme }) => theme.fontWeights.semibold};
41+
cursor: pointer;
42+
`;
43+
3344
const SelectedItem = styled.div`
3445
display: flex;
3546
align-items: center;
@@ -61,6 +72,10 @@ const BugStateDropdown = ({ bug }: { bug: Bug }) => {
6172
} = useGetCampaignsByCidCustomStatusesQuery({
6273
cid: bug.campaign_id.toString(),
6374
});
75+
const dispatch = useAppDispatch();
76+
const { width } = useWindowSize();
77+
const breakpointSm = parseInt(appTheme.breakpoints.sm, 10);
78+
const hideManage = width < breakpointSm;
6479

6580
const sortStates = (a: DropdownItem, b: DropdownItem) => {
6681
if (a.id < b.id) return -1;
@@ -93,6 +108,10 @@ const BugStateDropdown = ({ bug }: { bug: Bug }) => {
93108
);
94109
}, [custom_status, options]);
95110

111+
const onManageClick = () => {
112+
dispatch(setCustomStatusDrawerOpen(true));
113+
};
114+
96115
if (isError) return null;
97116

98117
return (
@@ -143,7 +162,7 @@ const BugStateDropdown = ({ bug }: { bug: Bug }) => {
143162
</Select>
144163
)}
145164
</Field>
146-
<Menu>
165+
<Menu zIndex={1}>
147166
{options &&
148167
options.map((item) => (
149168
<>
@@ -159,6 +178,24 @@ const BugStateDropdown = ({ bug }: { bug: Bug }) => {
159178
</StyledItem>
160179
</>
161180
))}
181+
182+
{!hideManage && (
183+
<>
184+
<Separator />
185+
<ManageItem
186+
disabled
187+
value={{}}
188+
key="manage-custom-status"
189+
className="bug-dropdown-custom-status-manage"
190+
onClick={onManageClick}
191+
>
192+
<GearIcon />{' '}
193+
{t(
194+
'__BUGS_PAGE_BUG_DETAIL_CUSTOM_STATUS_DROPDOWN_MANAGE_LABEL'
195+
)}
196+
</ManageItem>
197+
</>
198+
)}
162199
</Menu>
163200
</Dropdown>
164201
)}

src/features/bugsPage/bugsPageSlice.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ interface initialSimpleState {
4848
order: Order;
4949
isFilterDrawerOpen: boolean;
5050
isNaBugExcluded: boolean;
51+
isCustomStatusDrawerOpen: boolean;
52+
customStatus: Array<{
53+
id: number;
54+
name: string;
55+
color: string;
56+
phase: {
57+
id: number;
58+
name: string;
59+
};
60+
is_default: boolean;
61+
}>;
5162
}
5263

5364
const initialStateSimple: initialSimpleState = {
@@ -57,6 +68,8 @@ const initialStateSimple: initialSimpleState = {
5768
order: 'DESC',
5869
isFilterDrawerOpen: false,
5970
isNaBugExcluded: false,
71+
isCustomStatusDrawerOpen: false,
72+
customStatus: [],
6073
};
6174

6275
const bugPageSlice = createSlice({
@@ -198,6 +211,15 @@ const bugPageSlice = createSlice({
198211
setIsNaBugExcluded: (state, action: PayloadAction<boolean>) => {
199212
state.isNaBugExcluded = action.payload;
200213
},
214+
setCustomStatusDrawerOpen: (state, action: PayloadAction<boolean>) => {
215+
state.isCustomStatusDrawerOpen = action.payload;
216+
},
217+
updateCustomStatus: (state, action) => {
218+
state.customStatus = action.payload;
219+
},
220+
resetCustomStatus: (state) => {
221+
state.customStatus = initialStateSimple.customStatus;
222+
},
201223
},
202224
});
203225

@@ -273,4 +295,7 @@ export const {
273295
setOrder,
274296
setFilterDrawerOpen,
275297
setIsNaBugExcluded,
298+
setCustomStatusDrawerOpen,
299+
updateCustomStatus,
300+
resetCustomStatus,
276301
} = bugPageSlice.actions;

src/locales/en/translation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_VIDEO_LABEL_one": "video",
7373
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_VIDEO_LABEL_other": "videos",
7474
"__BUGS_PAGE_BUG_DETAIL_CURRENT_RESULT_LABEL": "Actual result",
75+
"__BUGS_PAGE_BUG_DETAIL_CUSTOM_STATUS_DROPDOWN_MANAGE_LABEL": "Add or edit statuses",
7576
"__BUGS_PAGE_BUG_DETAIL_DESCRIPTION_LABEL": "Description",
7677
"__BUGS_PAGE_BUG_DETAIL_DETAILS_BUG_DEVICE_OS_LABEL": "OS",
7778
"__BUGS_PAGE_BUG_DETAIL_DETAILS_BUG_DEVICE_TYPE_LABEL": "Device",
@@ -105,6 +106,9 @@
105106
"__BUGS_PAGE_BUG_DETAIL_TAGS_SHOW_MORE_one": "+ other {{count}}",
106107
"__BUGS_PAGE_BUG_DETAIL_TAGS_SHOW_MORE_other": "+ other {{count}}",
107108
"__BUGS_PAGE_CLOSE_DETAILS_TOOLTIP": "Close",
109+
"__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CONFIRM_BUTTON": "Save changes",
110+
"__BUGS_PAGE_CUSTOM_STATUS_DRAWER_HEADER_TITLE": "Add or edit statuses",
111+
"__BUGS_PAGE_CUSTOM_STATUS_DRAWER_RESET_BUTTON": "Cancel",
108112
"__BUGS_PAGE_FILTER_DRAWER_BODY_ACTIONS_LABEL": "TAILORED FOR YOU",
109113
"__BUGS_PAGE_FILTER_DRAWER_BODY_BUG_LABEL": "OTHER DETAILS",
110114
"__BUGS_PAGE_FILTER_DRAWER_BODY_COMMON_LABEL": "MOST POPULAR",

src/locales/it/translation.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"__APP_MOBILE_NAVIGATION_MENU_LABEL MAX:5": "menu",
1717
"__APP_MOBILE_NAVIGATION_PERSONAL_WORKSPACES_DROPDOWN_GROUP_LABEL": "I tuoi workspace",
1818
"__APP_MOBILE_NAVIGATION_SHARED_WORKSPACES_COUNTER_LABEL_one": "{{count}} elemento condiviso",
19+
"__APP_MOBILE_NAVIGATION_SHARED_WORKSPACES_COUNTER_LABEL_many": "",
1920
"__APP_MOBILE_NAVIGATION_SHARED_WORKSPACES_COUNTER_LABEL_other": "{{count}} elementi condivisi",
2021
"__APP_MOBILE_NAVIGATION_SHARED_WORKSPACES_DROPDOWN_GROUP_LABEL": "Workspace condivisi",
2122
"__APP_MOBILE_NAVIGATION_WORKSPACES_DROPDOWN_LABEL_NO_MATCHING_ITEMS": "Nessun workspace trovato",
@@ -66,12 +67,15 @@
6667
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_EXTRA_TAB_ITEM_LABEL": "File extra",
6768
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_EXTRA_TAB_TITLE": "Extra",
6869
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_IMAGE_LABEL_one": "immagine",
70+
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_IMAGE_LABEL_many": "",
6971
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_IMAGE_LABEL_other": "immagini",
7072
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_LABEL": "Allegati",
7173
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_MEDIA_TAB_TITLE": "Immagini & video",
7274
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_VIDEO_LABEL_one": "video",
75+
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_VIDEO_LABEL_many": "",
7376
"__BUGS_PAGE_BUG_DETAIL_ATTACHMENTS_VIDEO_LABEL_other": "video",
7477
"__BUGS_PAGE_BUG_DETAIL_CURRENT_RESULT_LABEL": "Risultato ottenuto",
78+
"__BUGS_PAGE_BUG_DETAIL_CUSTOM_STATUS_DROPDOWN_MANAGE_LABEL": "Crea o modifica stati",
7579
"__BUGS_PAGE_BUG_DETAIL_DESCRIPTION_LABEL": "Descrizione",
7680
"__BUGS_PAGE_BUG_DETAIL_DETAILS_BUG_DEVICE_OS_LABEL": "OS",
7781
"__BUGS_PAGE_BUG_DETAIL_DETAILS_BUG_DEVICE_TYPE_LABEL": "Dispositivo",
@@ -97,62 +101,76 @@
97101
"__BUGS_PAGE_BUG_DETAIL_SIBLINGS_FATHER_SUBTITLE": "Il bug da prendere come riferimento",
98102
"__BUGS_PAGE_BUG_DETAIL_SIBLINGS_FATHER_TITLE": "Bug unico",
99103
"__BUGS_PAGE_BUG_DETAIL_SIBLINGS_SHOW_MORE_one": "+ {{count}} altro",
104+
"__BUGS_PAGE_BUG_DETAIL_SIBLINGS_SHOW_MORE_many": "Show more +{{count}}",
100105
"__BUGS_PAGE_BUG_DETAIL_SIBLINGS_SHOW_MORE_other": "+ altri {{count}}",
101106
"__BUGS_PAGE_BUG_DETAIL_STATE_LABEL": "Stato",
102107
"__BUGS_PAGE_BUG_DETAIL_TAGS_ADD_NEW": "Aggiungi",
103108
"__BUGS_PAGE_BUG_DETAIL_TAGS_LABEL": "Tag",
104109
"__BUGS_PAGE_BUG_DETAIL_TAGS_PLACEHOLDER": "Cerca o aggiungi altri tag",
105110
"__BUGS_PAGE_BUG_DETAIL_TAGS_SHOW_MORE_one": "+ {{count}} altro",
111+
"__BUGS_PAGE_BUG_DETAIL_TAGS_SHOW_MORE_many": "",
106112
"__BUGS_PAGE_BUG_DETAIL_TAGS_SHOW_MORE_other": "+ altri {{count}}",
107113
"__BUGS_PAGE_CLOSE_DETAILS_TOOLTIP": "Chiudi",
114+
"__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CONFIRM_BUTTON": "",
115+
"__BUGS_PAGE_CUSTOM_STATUS_DRAWER_HEADER_TITLE": "",
116+
"__BUGS_PAGE_CUSTOM_STATUS_DRAWER_RESET_BUTTON": "",
108117
"__BUGS_PAGE_FILTER_DRAWER_BODY_ACTIONS_LABEL": "AZIONI FATTE DA TE",
109118
"__BUGS_PAGE_FILTER_DRAWER_BODY_BUG_LABEL": "ALTRI DETTAGLI DEL BUG",
110119
"__BUGS_PAGE_FILTER_DRAWER_BODY_COMMON_LABEL": "PIÙ COMUNI",
111120
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_CUSTOM_STATUS_ALL_LABEL": "Tutte",
112121
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_CUSTOM_STATUSE_TITLE": "Stato",
113122
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_CUSTOM_STATUSES_SHOW_LESS_LABEL": "Mostra meno",
114123
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_CUSTOM_STATUSES_SHOW_MORE_LABEL_one": "+ <2>1</2> altra",
124+
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_CUSTOM_STATUSES_SHOW_MORE_LABEL_many": "Show <2>{{count}}</2> more statuses",
115125
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_CUSTOM_STATUSES_SHOW_MORE_LABEL_other": "+ altre <2>{{count}}</2>",
116126
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_DEVICE_ALL_LABEL": "Tutti",
117127
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_DEVICE_SHOW_LESS_LABEL": "Mostra meno",
118128
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_DEVICE_SHOW_MORE_LABEL_one": "+ <2>1</2> altro",
129+
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_DEVICE_SHOW_MORE_LABEL_many": "Show <2>{{count}}</2> more devices",
119130
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_DEVICE_SHOW_MORE_LABEL_other": "+ altri <2>{{count}}</2>",
120131
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_DEVICE_TITLE": "Dispositivo",
121132
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_DUPLICATES_TITLE": "Duplicati",
122133
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_OS_ALL_LABEL": "Tutti",
123134
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_OS_SHOW_LESS_LABEL": "Mostra meno",
124135
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_OS_SHOW_MORE_LABEL_one": "+ <2>1</2> altro",
136+
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_OS_SHOW_MORE_LABEL_many": "Show <2>{{count}}</2> more OS",
125137
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_OS_SHOW_MORE_LABEL_other": "+ altri <2>{{count}}</2>",
126138
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_OS_TITLE": "OS",
127139
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_PRIORITIES_SHOW_LESS_LABEL": "Mostra meno",
128140
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_PRIORITIES_SHOW_MORE_LABEL_one": "+ <2>1</2> altra",
141+
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_PRIORITIES_SHOW_MORE_LABEL_many": "Show <2>{{count}}</2> more priorities",
129142
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_PRIORITIES_SHOW_MORE_LABEL_other": "+ altre <2>{{count}}</2>",
130143
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_PRIORITY_ALL_LABEL": "Tutte",
131144
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_PRIORITY_TITLE": "Priorità",
132145
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_READ_TITLE": "Letti/non letti",
133146
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_REPLICABILITY_ALL_LABEL": "Tutte",
134147
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_REPLICABILITY_SHOW_LESS_LABEL": "Mostra meno",
135148
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_REPLICABILITY_SHOW_MORE_LABEL_one": "+ <2>1</2> altra",
149+
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_REPLICABILITY_SHOW_MORE_LABEL_many": "Show <2>{{count}}</2> more replicabilities",
136150
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_REPLICABILITY_SHOW_MORE_LABEL_other": "+ altre <2>{{count}}</2>",
137151
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_REPLICABILITY_TITLE": "Replicabilità",
138152
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_SEVERITIES_SHOW_LESS_LABEL": "Mostra meno",
139153
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_SEVERITIES_SHOW_MORE_LABEL_one": "+ <2>1</2> altra",
154+
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_SEVERITIES_SHOW_MORE_LABEL_many": "Show <2>{{count}}</2> more severities",
140155
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_SEVERITIES_SHOW_MORE_LABEL_other": "+ altre <2>{{count}}</2>",
141156
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_SEVERITY_ALL_LABEL": "Tutte",
142157
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_SEVERITY_TITLE": "Gravità",
143158
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TAG_SHOW_LESS_LABEL": "Mostra meno",
144159
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TAG_SHOW_MORE_LABEL_one": "+ <2>1</2> altro",
160+
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TAG_SHOW_MORE_LABEL_many": "Show <2>{{count}}</2> more tags",
145161
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TAG_SHOW_MORE_LABEL_other": "+ altri <2>{{count}}</2>",
146162
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TAGS_ALL_LABEL": "Tutti",
147163
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TAGS_TITLE": "Tag",
148164
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TYPOLOGY_ALL_LABEL": "Tutte",
149165
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TYPOLOGY_SHOW_LESS_LABEL": "Mostra meno",
150166
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TYPOLOGY_SHOW_MORE_LABEL_one": "+ <2>1</2> altra",
167+
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TYPOLOGY_SHOW_MORE_LABEL_many": "Show <2>{{typologies}}</2> more typologies",
151168
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TYPOLOGY_SHOW_MORE_LABEL_other": "+ altre <2>{{count}}</2>",
152169
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_TYPOLOGY_TITLE": "Tipologia",
153170
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_USECASE_ALL_LABEL": "Tutti",
154171
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_USECASE_SHOW_LESS_LABEL": "Mostra meno",
155172
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_USECASE_SHOW_MORE_LABEL_one": "+ <2>1</2> altro",
173+
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_USECASE_SHOW_MORE_LABEL_many": "Show <2>{{useCases}}</2> more Use Cases",
156174
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_USECASE_SHOW_MORE_LABEL_other": "+ altri <2>{{count}}</2>",
157175
"__BUGS_PAGE_FILTER_DRAWER_BODY_FILTER_USECASE_TITLE": "Use Case",
158176
"__BUGS_PAGE_FILTER_DRAWER_CONFIRM_BUTTON": "Vedi risultati",
@@ -225,6 +243,7 @@
225243
"__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_ITEM_VAL_5": "Molto positivo",
226244
"__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_SENTIMENT_LABEL": "Sentimento",
227245
"__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_USECASE_LABEL_one": "Use Case (tot. {{count}})",
246+
"__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_USECASE_LABEL_many": "",
228247
"__CAMPAIGN_EXP_WIDGET_SENTIMENT_LIST_USECASE_LABEL_other": "Use Case (tot. {{count}})",
229248
"__CAMPAIGN_PAGE_BUTTON_DETAIL_BUG": "Vai alla lista bug",
230249
"__CAMPAIGN_PAGE_DEVICE_AND_BUG_TYPES_SECTION_SUBTITLE": "Visualizza i bug divisi per dispositivi e sistemi operativi e le tipologie di tutti i bug segnalati",
@@ -244,6 +263,7 @@
244263
"__CAMPAIGN_PAGE_INSIGHTS_ALL_CLUSTERS": "Generale",
245264
"__CAMPAIGN_PAGE_INSIGHTS_LIGHTBOX_DETAILS_LINKED_INSIGHT_LABEL": "Scoperta collegata",
246265
"__CAMPAIGN_PAGE_INSIGHTS_LIGHTBOX_HEADER_HIGHLIGHTS_LABEL_one": "({{count}} Evidenze)",
266+
"__CAMPAIGN_PAGE_INSIGHTS_LIGHTBOX_HEADER_HIGHLIGHTS_LABEL_many": "({{count}} Highlights)",
247267
"__CAMPAIGN_PAGE_INSIGHTS_LIGHTBOX_HEADER_HIGHLIGHTS_LABEL_other": "({{count}} Evidenze)",
248268
"__CAMPAIGN_PAGE_INSIGHTS_NAVIGATION_TITLE": "Executive summary",
249269
"__CAMPAIGN_PAGE_INSIGHTS_NUMBER_LABEL": "Scoperta",
@@ -257,6 +277,7 @@
257277
"__CAMPAIGN_PAGE_INSIGHTS_SECTION_TITLE": "Punti principali",
258278
"__CAMPAIGN_PAGE_INSIGHTS_SHOW_LESS_LABEL": "Mostra meno",
259279
"__CAMPAIGN_PAGE_INSIGHTS_SHOW_MORE_LABEL_one": "Vedi altre evidenze <2>({{video_count}})</2>",
280+
"__CAMPAIGN_PAGE_INSIGHTS_SHOW_MORE_LABEL_many": "Show more highlights <2>({{video_count}})</2>",
260281
"__CAMPAIGN_PAGE_INSIGHTS_SHOW_MORE_LABEL_other": "Vedi altre evidenze <2>({{video_count}})</2>",
261282
"__CAMPAIGN_PAGE_INSIGHTS_VIDEO_PART_NUMBER_LABEL": "Evidenza {{index}} di {{video_count}}",
262283
"__CAMPAIGN_PAGE_METHODOLOGY_CARD_INVOLVED_USERS_LABEL": "UTENTI COINVOLTI",
@@ -268,6 +289,7 @@
268289
"__CAMPAIGN_PAGE_METHODOLOGY_SHOW_LESS": "Mostra meno",
269290
"__CAMPAIGN_PAGE_METHODOLOGY_SHOW_MORE": "Leggi di più",
270291
"__CAMPAIGN_PAGE_METHODOLOGY_USERS_NUMBER_one": "{{count}} Utente",
292+
"__CAMPAIGN_PAGE_METHODOLOGY_USERS_NUMBER_many": "",
271293
"__CAMPAIGN_PAGE_METHODOLOGY_USERS_NUMBER_other": "{{count}} Utenti",
272294
"__CAMPAIGN_PAGE_METHODOLOGY_USERS_QUALIQUANTITATIVE": "Quali-quantitative",
273295
"__CAMPAIGN_PAGE_METHODOLOGY_USERS_QUALITATIVE": "Qualitativa",
@@ -701,6 +723,7 @@
701723
"__PAGE_BUG_SEARCH_EMPTY_STATE_SUB": "Prova con parole chiave diverse o più comuni",
702724
"__PAGE_BUGS_UNREAD_PILL": "Non letti",
703725
"__PAGE_CAMPAIGN_WIDGET_BUGS_BY_TYPE_AXIS_BOTTOM_LABEL_one": "Bug",
726+
"__PAGE_CAMPAIGN_WIDGET_BUGS_BY_TYPE_AXIS_BOTTOM_LABEL_many": "",
704727
"__PAGE_CAMPAIGN_WIDGET_BUGS_BY_TYPE_AXIS_BOTTOM_LABEL_other": "Bug",
705728
"__PAGE_CAMPAIGN_WIDGET_BUGS_BY_TYPE_AXIS_LEFT_LABEL": "Tipologie",
706729
"__PAGE_HEADER_BUGS_DOTS_MENU_ITEM_INT_CENTER": "Integra con altri tool",
@@ -777,21 +800,30 @@
777800
"__WORKSPACE_SETTINGS_MEMBER_RESEND_INVITE_ACTION": "Rimanda invito",
778801
"__WORKSPACE_SETTINGS_MODAL_CTA_COPY_LINK": "Copia il link",
779802
"Devices ({{count}})_one": "Dispositivi ({{count}})",
803+
"Devices ({{count}})_many": "",
780804
"Devices ({{count}})_other": "Dispositivi ({{count}})",
781805
"OS ({{count}})_one": "OS ({{count}})",
806+
"OS ({{count}})_many": "",
782807
"OS ({{count}})_other": "OS ({{count}})",
783808
"Priority ({{count}})_one": "Priorità ({{count}})",
809+
"Priority ({{count}})_many": "",
784810
"Priority ({{count}})_other": "Priorità ({{count}})",
785811
"Replicability ({{count}})_one": "Replicabilità ({{count}})",
812+
"Replicability ({{count}})_many": "",
786813
"Replicability ({{count}})_other": "Replicabilità ({{count}})",
787814
"Severity ({{count}})_one": "Gravità ({{count}})",
815+
"Severity ({{count}})_many": "",
788816
"Severity ({{count}})_other": "Gravità ({{count}})",
789817
"Status ({{count}})_one": "Stato ({{count}})",
818+
"Status ({{count}})_many": "",
790819
"Status ({{count}})_other": "Stati ({{count}})",
791820
"Tags ({{count}})_one": "Tag ({{count}})",
821+
"Tags ({{count}})_many": "",
792822
"Tags ({{count}})_other": "Tag ({{count}})",
793823
"Typology ({{count}})_one": "Tipologia ({{count}})",
824+
"Typology ({{count}})_many": "",
794825
"Typology ({{count}})_other": "Tipologie ({{count}})",
795826
"Use Cases ({{count}})_one": "Use Case ({{count}})",
827+
"Use Cases ({{count}})_many": "",
796828
"Use Cases ({{count}})_other": "Use Case ({{count}})"
797829
}

src/pages/Bug/Drawer/index.tsx

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import { Button, Drawer } from '@appquality/unguess-design-system';
2+
import { useTranslation } from 'react-i18next';
3+
import { useAppDispatch, useAppSelector } from 'src/app/hooks';
4+
import {
5+
resetCustomStatus,
6+
setCustomStatusDrawerOpen,
7+
updateCustomStatus,
8+
} from 'src/features/bugsPage/bugsPageSlice';
9+
10+
export const CustomStatusDrawer = () => {
11+
const { t } = useTranslation();
12+
const dispatch = useAppDispatch();
13+
const { isCustomStatusDrawerOpen, customStatus } = useAppSelector(
14+
(state) => ({
15+
isCustomStatusDrawerOpen: state.bugsPage.isCustomStatusDrawerOpen,
16+
customStatus: state.bugsPage.customStatus,
17+
})
18+
);
19+
20+
const onClose = () => {
21+
dispatch(setCustomStatusDrawerOpen(false));
22+
};
23+
24+
const onCtaClick = () => {
25+
dispatch(updateCustomStatus(customStatus));
26+
dispatch(setCustomStatusDrawerOpen(false));
27+
};
28+
29+
const onResetClick = () => {
30+
dispatch(resetCustomStatus());
31+
};
32+
33+
return (
34+
<Drawer isOpen={isCustomStatusDrawerOpen} onClose={onClose}>
35+
<Drawer.Header>
36+
{t('__BUGS_PAGE_CUSTOM_STATUS_DRAWER_HEADER_TITLE')}
37+
</Drawer.Header>
38+
<Drawer.Body>custom status</Drawer.Body>
39+
<Drawer.Footer>
40+
<Drawer.FooterItem>
41+
<Button id="custom-status-drawer-reset" onClick={onResetClick}>
42+
{t('__BUGS_PAGE_CUSTOM_STATUS_DRAWER_RESET_BUTTON')}
43+
</Button>
44+
</Drawer.FooterItem>
45+
<Drawer.FooterItem>
46+
<Button
47+
id="custom-status-drawer-confirm"
48+
isPrimary
49+
isAccent
50+
onClick={onCtaClick}
51+
>
52+
{t('__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CONFIRM_BUTTON')}
53+
</Button>
54+
</Drawer.FooterItem>
55+
</Drawer.Footer>
56+
<Drawer.Close id="custom-status-drawer-close" onClick={onClose} />
57+
</Drawer>
58+
);
59+
};

0 commit comments

Comments
 (0)