This commit is contained in:
2025-12-07 15:58:07 +07:00
parent 75a641ab40
commit 942aeafb60
2211 changed files with 178727 additions and 89 deletions

BIN
old/assets/images/arrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,51 @@
/**
* Created by Glee on 03-Nov-2020.
*/
const Checkbox = function (deleteItemCb) {
const INPUT_CHECKBOX_CLASS = '.js-checkbox-id';
let _deleteItemCb = deleteItemCb;
return {
setAllChecked,
getCheckedIds,
deleteSelected
}
function setAllChecked() {
var all_checkboxes = $(INPUT_CHECKBOX_CLASS);
if ($(this).is(':checked')) {
all_checkboxes.each(function (index, item) {
$(item).prop("checked", true);
})
} else {
all_checkboxes.each(function (index, item) {
$(item).prop("checked", false);
})
}
}
function deleteSelected() {
if (!confirm('Bạn chắc chắn muốn xóa ?')) {
return;
}
$(INPUT_CHECKBOX_CLASS).each(function (index, item) {
if ($(item).is(':checked')) {
//delete_deal(item.value, false);
_deleteItemCb(item.value)
}
});
}
function getCheckedIds() {
let list_ids = [];
$(INPUT_CHECKBOX_CLASS).each(function (index, item) {
if ($(item).is(':checked')) list_ids.push(item.value);
});
return list_ids;
}
};

View File

@@ -0,0 +1,40 @@
"use strict";
const AdminFunction = (() => {
function capNhatTrangThaiMenu(e) {
!1 === e ? $("#js-admin-content-container").addClass("show-large-menu") : $("#js-admin-content-container").removeClass("show-large-menu"), $("#js-menu-big").toggleClass("hidden", e), $("#js-menu-small").toggleClass("hidden", !e), $("#js-form-search").toggleClass("menu-hide", e), localStorage.setItem(e ? "menu_big" : "menu_small", "hidden"), localStorage.removeItem(e ? "menu_small" : "menu_big");
}
function e(e) {
let t = null;
return function (...n) {
const o = this, a = function () {
t = null, n.length > 0 && !e && func.apply(o, n);
}, i = e && !t;
clearTimeout(t), t = setTimeout(a, wait), i && func.apply(o, n);
};
}
function t(t) {
$("#status_" + t).html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Đang xử lý..</span>'), setTimeout(() => {
$("#status_" + t).html("");
}, 1e3);
}
function n(e) {
$(e).keyup((() => {
$("#js-show-search").show();
}));
$("body").click((() => {
$("#js-show-search").hide();
}));
}
function o(e) {
$("#js-status-hottype-" + e).html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Đang xử lý..</span>'), setTimeout(() => {
$("#js-status-hottype-" + e).html("");
}, 1e3);
}
function i(e) {
$("#overlay").addClass("active"), $(".status-notificatiom").addClass("active"), !0 === e ? $(".status-notificatiom .content").html('<i class="fa fa-check"></i> <b>Cập nhật thành công</b>\n <p>Đơn hàng #000-368 đã được cập nhật thành công</p>') : $(".status-notificatiom .content").html('<i class="fa-solid fa-triangle-exclamation"></i> <b>Lỗi cập nhật</b><p>Có một số vấn đề với hoạt động của bạn.</p>');
}
function r() {
$("#overlay").removeClass("active"), $(".status-notificatiom").removeClass("active");
}
return { capNhatTrangThaiMenu: capNhatTrangThaiMenu, add_product_to_category: t, run_search: n, update_product_hot: o, checkForm: i, closeForm: r };
})();

View File

@@ -0,0 +1,41 @@
/* ===========================
FONT IMPORT (Dùng chung)
=========================== */
@import "https://fonts.googleapis.com/css2?family=DM+Sans:wght@100;200;300;400;500;600;700;800;900;1000&display=swap";
@import "https://fonts.googleapis.com/css2?family=Wix+Madefor+Text:wght@400;500;600;700;800;1000&display=swap";
@import "https://fonts.googleapis.com/css2?family=Inclusive+Sans:wght@400;500;600;700;800;900;1000&display=swap";
@import "https://fonts.googleapis.com/css2?family=AR+One+Sans:wght@400;500;600;700;800;1000&display=swap";
@layer properties {
:root {
--font-sans: "Inclusive Sans", sans-serif;
--text-base: 16px;
--color-hura: #0041e8;
--color-header: #002bb5;
--text-base--line-height: 1.5;
}
}
@layer base {
html,
body {
font-family: var(--font-sans);
font-size: var(--text-base);
line-height: var(--text-base--line-height);
}
* {
box-sizing: border-box;
}
}
@layer components {
.btn-active {
--btn-bg: var(--color-hura);
--btn-fg: #ffffff;
--btn-border: var(--color-hura);
}
.btn-active:hover {
--btn-bg: #002bb5;
--btn-border: #002bb5;
}
}

