Tracking GH: https://github.com/Expensify/Expensify/issues/418655
Design Doc: https://docs.google.com/document/d/1_p8qZXVKG-s32i9GKqVjCLEcEREBUEgYcxk3KYHXMVg/edit?tab=t.0
From the Design Doc:
Admin: Downloading Tags
First, we will not hide the threeDotsMenuItems for multi-level tags, we need to set shouldShowThreeDotsButton={true} for all cases (currently we hide it when tags are multi-level).
- Call new downloadMultiLeveltagsCSV function for multi-level tags
We are not going to support download for Multi-Level Dependent Tags, we need to update the condition for showing the download CSV option along with that we need to create a new Util which will call ExportMultiLevelTagsCSV API endpoint for multi-level tags: \
// We hide the option to download tags in case of dependent tags
if (hasVisibleTags && !hasDependentTags) {
menuItems.push({
icon: Expensicons.Download,
text: translate("spreadsheet.downloadCSV"),
onSelected: () => {
if (isOffline) {
Modal.close(() => setIsOfflineModalVisible(true));
return;
}
Modal.close(() => {
// Here we will check if the policy has multilevel tags
// And will call the appropriate API command
if (policy?.isUsingMultiLevelTags) {
Tag.downloadMultiLeveltagsCSV(policyID, () => {
setIsDownloadFailureModalVisible(true);
});
return;
}
Tag.downloadTagsCSV(policyID, () => {
setIsDownloadFailureModalVisible(true);
});
});
},
});
}
- Create new util to download multi-level independent tags
The downloadMultiLeveltagsCSV steps util will be similar to downloadTagsCSV only difference is we will call ExportMultiLevelTagsCSV endpoint in this case:
The Util downloadMultiLeveltagsCSV endpoint will be as follows: \
function downloadMultiLeveltagsCSV(
policyID: string,
onDownloadFailed: () => void
) {
const finalParameters = enhanceParameters(
WRITE_COMMANDS.EXPORT_MULTI_LEVEL_TAGS_CSV,
{
policyID,
}
);
const fileName = "MultiLevelTags.csv";
const formData = new FormData();
Object.entries(finalParameters).forEach(([key, value]) => {
formData.append(key, String(value));
});
fileDownload(
ApiUtils.getCommandURL({
command: WRITE_COMMANDS.EXPORT_MULTI_LEVEL_TAGS_CSV,
}),
fileName,
"",
false,
formData,
CONST.NETWORK.METHOD.POST,
onDownloadFailed
);
}
The API command EXPORT_MULTI_LEVEL_TAGS_CSV will be implemented according to the backend changes here.
We will rename the command ExportTagsCSV to ExportSingleLevelTagsCSV (More details here)
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021922164703131803558
- Upwork Job ID: 1922164703131803558
- Last Price Increase: 2025-05-13
- Automatic offers:
- allgandalf | Reviewer | 107454938
Issue Owner
Current Issue Owner: @
Issue Owner
Current Issue Owner: @joekaufmanexpensify
Tracking GH: https://github.com/Expensify/Expensify/issues/418655
Design Doc: https://docs.google.com/document/d/1_p8qZXVKG-s32i9GKqVjCLEcEREBUEgYcxk3KYHXMVg/edit?tab=t.0
From the Design Doc:
Admin: Downloading Tags
First, we will not hide the
threeDotsMenuItemsfor multi-level tags, we need to set shouldShowThreeDotsButton={true} for all cases (currently we hide it when tags are multi-level).We are not going to support download for Multi-Level Dependent Tags, we need to update the condition for showing the download CSV option along with that we need to create a new Util which will call
ExportMultiLevelTagsCSVAPI endpoint for multi-level tags: \The
downloadMultiLeveltagsCSVsteps util will be similar todownloadTagsCSVonly difference is we will callExportMultiLevelTagsCSVendpoint in this case:The Util
downloadMultiLeveltagsCSVendpoint will be as follows: \The API command
EXPORT_MULTI_LEVEL_TAGS_CSVwill be implemented according to the backend changes here.We will rename the command
ExportTagsCSVtoExportSingleLevelTagsCSV(More details here)Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @joekaufmanexpensify