This commit is contained in:
2026-03-07 10:26:20 +07:00
commit aa223ce3bb
1128 changed files with 118856 additions and 0 deletions

32
assets/typescript/main.ts Normal file
View File

@@ -0,0 +1,32 @@
"use strict";
interface AdminFunctions {
addProductToCategory(productId: string): void;
markProductAsHot(productId: string): void;
}
const AdminFunctions: AdminFunctions = (() => {
function addProductToCategory(productId: string): void {
const statusElement = $('#status_' + productId);
statusElement.html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Processing...</span>');
setTimeout(() => {
statusElement.html('');
}, 1000);
}
function markProductAsHot(productId: string): void {
const statusElement = $('#js-status-hottype-' + productId);
statusElement.html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Processing...</span>');
setTimeout(() => {
statusElement.html('');
}, 1000);
}
return {
addProductToCategory,
markProductAsHot
};
})();
export default AdminFunctions;