Task 10121 | fix: поправили прайсы цен для карт, которые некорректно выводятся при заполнении из админки

This commit is contained in:
Боевой сайт - fakel committed 2025-11-21 21:11:51 +03:00
1 parent 21562852ca
commit 2ac2340779
57 files changed
+7935 -14019

No files matched your search

+1 -290
View File
@@ -1,290 +1 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./resources/css/app.css":
/*!*******************************!*\
!*** ./resources/css/app.css ***!
\*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./resources/css/editor-style.css":
/*!****************************************!*\
!*** ./resources/css/editor-style.css ***!
\****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "./resources/js/app.js":
/*!*****************************!*\
!*** ./resources/js/app.js ***!
\*****************************/
/***/ (() => {
/*
document.addEventListener('DOMContentLoaded', function() {
const header = document.getElementById('site-header');
const main = document.getElementById('main-content');
function updateMainPadding() {
const headerHeight = header.offsetHeight;
main.style.paddingTop = headerHeight + 'px';
// Показываем контент с плавной анимацией
main.classList.remove('opacity-0');
}
updateMainPadding();
window.addEventListener('resize', updateMainPadding);
});*/
// Используем делегирование событий для динамически загружаемых форм
document.addEventListener('DOMContentLoaded', function () {
// Делегирование для focus события
document.addEventListener('focus', function (e) {
if (e.target.matches('#fluentform_4 .ff-el-form-control')) {
var group = e.target.closest('.ff-el-group');
if (group) group.classList.add('focused');
}
}, true); // используем capture phase
// Делегирование для blur события
document.addEventListener('blur', function (e) {
if (e.target.matches('#fluentform_4 .ff-el-form-control')) {
var group = e.target.closest('.ff-el-group');
if (group) group.classList.remove('focused');
}
}, true);
// Делегирование для input события
document.addEventListener('input', function (e) {
// Обычные поля формы
if (e.target.matches('#fluentform_4 .ff-el-form-control')) {
var group = e.target.closest('.ff-el-group');
if (group) {
if (e.target.value.trim() !== '') {
group.classList.add('has-value');
} else {
group.classList.remove('has-value');
}
}
}
// Форматирование телефона
if (e.target.matches('#fluentform_4 .ff-el-phone')) {
formatPhoneNumber(e);
}
});
// Делегирование для keydown события (для телефона)
document.addEventListener('keydown', function (e) {
if (e.target.matches('#fluentform_4 .ff-el-phone')) {
handlePhoneKeydown(e);
}
});
// Функция форматирования телефона
function formatPhoneNumber(e) {
var value = e.target.value.replace(/\D/g, '');
// Заменяем 8 на 7
if (value.startsWith('8')) {
value = '7' + value.slice(1);
}
// Добавляем 7 если нет
if (!value.startsWith('7') && value.length > 0) {
value = '7' + value;
}
var formattedValue = '';
if (value.length > 0) {
formattedValue = '+7';
if (value.length > 1) {
formattedValue += ' (' + value.slice(1, 4);
if (value.length > 4) {
formattedValue += ') ' + value.slice(4, 7);
if (value.length > 7) {
formattedValue += '-' + value.slice(7, 9);
if (value.length > 9) {
formattedValue += '-' + value.slice(9, 11);
}
}
}
}
}
e.target.value = formattedValue;
}
// Функция обработки клавиш для телефона
function handlePhoneKeydown(e) {
if (e.key === 'Backspace' || e.key === 'Delete') {
var cursorPos = e.target.selectionStart;
var value = e.target.value;
if (cursorPos > 0 && [' ', '(', ')', '-'].includes(value[cursorPos - 1])) {
setTimeout(function () {
e.target.setSelectionRange(cursorPos - 1, cursorPos - 1);
}, 0);
}
}
}
});
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "/js/app": 0,
/******/ "css/editor-style": 0,
/******/ "css/app": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunktailpress"] = self["webpackChunktailpress"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, ["css/editor-style","css/app"], () => (__webpack_require__("./resources/js/app.js")))
/******/ __webpack_require__.O(undefined, ["css/editor-style","css/app"], () => (__webpack_require__("./resources/css/app.css")))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["css/editor-style","css/app"], () => (__webpack_require__("./resources/css/editor-style.css")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
(()=>{var e,t={547:()=>{},566:()=>{},988:()=>{document.addEventListener("DOMContentLoaded",(function(){function e(){var e=document.querySelectorAll("[data-scroll-section]"),t=window.scrollY+100;e.forEach((function(s){var n=s.offsetTop,o=n+s.offsetHeight;t>=n&&t<o&&(e.forEach((function(e){return e.classList.remove("scroll-current")})),s.classList.add("scroll-current"))}))}var t;document.querySelectorAll("[data-scroll-to]").forEach((function(e){e.addEventListener("click",(function(){var e=this.getAttribute("data-scroll-to");if(e){var t=document.querySelector('[data-scroll-section="'.concat(e,'"]'));if(t){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=t.offset,n=void 0===s?80:s,o=t.behavior,r=void 0===o?"smooth":o;if(t.block,e){var i=e.offsetTop,a=Math.max(0,i-n);window.scrollTo({top:a,behavior:r})}}(t,{offset:80,behavior:"smooth"}),document.querySelectorAll("[data-scroll-section]").forEach((function(e){e.classList.remove("scroll-active")})),t.classList.add("scroll-active")}else console.warn('Секция с data-scroll-section="'.concat(e,'" не найдена'))}}))})),window.addEventListener("scroll",(function(){clearTimeout(t),t=setTimeout(e,100)}))})),document.addEventListener("DOMContentLoaded",(function(){document.addEventListener("focus",(function(e){if(e.target.matches("#fluentform_4 .ff-el-form-control")){var t=e.target.closest(".ff-el-group");t&&t.classList.add("focused")}}),!0),document.addEventListener("blur",(function(e){if(e.target.matches("#fluentform_4 .ff-el-form-control")){var t=e.target.closest(".ff-el-group");t&&t.classList.remove("focused")}}),!0),document.addEventListener("input",(function(e){if(e.target.matches("#fluentform_4 .ff-el-form-control")){var t=e.target.closest(".ff-el-group");t&&(""!==e.target.value.trim()?t.classList.add("has-value"):t.classList.remove("has-value"))}e.target.matches("#fluentform_4 .ff-el-phone")&&function(e){var t=e.target.value.replace(/\D/g,"");t.startsWith("8")&&(t="7"+t.slice(1));!t.startsWith("7")&&t.length>0&&(t="7"+t);var s="";t.length>0&&(s="+7",t.length>1&&(s+=" ("+t.slice(1,4),t.length>4&&(s+=") "+t.slice(4,7),t.length>7&&(s+="-"+t.slice(7,9),t.length>9&&(s+="-"+t.slice(9,11))))));e.target.value=s}(e)})),document.addEventListener("keydown",(function(e){e.target.matches("#fluentform_4 .ff-el-phone")&&function(e){if("Backspace"===e.key||"Delete"===e.key){var t=e.target.selectionStart,s=e.target.value;t>0&&[" ","(",")","-"].includes(s[t-1])&&setTimeout((function(){e.target.setSelectionRange(t-1,t-1)}),0)}}(e)}))})),document.addEventListener("DOMContentLoaded",(function(){var e={burger:null,overlay:null,container:null,isOpen:!1,init:function(){this.burger=document.getElementById("burger"),this.overlay=document.getElementById("menu-overlay"),this.container=document.getElementById("menu-container"),this.burger&&this.overlay&&this.container&&this.bindEvents()},bindEvents:function(){var e=this;this.burger.addEventListener("click",(function(){e.isOpen?e.close():e.open()})),this.overlay.addEventListener("click",(function(t){t.target===e.overlay&&e.close()})),document.addEventListener("keydown",(function(t){"Escape"===t.key&&e.isOpen&&e.close()}))},open:function(){this.isOpen||(this.isOpen=!0,this.animateBurger(!0),this.showMenu())},close:function(){this.isOpen&&(this.isOpen=!1,this.animateBurger(!1),this.hideMenu())},animateBurger:function(e){var t=this.burger.querySelector(".line-1"),s=this.burger.querySelector(".line-2"),n=this.burger.querySelector(".line-3");e?(t.classList.remove("-translate-y-[6px]"),t.classList.add("rotate-[45deg]"),s.classList.add("opacity-[0]"),n.classList.remove("translate-y-[6px]"),n.classList.add("-rotate-[45deg]")):(t.classList.add("-translate-y-[6px]"),t.classList.remove("rotate-[45deg]"),s.classList.remove("opacity-[0]"),n.classList.add("translate-y-[6px]"),n.classList.remove("-rotate-[45deg]"))},showMenu:function(){document.body.style.overflow="hidden",this.overlay.classList.remove("opacity-[0]","invisible"),this.overlay.classList.add("opacity-[1]","visible"),this.container.classList.remove("translate-x-full"),this.container.classList.add("translate-x-[0]")},hideMenu:function(){document.body.style.overflow="",this.container.classList.remove("translate-x-[0]"),this.container.classList.add("translate-x-full"),this.overlay.classList.remove("opacity-[1]","visible"),this.overlay.classList.add("opacity-[0]","invisible")}};e.init(),window.MenuSystem=e}))}},s={};function n(e){var o=s[e];if(void 0!==o)return o.exports;var r=s[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.m=t,e=[],n.O=(t,s,o,r)=>{if(!s){var i=1/0;for(d=0;d<e.length;d++){for(var[s,o,r]=e[d],a=!0,l=0;l<s.length;l++)(!1&r||i>=r)&&Object.keys(n.O).every((e=>n.O[e](s[l])))?s.splice(l--,1):(a=!1,r<i&&(i=r));if(a){e.splice(d--,1);var c=o();void 0!==c&&(t=c)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[s,o,r]},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={847:0,992:0,252:0};n.O.j=t=>0===Line truncated