22 lines
659 B
JavaScript
22 lines
659 B
JavaScript
"use strict";
|
|
require("../common/vendor.js");
|
|
({
|
|
date: (/* @__PURE__ */ new Date()).toISOString().split("T")[0]
|
|
});
|
|
const getCategoryIcon = (category) => {
|
|
const icons = {
|
|
"001": "file-text",
|
|
"002": "wrench",
|
|
"003": "bottle",
|
|
"004": "refresh",
|
|
"005": "shirt"
|
|
};
|
|
const allIcons = ["package", "file-text", "wrench", "bottle", "refresh", "shirt", "phone", "battery", "monitor", "sofa", "bag", "footprints", "book", "wine", "medicine"];
|
|
if (icons[category]) {
|
|
return icons[category];
|
|
}
|
|
const num = parseInt(category) || category.length;
|
|
return allIcons[num % allIcons.length];
|
|
};
|
|
exports.getCategoryIcon = getCategoryIcon;
|