Spaces:
Running
Running
Download Frontend/src/utils/format.js from ritesh19180/ai-helpdesk-api: direct link, hf CLI and curl.
- Browser
- Download file 293 Bytes
-
https://huggingface.co/spaces/ritesh19180/ai-helpdesk-api/resolve/main/Frontend/src/utils/format.js
- Command line
-
hf download hf://spaces/ritesh19180/ai-helpdesk-api/Frontend/src/utils/format.js
-
curl -L -o format.js https://huggingface.co/spaces/ritesh19180/ai-helpdesk-api/resolve/main/Frontend/src/utils/format.js
293 Bytes
| export const formatTicketId = (uuid) => { | |
| if (!uuid) return ''; | |
| // If it's already a short string, return as is | |
| if (String(uuid).length <= 8) return uuid; | |
| // Otherwise, grab the first segment of the UUID and uppercase it | |
| return String(uuid).split('-')[0].toUpperCase(); | |
| }; | |