File diff suppressed because one or more lines are too long

2
old/assets/script/jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

16584
old/assets/script/style.css Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
"use strict";
var AdminFunctions = (function () {
function toggleMenuVisibility(hideLargeMenu) {
var contentContainer = $('#js-admin-content-container');
var largeMenu = $('#js-menu-big');
var smallMenu = $('#js-menu-small');
var searchForm = $('#js-form-search');
contentContainer.toggleClass('show-large-menu', !hideLargeMenu);
largeMenu.toggleClass('hidden', hideLargeMenu);
smallMenu.toggleClass('hidden', !hideLargeMenu);
searchForm.toggleClass('menu-hide', hideLargeMenu);
localStorage.setItem(hideLargeMenu ? 'menu_big' : 'menu_small', 'hidden');
localStorage.removeItem(hideLargeMenu ? 'menu_small' : 'menu_big');
}
function debounce(func, wait, immediate) {
var timeout = null;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var context = this;
var later = function () {
timeout = null;
if (!immediate)
func.apply(context, args);
};
var callNow = immediate && !timeout;
if (timeout !== null) {
clearTimeout(timeout);
}
timeout = setTimeout(later, wait);
if (callNow)
func.apply(context, args);
};
}
function addProductToCategory(productId) {
var statusElement = $('#status_' + productId);
statusElement.html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Processing...</span>');
setTimeout(function () {
statusElement.html('');
}, 1000);
}
function searchSuggestions(inputSelector) {
$(inputSelector).keyup(debounce(function () {
$('#js-show-search').show();
}, 300, false));
$('body').click(function () {
$('#js-show-search').hide();
});
}
function markProductAsHot(productId) {
var statusElement = $('#js-status-hottype-' + productId);
statusElement.html('<span class="loading loading-bars loading-sm"></span><span class="ml-[3px]">Processing...</span>');
setTimeout(function () {
statusElement.html('');
}, 1000);
}
return {
toggleMenuVisibility: toggleMenuVisibility,
addProductToCategory: addProductToCategory,
searchSuggestions: searchSuggestions,
markProductAsHot: markProductAsHot
};
})();

View File

@@ -0,0 +1,76 @@
"use strict";
interface AdminFunctions {
toggleMenuVisibility(hideLargeMenu: boolean): void;
addProductToCategory(productId: string): void;
searchSuggestions(inputSelector: string): void;
markProductAsHot(productId: string): void;
}
const AdminFunctions: AdminFunctions = (() => {
function toggleMenuVisibility(hideLargeMenu: boolean): void {
const contentContainer = $('#js-admin-content-container');
const largeMenu = $('#js-menu-big');
const smallMenu = $('#js-menu-small');
const searchForm = $('#js-form-search');
contentContainer.toggleClass('show-large-menu', !hideLargeMenu);
largeMenu.toggleClass('hidden', hideLargeMenu);
smallMenu.toggleClass('hidden', !hideLargeMenu);
searchForm.toggleClass('menu-hide', hideLargeMenu);
localStorage.setItem(hideLargeMenu ? 'menu_big' : 'menu_small', 'hidden');
localStorage.removeItem(hideLargeMenu ? 'menu_small' : 'menu_big');
}
function debounce(func: (...args: any[]) => void, wait: number, immediate: boolean) {
let timeout: ReturnType<typeof setTimeout> | null = null;
return function (this: HTMLInputElement, ...args: any[]) {
const context = this;
const later = function () {
timeout = null;
if (!immediate) func.apply(context, args);
};
const callNow = immediate && !timeout;
if (timeout !== null) {
clearTimeout(timeout);
}
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
}
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 searchSuggestions(inputSelector: string): void {
$(inputSelector).keyup(debounce(function (this: HTMLInputElement) {
$('#js-show-search').show();
}, 300, false) as any);
$('body').click(function () {
$('#js-show-search').hide();
});
}
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 {
toggleMenuVisibility,
addProductToCategory,
searchSuggestions,
markProductAsHot
};
})();