Spaces:
Sleeping
Sleeping
Upload main.js
Browse files
main.js
CHANGED
|
@@ -1820,7 +1820,6 @@ if (toggleBusinessFormButton && businessForm && businessFeedback) {
|
|
| 1820 |
toggleBusinessFormButton.addEventListener("click", () => {
|
| 1821 |
const isVisible = !businessForm.classList.contains("hidden");
|
| 1822 |
if (!isVisible) {
|
| 1823 |
-
fillBusinessForm(currentBusiness);
|
| 1824 |
setBusinessFormVisibility(true, { preserveFeedback: true });
|
| 1825 |
} else {
|
| 1826 |
setBusinessFormVisibility(false);
|
|
@@ -1851,10 +1850,8 @@ if (businessForm && businessFeedback) {
|
|
| 1851 |
};
|
| 1852 |
|
| 1853 |
try {
|
| 1854 |
-
|
| 1855 |
-
|
| 1856 |
-
renderBusinessDisplay(currentBusiness);
|
| 1857 |
-
fillBusinessForm(currentBusiness);
|
| 1858 |
setBusinessFormVisibility(false, { preserveFeedback: true });
|
| 1859 |
showFeedback(businessFeedback, "Dane sprzedawcy zaktualizowane.", "success");
|
| 1860 |
setTimeout(() => clearFeedback(businessFeedback), 2000);
|
|
|
|
| 1820 |
toggleBusinessFormButton.addEventListener("click", () => {
|
| 1821 |
const isVisible = !businessForm.classList.contains("hidden");
|
| 1822 |
if (!isVisible) {
|
|
|
|
| 1823 |
setBusinessFormVisibility(true, { preserveFeedback: true });
|
| 1824 |
} else {
|
| 1825 |
setBusinessFormVisibility(false);
|
|
|
|
| 1850 |
};
|
| 1851 |
|
| 1852 |
try {
|
| 1853 |
+
await apiRequest("/api/business", { method: "POST", body: payload }, true);
|
| 1854 |
+
await loadBusinessData();
|
|
|
|
|
|
|
| 1855 |
setBusinessFormVisibility(false, { preserveFeedback: true });
|
| 1856 |
showFeedback(businessFeedback, "Dane sprzedawcy zaktualizowane.", "success");
|
| 1857 |
setTimeout(() => clearFeedback(businessFeedback), 2000);
|