initial commit

This commit is contained in:
2025-08-05 10:26:39 +05:00
commit b7412bbef6
298 changed files with 10533 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import Alpine from 'alpinejs'
import counter from "./counter";
window.Alpine = Alpine
Alpine.data("vars", counter)
Alpine.start()

View File

@@ -0,0 +1 @@
import "./alpine"

View File

@@ -0,0 +1,3 @@
export default () => ({
count: 2309
})

View File

@@ -0,0 +1,49 @@
class Changer {
constructor() {
this.inputs = [];
this.legal = [
"bank_mfo",
"bank_name",
"bank_account",
"name",
"director_name",
"responsible_person",
"inn"
];
this.physical = [
"passport_series",
"jshir",
"first_name",
"last_name",
]
this.legal.concat(this.physical).forEach((item) => {
this.inputs[item] = document.querySelector(`#id_${item}`).closest(".form-row");
})
}
toggleDisplay(showItems, hideItems) {
showItems.forEach(item => {
this.inputs[item].style.display = "block";
});
hideItems.forEach(item => {
this.inputs[item].style.display = "none";
});
};
change(e) {
if (e == "PHYSICAL") {
this.toggleDisplay(this.physical, this.legal);
} else if (e == "LEGAL") {
this.toggleDisplay(this.legal, this.physical);
}
}
}
document.addEventListener("DOMContentLoaded", () => {
let obj = new Changer();
let select = document.querySelector("#id_person_type");
select.addEventListener("change", (e) => obj.change(e.target.value));
obj.change(select.value);
})

View File

@@ -0,0 +1,9 @@
import RefreshRuntime from 'http://localhost:5173/@react-refresh'
if (RefreshRuntime) {
RefreshRuntime.injectIntoGlobalHook(window)
window.$RefreshReg$ = () => {
}
window.$RefreshSig$ = () => (type) => type
window.__vite_plugin_react_preamble_installed__ = true
}