{"id":206,"date":"2026-03-31T11:36:36","date_gmt":"2026-03-31T11:36:36","guid":{"rendered":"https:\/\/ph-taskportal.zyneventures.com\/?page_id=206"},"modified":"2026-07-09T09:16:43","modified_gmt":"2026-07-09T09:16:43","slug":"error-log","status":"publish","type":"page","link":"https:\/\/ph-portal-v2.zyneventures.com\/index.php\/error-log\/","title":{"rendered":"Error Log"},"content":{"rendered":"<style>.kadence-column206_a1be33-b1 > .kt-inside-inner-col,.kadence-column206_a1be33-b1 > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-column206_a1be33-b1 > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-column206_a1be33-b1 > .kt-inside-inner-col{flex-direction:column;}.kadence-column206_a1be33-b1 > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-column206_a1be33-b1 > .kt-inside-inner-col:before{opacity:0.3;}.kadence-column206_a1be33-b1{position:relative;}@media all and (max-width: 1024px){.kadence-column206_a1be33-b1 > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-column206_a1be33-b1 > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column kadence-column206_a1be33-b1\"><div class=\"kt-inside-inner-col\"><style>.kb-row-layout-id206_a804af-3f > .kt-row-column-wrap{align-content:start;}:where(.kb-row-layout-id206_a804af-3f > .kt-row-column-wrap) > .wp-block-kadence-column{justify-content:start;}.kb-row-layout-id206_a804af-3f > .kt-row-column-wrap{column-gap:var(--global-kb-gap-md, 2rem);row-gap:var(--global-kb-gap-md, 2rem);padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;grid-template-columns:minmax(0, 1fr);}.kb-row-layout-id206_a804af-3f > .kt-row-layout-overlay{opacity:0.30;}@media all and (max-width: 1024px){.kb-row-layout-id206_a804af-3f > .kt-row-column-wrap{grid-template-columns:minmax(0, 1fr);}}@media all and (max-width: 767px){.kb-row-layout-id206_a804af-3f > .kt-row-column-wrap{grid-template-columns:minmax(0, 1fr);}}<\/style><div class=\"kb-row-layout-wrap kb-row-layout-id206_a804af-3f alignnone wp-block-kadence-rowlayout\"><div class=\"kt-row-column-wrap kt-has-1-columns kt-row-layout-equal kt-tab-layout-inherit kt-mobile-layout-row kt-row-valign-top\">\n<style>.kadence-column206_97bcbd-89 > .kt-inside-inner-col,.kadence-column206_97bcbd-89 > .kt-inside-inner-col:before{border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;}.kadence-column206_97bcbd-89 > .kt-inside-inner-col{column-gap:var(--global-kb-gap-sm, 1rem);}.kadence-column206_97bcbd-89 > .kt-inside-inner-col{flex-direction:column;}.kadence-column206_97bcbd-89 > .kt-inside-inner-col > .aligncenter{width:100%;}.kadence-column206_97bcbd-89 > .kt-inside-inner-col:before{opacity:0.3;}.kadence-column206_97bcbd-89{position:relative;}@media all and (max-width: 1024px){.kadence-column206_97bcbd-89 > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}@media all and (max-width: 767px){.kadence-column206_97bcbd-89 > .kt-inside-inner-col{flex-direction:column;justify-content:center;}}<\/style>\n<div class=\"wp-block-kadence-column kadence-column206_97bcbd-89\"><div class=\"kt-inside-inner-col\">\n<style>\n    :root {\n        --primary-blue: #0180FF;\n        --hover-blue: #3499FF;\n        --text-dark: #212529;\n        --text-muted: #8D8C9C;\n        --border-color: #EFEFEF;\n        --success-green: #1E8E3E;\n        --error-red: #D93025;\n    }\n\n    body {\n        margin: 0;\n        font-family: 'Sora', sans-serif;\n        color: var(--text-dark);\n        line-height: 1.5;\n    }\n\n    @media (max-width: 768px) {\n        body {\n            padding-left: 15px;\n        }\n    }\n\n    \/* Header & Counters *\/\n    .header-container {\n        display: flex;\n        justify-content: space-between;\n        align-items: center;\n        margin-bottom: 25px;\n    }\n\n    .title-group {\n        display: flex;\n        align-items: center;\n        gap: 10px;\n    }\n\n    .title-group h2 {\n        margin: 0;\n        font-size: 21px;\n        font-weight: 500;\n        text-transform: uppercase;\n    }\n\n    .count {\n        color: var(--text-muted);\n        font-size: 16px;\n    }\n\n    \/* Filter Grid *\/\n    .filter-section {\n        display: flex;\n        flex-direction: column;\n        gap: 20px;\n        margin-bottom: 25px;\n    }\n\n    .filter-row {\n        display: grid;\n        grid-template-columns: repeat(4, minmax(0, 1fr));\n        gap: 20px;\n        width: 100%;\n    }\n\n    @media (max-width: 1024px) {\n        .filter-row {\n            grid-template-columns: repeat(2, minmax(0, 1fr));\n        }\n    }\n\n    @media (max-width: 600px) {\n        .filter-row {\n            grid-template-columns: minmax(0, 1fr);\n        }\n    }\n\n    .filter-group {\n        font-size: 12px;\n        color: #212529;\n        display: flex;\n        flex-direction: column;\n    }\n\n    .filter-group label {\n        display: block;\n        margin-bottom: 5px;\n        font-weight: 400;\n    }\n\n    .filter-group input:not([type=\"hidden\"]),\n    .filter-group select {\n        width: 100%;\n        padding: 10px;\n        border: 1px solid #E0E0E0;\n        border-radius: 6px;\n        font-family: 'Sora';\n        font-size: 12px;\n        color: #8D8C9C;\n        font-weight: 400;\n        box-sizing: border-box;\n        outline: none;\n    }\n\n    .filter-group input:not([type=\"hidden\"]):focus,\n    .filter-group select:focus {\n        outline: none;\n        box-shadow: none;\n    }\n\n    \/* Custom Select Dropdown *\/\n    .custom-select-wrapper {\n        position: relative;\n        width: 100%;\n    }\n\n    .custom-select-trigger {\n        height: 38px;               \/* fixed \u2014 must not expand when chips added *\/\n        max-height: 38px;\n        padding: 0 36px 0 12px;\n        border: 1px solid #E0E0E0;\n        background-color: #fff;\n        border-radius: 6px;\n        font-family: 'Sora', sans-serif;\n        font-size: 12px;\n        color: var(--text-dark);\n        cursor: pointer;\n        display: flex;\n        align-items: center;\n        box-sizing: border-box;\n        width: 100%;\n        user-select: none;\n        position: relative;\n        transition: border-color 0.2s;\n        overflow: hidden;           \/* clip anything that would expand the field *\/\n    }\n\n    .custom-select-trigger:hover {\n        border-color: var(--primary-blue);\n    }\n\n    .custom-select-wrapper.open .custom-select-trigger {\n        border-color: var(--primary-blue);\n        border-radius: 6px 6px 0 0;\n        box-shadow: 0 0 0 3px rgba(1, 128, 255, 0.1);\n    }\n\n    .custom-select-trigger.placeholder-shown {\n        color: #8D8C9C;\n    }\n\n    .custom-select-trigger .cs-arrow {\n        position: absolute;\n        right: 10px;\n        top: 50%;\n        transform: translateY(-50%);\n        pointer-events: none;\n        color: #8D8C9C;\n        transition: transform 0.2s;\n        flex-shrink: 0;\n    }\n\n    .custom-select-wrapper.open .custom-select-trigger .cs-arrow {\n        transform: translateY(-50%) rotate(180deg);\n    }\n\n    .custom-select-dropdown {\n        display: none;\n        position: absolute;\n        top: 100%;\n        left: 0;\n        right: 0;\n        background: #fff;\n        border: 1px solid var(--primary-blue);\n        border-top: none;\n        border-radius: 0 0 6px 6px;\n        z-index: 9999;\n        overflow-y: auto;\n        max-height: 250px;\n        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);\n    }\n\n    .custom-select-option.cs-highlighted {\n        background: #f0f6ff;\n        color: var(--primary-blue);\n    }\n\n    \/*\n     * Horizontal scroll inside locked 38px field.\n     * Chips (22px) + thin scrollbar (6px) + gap = ~30px, all within the\n     * 38px trigger so the field height never changes.\n     *\/\n    .cs-label {\n        display: flex;\n        flex-wrap: nowrap;\n        align-items: center;\n        align-self: stretch;\n        gap: 6px;\n        overflow-x: auto;           \/* mandatory horizontal scroll on overflow *\/\n        overflow-y: hidden;\n        white-space: nowrap;\n        flex: 1;\n        min-width: 0;\n        scrollbar-width: thin;      \/* Firefox: thin scrollbar *\/\n        scrollbar-color: #ced4da #f0f0f0;\n        -ms-overflow-style: auto;\n        padding-bottom: 2px;        \/* extra space for scrollbar *\/\n    }\n\n    .cs-label::-webkit-scrollbar {\n        display: block;\n        height: 6px;                \/* thin scrollbar fits inside 38px field *\/\n    }\n\n    .cs-label::-webkit-scrollbar-track {\n        background: #f0f0f0;\n        border-radius: 3px;\n    }\n\n    .cs-label::-webkit-scrollbar-thumb {\n        background: #ced4da;\n        border-radius: 3px;\n    }\n\n    .cs-label::-webkit-scrollbar-thumb:hover {\n        background: #adb5bd;\n    }\n\n    .custom-select-wrapper.open .custom-select-dropdown {\n        display: block;\n    }\n\n    \/* Chips\/Badges styling *\/\n\n    .cs-chip {\n        display: inline-flex;\n        align-items: center;\n        background-color: #e8f0fe;\n        border: 1px solid #d2e3fc;\n        border-radius: 4px;\n        padding: 0 8px;\n        font-size: 12px;\n        color: #1967d2;\n        gap: 4px;\n        white-space: nowrap;\n        flex-shrink: 0;\n        height: 22px;               \/* fits with 6px scrollbar inside locked 38px field *\/\n        margin: 0;\n    }\n\n    .cs-chip-remove {\n        cursor: pointer;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        width: 14px;\n        height: 14px;\n        border-radius: 50%;\n        color: #5f6368;\n        font-weight: bold;\n        transition: background 0.2s;\n    }\n\n    .cs-chip-remove:hover {\n        background: #dadce0;\n        color: #202124;\n    }\n\n    .custom-select-option {\n        padding: 8px 12px;\n        font-size: 12px;\n        font-family: 'Sora', sans-serif;\n        color: var(--text-dark);\n        cursor: pointer;\n        white-space: nowrap;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        line-height: 1.4;\n        display: flex;\n        align-items: center;\n        gap: 10px;\n    }\n\n    .custom-select-option:hover {\n        background: #f0f6ff;\n        color: var(--primary-blue);\n    }\n\n    .custom-select-option.selected {\n        background: #e8f1ff;\n        color: var(--primary-blue);\n        font-weight: 500;\n    }\n\n    .custom-select-option .cs-checkbox {\n        width: 16px;\n        height: 16px;\n        border: 1px solid #ced4da;\n        border-radius: 3px;\n        background: #fff;\n        position: relative;\n        flex-shrink: 0;\n        display: none;\n    }\n\n    .custom-select-wrapper.multi .custom-select-option .cs-checkbox {\n        display: block;\n    }\n\n    .custom-select-option.selected .cs-checkbox {\n        background: var(--primary-blue);\n        border-color: var(--primary-blue);\n    }\n\n    .custom-select-option.selected .cs-checkbox::after {\n        content: '';\n        position: absolute;\n        left: 5px;\n        top: 2px;\n        width: 4px;\n        height: 8px;\n        border: solid white;\n        border-width: 0 2px 2px 0;\n        transform: rotate(45deg);\n    }\n\n    .custom-select-option.placeholder-option {\n        color: #999;\n    }\n\n    .custom-select-search {\n        display: none;\n    }\n\n    \/* cs-search-input: the integrated search input inside the trigger *\/\n    .cs-search-input {\n        border: none !important;\n        outline: none !important;\n        box-shadow: none !important;\n        background: transparent !important;\n        font-family: 'Sora', sans-serif;\n        font-size: 12px;\n        color: var(--text-dark);\n        width: 100%;\n        min-width: 60px;\n        flex: 1;\n        padding: 0;\n        margin: 0;\n        caret-color: var(--primary-blue);\n    }\n\n    .cs-search-input::placeholder {\n        color: #8D8C9C;\n        font-family: 'Sora', sans-serif;\n        font-size: 12px;\n    }\n\n    .filter-actions {\n        display: flex;\n        justify-content: flex-start;\n        gap: 10px;\n        margin-top: 10px;\n    }\n\n    .btn {\n        padding: 8px 25px;\n        border-radius: 6px;\n        font-size: 12px;\n        font-weight: 400;\n        cursor: pointer;\n        border: none;\n        transition: 0.2s;\n    }\n\n    .btn-clear {\n        background: #D9DDEF;\n        color: var(--text-dark);\n    }\n\n    .btn-download {\n        background: var(--primary-blue);\n        color: white;\n    }\n\n    .btn-filter {\n        background: var(--primary-blue);\n        color: white;\n    }\n\n    \/* Table Styling *\/\n    .table-wrapper {\n        margin-top: 30px;\n        overflow-x: auto;\n        border: 1px solid var(--border-color);\n        border-radius: 6px;\n    }\n\n    table {\n        width: 100%;\n        border-collapse: collapse;\n        font-size: 12px;\n        text-align: left;\n        min-width: 1200px;\n    }\n\n    th {\n        background: #f5f5f5;\n        color: #212529;\n        font-weight: 500;\n        padding: 12px 10px;\n        border-bottom: 1px solid var(--border-color);\n        text-transform: uppercase;\n    }\n\n    td {\n        padding: 12px 10px;\n        border-bottom: 1px solid var(--border-color);\n        font-size: 12px;\n        font-weight: 400;\n        color: var(--text-muted);\n    }\n\n    .btn-reverse {\n        background: var(--primary-blue);\n        color: white;\n        border: none;\n        padding: 6px 12px;\n        border-radius: 4px;\n        cursor: pointer;\n        font-size: 12px;\n        white-space: nowrap;\n    }\n\n    .reverse-applied-text {\n        color: var(--text-muted);\n        font-size: 12px;\n        font-weight: 400;\n    }\n\n    \/* Modal \/ Popup Styling - Optimized for Scroll *\/\n    .modal-overlay {\n        display: none;\n        position: fixed;\n        top: 0;\n        left: 0;\n        width: 100%;\n        height: 100%;\n        background: rgba(0, 0, 0, 0.5);\n        z-index: 1000;\n        justify-content: center;\n        align-items: flex-start;\n        padding: 40px 20px;\n        overflow-y: auto;\n        box-sizing: border-box;\n    }\n\n    .modal-content {\n        background: white;\n        width: 100%;\n        max-width: 450px;\n        padding: 30px;\n        border-radius: 12px;\n        position: relative;\n        margin: auto;\n        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);\n    }\n\n    .modal-content h3 {\n        margin-top: 0;\n        font-size: 21px;\n        margin-bottom: 25px;\n    }\n\n    .modal-form-group {\n        margin-bottom: 15px;\n    }\n\n    .modal-form-group label {\n        display: block;\n        font-size: 12px;\n        font-weight: 500;\n        margin-bottom: 5px;\n    }\n\n    .modal-form-group input {\n        width: 100%;\n        padding: 10px;\n        border: 1px solid #ddd;\n        border-radius: 6px;\n        background: #F1F3F4;\n        box-sizing: border-box;\n        font-family: 'Sora';\n    }\n\n    .modal-form-group input.editable {\n        background: white;\n        border: 1px solid var(--primary-blue);\n    }\n\n    .modal-footer {\n        display: flex;\n        justify-content: flex-end;\n        gap: 10px;\n        margin-top: 25px;\n    }\n\n    \/* Pagination Footer *\/\n    .pagination-footer {\n        margin-top: 30px;\n        display: flex;\n        justify-content: space-between;\n        align-items: center;\n        color: var(--text-muted);\n        font-size: 12px;\n        flex-wrap: wrap;\n        gap: 15px;\n    }\n\n    .pagination-controls {\n        display: flex;\n        align-items: center;\n        gap: 8px;\n    }\n\n    .page-num {\n        cursor: pointer;\n        width: 32px;\n        height: 32px;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        border-radius: 50%;\n        font-weight: 500;\n        transition: 0.2s;\n    }\n\n    .page-num:hover {\n        background: #f0f0f0;\n    }\n\n    .page-num.active {\n        background: var(--primary-blue);\n        color: white;\n    }\n\n    .dots {\n        padding: 0 5px;\n    }\n\n    .nav-btn {\n        cursor: pointer;\n        color: var(--text-dark);\n        font-weight: 500;\n        padding: 5px 10px;\n    }\n\n    .nav-btn.disabled {\n        color: #ccc;\n        pointer-events: none;\n    }\n\n    @media (max-width: 768px) {\n        .pagination-footer {\n            flex-direction: column;\n            align-items: center;\n        }\n\n        #entryInfo {\n            order: -1;\n            width: 100%;\n            text-align: center;\n        }\n    }\n\n    \/* Custom Date Picker *\/\n    .date-wrapper {\n        position: relative;\n    }\n\n    .date-wrapper input[type=\"text\"] {\n        width: 100%;\n        padding: 10px 36px 10px 10px;\n        border: 1px solid #E0E0E0;\n        border-radius: 6px;\n        font-family: 'Sora', sans-serif;\n        font-size: 12px;\n        color: var(--text-dark);\n        outline: none;\n        cursor: pointer;\n        background: #fff;\n        transition: border-color 0.2s;\n        user-select: none;\n        height: 38px;\n        box-sizing: border-box;\n    }\n\n    .date-wrapper input[type=\"text\"]:focus {\n        border-color: var(--primary-blue);\n    }\n\n    .date-wrapper input[type=\"text\"]::placeholder {\n        color: #8D8C9C;\n    }\n\n    .date-wrapper .cal-icon {\n        position: absolute;\n        right: 12px;\n        top: 50%;\n        transform: translateY(-50%);\n        pointer-events: none;\n        color: #8D8C9C;\n    }\n\n    \/* Custom Date Picker Dropdown *\/\n    .dp-dropdown {\n        display: none;\n        position: absolute;\n        top: calc(100% + 6px);\n        left: 0;\n        z-index: 2000;\n        background: #fff;\n        border: 1px solid #E0E0E0;\n        border-radius: 10px;\n        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);\n        flex-direction: row;\n        width: 680px;\n        max-width: calc(100vw - 24px);\n        overflow: hidden;\n    }\n\n    .dp-dropdown.open {\n        display: flex;\n    }\n\n    .dp-dropdown.align-right {\n        left: auto;\n        right: 0;\n    }\n\n    .dp-backdrop {\n        display: none;\n        position: fixed;\n        inset: 0;\n        z-index: 1999;\n    }\n\n    .dp-backdrop.show {\n        display: block;\n    }\n\n    .dp-presets {\n        width: 100px;\n        background: #fff;\n        border-right: 1px solid #EFEFEF;\n        padding: 3px 0;\n        flex-shrink: 0;\n    }\n\n    .dp-preset-item {\n        padding: 8px 12px;\n        font-size: 12px;\n        color: var(--text-dark);\n        cursor: pointer;\n        transition: background 0.15s, color 0.15s;\n        white-space: nowrap;\n    }\n\n    .dp-preset-item:hover {\n        background: #f4f6fb;\n    }\n\n    .dp-preset-item.active {\n        background: var(--primary-blue);\n        color: #fff;\n        font-weight: 500;\n    }\n\n    .dp-calendars-wrap {\n        flex: 1;\n        display: flex;\n        flex-direction: column;\n        padding: 8px 10px 8px;\n        min-width: 0;\n    }\n\n    .dp-months-row {\n        display: flex;\n        gap: 0;\n        flex: 1;\n    }\n\n    .dp-calendar {\n        flex: 1;\n        padding: 0 6px;\n        min-width: 0;\n    }\n\n    .dp-calendar+.dp-calendar {\n        border-left: 1px solid #EFEFEF;\n    }\n\n    .dp-cal-header {\n        display: flex;\n        justify-content: space-between;\n        align-items: center;\n        margin-bottom: 6px;\n    }\n\n    .dp-cal-title {\n        font-size: 13px;\n        font-weight: 500;\n        color: var(--text-dark);\n    }\n\n    .dp-nav-btn {\n        background: none;\n        border: none;\n        cursor: pointer;\n        color: #8D8C9C;\n        padding: 3px 7px;\n        border-radius: 4px;\n        font-size: 16px;\n        line-height: 1;\n        transition: background 0.15s, color 0.15s;\n    }\n\n    .dp-nav-btn:hover {\n        background: #f0f4ff;\n        color: var(--primary-blue);\n    }\n\n    .dp-nav-btn.dp-nav-hidden {\n        visibility: hidden;\n        pointer-events: none;\n    }\n\n    .dp-weekdays {\n        display: grid;\n        grid-template-columns: repeat(7, 1fr);\n        margin-bottom: 2px;\n    }\n\n    .dp-weekday {\n        text-align: center;\n        font-size: 11px;\n        font-weight: 500;\n        color: #8D8C9C;\n        padding: 2px 0;\n    }\n\n    .dp-days {\n        display: grid;\n        grid-template-columns: repeat(7, 1fr);\n        gap: 1px;\n    }\n\n    .dp-day {\n        text-align: center;\n        padding: 2px 0;\n        font-size: 11px;\n        border-radius: 50%;\n        cursor: pointer;\n        color: var(--text-dark);\n        transition: background 0.15s, color 0.15s;\n        aspect-ratio: 1;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n    }\n\n    .dp-day:hover {\n        background: #e8f1ff;\n        color: var(--primary-blue);\n    }\n\n    .dp-day.today {\n        font-weight: 700;\n        color: var(--primary-blue);\n    }\n\n    .dp-day.selected {\n        background: var(--primary-blue) !important;\n        color: #fff !important;\n        font-weight: 600;\n        border-radius: 4px !important;\n        z-index: 2;\n    }\n\n    .dp-day.in-range,\n    .dp-day.hover-range {\n        background: #E8F0FE !important;\n        color: #3c4043;\n        border-radius: 0;\n    }\n\n    .dp-day.selected-start,\n    .dp-day.row-start,\n    .dp-day.hover-start {\n        border-top-left-radius: 4px !important;\n        border-bottom-left-radius: 4px !important;\n    }\n\n    .dp-day.selected-end,\n    .dp-day.row-end,\n    .dp-day.hover-end {\n        border-top-right-radius: 4px !important;\n        border-bottom-right-radius: 4px !important;\n    }\n\n    .dp-day.selected-start.selected-end {\n        border-radius: 4px !important;\n    }\n\n    .dp-day.other-month {\n        color: #ccc;\n    }\n\n    .dp-day.other-month:hover {\n        background: #f5f5f5;\n        color: #aaa;\n    }\n\n    .dp-footer {\n        display: flex;\n        justify-content: space-between;\n        align-items: center;\n        gap: 12px;\n        margin-top: 10px;\n        padding: 12px 16px;\n        border-top: 1px solid #EFEFEF;\n    }\n\n    .dp-range-display {\n        font-size: 12px;\n        color: #333;\n        font-weight: 500;\n    }\n\n    .dp-btn-clear {\n        padding: 6px 14px;\n        border-radius: 6px;\n        font-size: 12px;\n        font-family: 'Sora', sans-serif;\n        background: #F1F3F4;\n        color: #555;\n        border: none;\n        cursor: pointer;\n        font-weight: 400;\n    }\n\n    .dp-btn-clear:hover {\n        background: #e2e4e7;\n    }\n\n    .dp-btn-apply {\n        padding: 6px 14px;\n        border-radius: 6px;\n        font-size: 12px;\n        font-family: 'Sora', sans-serif;\n        background: var(--primary-blue);\n        color: #fff;\n        border: none;\n        cursor: pointer;\n        font-weight: 400;\n    }\n\n    .dp-btn-apply:hover {\n        background: var(--hover-blue);\n    }\n\n    @media (max-width: 750px) {\n        .dp-dropdown {\n            flex-direction: column;\n            min-width: 0;\n            width: calc(100vw - 32px);\n            left: 50%;\n            transform: translateX(-50%);\n            max-height: 85vh;\n            overflow-y: auto;\n        }\n\n        .dp-presets {\n            width: 100%;\n            border-right: none;\n            border-bottom: 1px solid #EFEFEF;\n            padding: 4px 0;\n            display: flex;\n            flex-wrap: wrap;\n        }\n\n        .dp-preset-item {\n            padding: 6px 10px;\n            font-size: 11px;\n            flex: 1 1 auto;\n            text-align: center;\n            min-width: 80px;\n        }\n\n        .dp-months-row {\n            flex-direction: column;\n            gap: 10px;\n        }\n\n        .dp-calendar+.dp-calendar {\n            border-left: none;\n            border-top: 1px solid #EFEFEF;\n            padding-top: 8px;\n        }\n\n        .dp-calendars-wrap {\n            padding: 6px 8px 8px;\n        }\n\n        .dp-cal-header {\n            margin-bottom: 6px;\n        }\n\n        .dp-day {\n            padding: 5px 0;\n            font-size: 11px;\n        }\n\n        .dp-footer {\n            margin-top: 8px;\n            padding-top: 8px;\n        }\n    }\n\n    @media (max-width: 480px) {\n        .dp-dropdown {\n            position: fixed;\n            top: 50%;\n            left: 50% !important;\n            transform: translate(-50%, -50%) !important;\n            width: calc(100vw - 24px);\n            max-width: 400px;\n            max-height: 92vh;\n            overflow-y: auto;\n            z-index: 3000;\n        }\n\n        .dp-calendars-wrap {\n            padding: 6px 6px 6px;\n        }\n\n        .dp-day {\n            font-size: 11px;\n            padding: 4px 0;\n        }\n\n        .dp-cal-title {\n            font-size: 12px;\n        }\n\n        .dp-footer {\n            margin-top: 6px;\n            padding-top: 6px;\n        }\n\n        .dp-btn-clear,\n        .dp-btn-apply {\n            padding: 5px 10px;\n            font-size: 11px;\n        }\n    }\n<\/style>\n\n\n<div class=\"header-container\">\n    <div class=\"title-group\">\n        <h2>List View All Error<\/h2>\n        <span class=\"count\" id=\"totalCount\">(0)<\/span>\n    <\/div>\n<\/div>\n\n<div class=\"filter-section\">\n    <div class=\"filter-row\" id=\"filterRow\">\n        <!-- Row 1: Assigned to, File Name, Account, Entity -->\n        <div class=\"filter-group\" id=\"slot_filterAssigned\">\n            <label>Assigned to<\/label>\n            <div class=\"custom-select-wrapper multi\" id=\"csWrapper_filterAssigned\">\n                <input type=\"hidden\" id=\"filterAssigned\" value=\"\">\n                <div class=\"custom-select-trigger placeholder-shown\" id=\"csTrigger_filterAssigned\" onclick=\"csToggle('filterAssigned', event)\">\n                    <div class=\"cs-label\">\n                        <input type=\"text\" class=\"cs-search-input\" id=\"csSearch_filterAssigned\" placeholder=\"\" autocomplete=\"off\" oninput=\"csFilterIntegrated('filterAssigned', this.value)\" onclick=\"csHandleInputClick('filterAssigned', event)\" onkeydown=\"csHandleKeydown('filterAssigned', event)\">\n                    <\/div>\n                    <svg class=\"cs-arrow\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><polyline points=\"6 9 12 15 18 9\"><\/polyline><\/svg>\n                <\/div>\n                <div class=\"custom-select-dropdown\" id=\"csDrop_filterAssigned\">\n                    <div class=\"custom-select-options\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"filter-group\" id=\"slot_filterFile\">\n            <label>File Name<\/label>\n            <div class=\"custom-select-wrapper multi\" id=\"csWrapper_filterFile\">\n                <input type=\"hidden\" id=\"filterFile\" value=\"\">\n                <div class=\"custom-select-trigger placeholder-shown\" id=\"csTrigger_filterFile\" onclick=\"csToggle('filterFile', event)\">\n                    <div class=\"cs-label\">\n                        <input type=\"text\" class=\"cs-search-input\" id=\"csSearch_filterFile\" placeholder=\"\" autocomplete=\"off\" oninput=\"csFilterIntegrated('filterFile', this.value)\" onclick=\"csHandleInputClick('filterFile', event)\" onkeydown=\"csHandleKeydown('filterFile', event)\">\n                    <\/div>\n                    <svg class=\"cs-arrow\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><polyline points=\"6 9 12 15 18 9\"><\/polyline><\/svg>\n                <\/div>\n                <div class=\"custom-select-dropdown\" id=\"csDrop_filterFile\">\n                    <div class=\"custom-select-options\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"filter-group\" id=\"slot_filterAccount\">\n            <label>Account<\/label>\n            <div class=\"custom-select-wrapper multi\" id=\"csWrapper_filterAccount\">\n                <input type=\"hidden\" id=\"filterAccount\" value=\"\">\n                <div class=\"custom-select-trigger placeholder-shown\" id=\"csTrigger_filterAccount\" onclick=\"csToggle('filterAccount', event)\">\n                    <div class=\"cs-label\">\n                        <input type=\"text\" class=\"cs-search-input\" id=\"csSearch_filterAccount\" placeholder=\"\" autocomplete=\"off\" oninput=\"csFilterIntegrated('filterAccount', this.value)\" onclick=\"csHandleInputClick('filterAccount', event)\" onkeydown=\"csHandleKeydown('filterAccount', event)\">\n                    <\/div>\n                    <svg class=\"cs-arrow\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><polyline points=\"6 9 12 15 18 9\"><\/polyline><\/svg>\n                <\/div>\n                <div class=\"custom-select-dropdown\" id=\"csDrop_filterAccount\">\n                    <div class=\"custom-select-options\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"filter-group\" id=\"slot_filterEntity\">\n            <label>Entity<\/label>\n            <div class=\"custom-select-wrapper multi\" id=\"csWrapper_filterEntity\">\n                <input type=\"hidden\" id=\"filterEntity\" value=\"\">\n                <div class=\"custom-select-trigger placeholder-shown\" id=\"csTrigger_filterEntity\" onclick=\"csToggle('filterEntity', event)\">\n                    <div class=\"cs-label\">\n                        <input type=\"text\" class=\"cs-search-input\" id=\"csSearch_filterEntity\" placeholder=\"\" autocomplete=\"off\" oninput=\"csFilterIntegrated('filterEntity', this.value)\" onclick=\"csHandleInputClick('filterEntity', event)\" onkeydown=\"csHandleKeydown('filterEntity', event)\">\n                    <\/div>\n                    <svg class=\"cs-arrow\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><polyline points=\"6 9 12 15 18 9\"><\/polyline><\/svg>\n                <\/div>\n                <div class=\"custom-select-dropdown\" id=\"csDrop_filterEntity\">\n                    <div class=\"custom-select-options\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <!-- Row 2: Category, Date Qc Submitted, Per Page, Type -->\n        <div class=\"filter-group\" id=\"slot_filterCategory\">\n            <label>Category<\/label>\n            <div class=\"custom-select-wrapper multi\" id=\"csWrapper_filterCategory\">\n                <input type=\"hidden\" id=\"filterCategory\" value=\"\">\n                <div class=\"custom-select-trigger placeholder-shown\" id=\"csTrigger_filterCategory\" onclick=\"csToggle('filterCategory', event)\">\n                    <div class=\"cs-label\">\n                        <input type=\"text\" class=\"cs-search-input\" id=\"csSearch_filterCategory\" placeholder=\"\" autocomplete=\"off\" oninput=\"csFilterIntegrated('filterCategory', this.value)\" onclick=\"csHandleInputClick('filterCategory', event)\" onkeydown=\"csHandleKeydown('filterCategory', event)\">\n                    <\/div>\n                    <svg class=\"cs-arrow\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><polyline points=\"6 9 12 15 18 9\"><\/polyline><\/svg>\n                <\/div>\n                <div class=\"custom-select-dropdown\" id=\"csDrop_filterCategory\">\n                    <div class=\"custom-select-options\"><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"filter-group\">\n            <label>Date Qc Submitted<\/label>\n            <div class=\"date-wrapper\" id=\"dpWrapperDate\">\n                <input type=\"text\" id=\"filterDate\" placeholder=\"Select Date Range\" readonly=\"\" onclick=\"toggleDatePicker(event,'errdate')\">\n                <svg class=\"cal-icon\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" viewBox=\"0 0 24 24\">\n                    <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"><\/rect>\n                    <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"><\/line>\n                    <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"><\/line>\n                    <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"><\/line>\n                <\/svg>\n                <div class=\"dp-backdrop\" id=\"dpBackdropErrdate\" onclick=\"closeDatePicker('errdate')\"><\/div>\n                <div class=\"dp-dropdown\" id=\"dpDropdownErrdate\">\n                    <div class=\"dp-presets\">\n                        <div class=\"dp-preset-item active\" data-preset=\"today\" onclick=\"selectPreset(event,'today','errdate')\">Today<\/div>\n                        <div class=\"dp-preset-item\" data-preset=\"yesterday\" onclick=\"selectPreset(event,'yesterday','errdate')\">Yesterday<\/div>\n                        <div class=\"dp-preset-item\" data-preset=\"last7\" onclick=\"selectPreset(event,'last7','errdate')\">\n                            Last 7 Days<\/div>\n                        <div class=\"dp-preset-item\" data-preset=\"last30\" onclick=\"selectPreset(event,'last30','errdate')\">Last 30 Days<\/div>\n                        <div class=\"dp-preset-item\" data-preset=\"thisMonth\" onclick=\"selectPreset(event,'thisMonth','errdate')\">This Month<\/div>\n                        <div class=\"dp-preset-item\" data-preset=\"lastMonth\" onclick=\"selectPreset(event,'lastMonth','errdate')\">Last Month<\/div>\n                    <\/div>\n                    <div class=\"dp-calendars-wrap\">\n                        <div class=\"dp-months-row\">\n                            <div class=\"dp-calendar\">\n                                <div class=\"dp-cal-header\">\n                                    <button class=\"dp-nav-btn\" onclick=\"dpChangeMonth(event,-1,'errdate')\">\u2039<\/button>\n                                    <span class=\"dp-cal-title\" id=\"dpCalTitleErrdate\"><\/span>\n                                    <button class=\"dp-nav-btn dp-nav-hidden\">\u203a<\/button>\n                                <\/div>\n                                <div class=\"dp-weekdays\">\n                                    <div class=\"dp-weekday\">Su<\/div>\n                                    <div class=\"dp-weekday\">Mo<\/div>\n                                    <div class=\"dp-weekday\">Tu<\/div>\n                                    <div class=\"dp-weekday\">We<\/div>\n                                    <div class=\"dp-weekday\">Th<\/div>\n                                    <div class=\"dp-weekday\">Fr<\/div>\n                                    <div class=\"dp-weekday\">Sa<\/div>\n                                <\/div>\n                                <div class=\"dp-days\" id=\"dpDaysErrdate\"><\/div>\n                            <\/div>\n                            <div class=\"dp-calendar\">\n                                <div class=\"dp-cal-header\">\n                                    <button class=\"dp-nav-btn dp-nav-hidden\">\u2039<\/button>\n                                    <span class=\"dp-cal-title\" id=\"dpCalTitleErrdate2\"><\/span>\n                                    <button class=\"dp-nav-btn\" onclick=\"dpChangeMonth(event,1,'errdate')\">\u203a<\/button>\n                                <\/div>\n                                <div class=\"dp-weekdays\">\n                                    <div class=\"dp-weekday\">Su<\/div>\n                                    <div class=\"dp-weekday\">Mo<\/div>\n                                    <div class=\"dp-weekday\">Tu<\/div>\n                                    <div class=\"dp-weekday\">We<\/div>\n                                    <div class=\"dp-weekday\">Th<\/div>\n                                    <div class=\"dp-weekday\">Fr<\/div>\n                                    <div class=\"dp-weekday\">Sa<\/div>\n                                <\/div>\n                                <div class=\"dp-days\" id=\"dpDaysErrdate2\"><\/div>\n                            <\/div>\n                        <\/div>\n                        <div class=\"dp-footer\">\n                            <div class=\"dp-range-display\" id=\"dpRangeDisplayErrdate\">Select Date Range<\/div>\n                            <div class=\"dp-footer-btns\">\n                                <button class=\"dp-btn-clear\" onclick=\"dpClear(event,'errdate')\">Cancel<\/button>\n                                <button class=\"dp-btn-apply\" onclick=\"dpApply(event,'errdate')\">Apply<\/button>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"filter-group\">\n            <label>Per Page<\/label>\n            <select id=\"filterPerPage\" onchange=\"fetchErrors(1)\">\n                <option value=\"\" disabled=\"\" selected=\"\">Per Page<\/option>\n                <option value=\"10\">10<\/option>\n                <option value=\"15\">15<\/option>\n                <option value=\"25\">25<\/option>\n                <option value=\"50\">50<\/option>\n                <option value=\"100\">100<\/option>\n            <\/select>\n        <\/div>\n        <div class=\"filter-group\">\n            <label>Type<\/label>\n            <select id=\"filterType\">\n                <option value=\"\">Select Type<\/option>\n                <option value=\"QC\">QC<\/option>\n                <option value=\"Others\">Others<\/option>\n            <\/select>\n        <\/div>\n    <\/div>\n    <div class=\"filter-actions\">\n        <button class=\"btn btn-clear\" onclick=\"resetFilters()\">Clear<\/button>\n        <button class=\"btn btn-download\" onclick=\"downloadCSV()\">Download CSV<\/button>\n        <button class=\"btn btn-filter\" onclick=\"fetchErrors(1)\">Filter<\/button>\n    <\/div>\n<\/div><br>\n\n<div class=\"table-wrapper\">\n    <table id=\"errorTable\">\n        <thead>\n            <tr>\n                <th>Work Assignment Date<\/th>\n                <th>File Name<\/th>\n                <th>Assigned To<\/th>\n                <th>Account<\/th>\n                <th>Category<\/th>\n                <th>Error Type<\/th>\n                <th>Error Count<\/th>\n                <th>Reversal Count<\/th>\n                <th>Mistake<\/th>\n                <th>Patient Account<\/th>\n                <th>Entity<\/th>\n                <th>DOS \/ (PSD)<\/th>\n                <th>Description<\/th>\n                <th>QC By<\/th>\n                <th>QC Date<\/th>\n                <th>Action<\/th>\n            <\/tr>\n        <\/thead>\n        <tbody id=\"tableBody\"><\/tbody>\n    <\/table>\n<\/div>\n\n<div class=\"pagination-footer\">\n    <div class=\"pagination-controls\">\n        <span id=\"prevBtn\" class=\"nav-btn\">\u00ab Previous<\/span>\n        <div id=\"pageNumbers\" style=\"display:flex; gap:5px; align-items:center;\"><\/div>\n        <span id=\"nextBtn\" class=\"nav-btn\">Next \u00bb<\/span>\n    <\/div>\n    <div id=\"entryInfo\">Showing 0 to 0 of 0 entries<\/div>\n<\/div>\n\n<div class=\"modal-overlay\" id=\"reverseModal\">\n    <div class=\"modal-content\">\n        <h3>Reverse Hit<\/h3>\n        <form id=\"reverseForm\">\n            <div class=\"modal-form-group\">\n                <label>File Name<\/label>\n                <input type=\"text\" id=\"popFile\" readonly=\"\">\n            <\/div>\n            <div class=\"modal-form-group\">\n                <label>Error Minor(Mi)<\/label>\n                <input type=\"text\" id=\"popMinor\" readonly=\"\">\n            <\/div>\n            <div class=\"modal-form-group\">\n                <label>Critical Minor (Cr)<\/label>\n                <input type=\"text\" id=\"popCritical\" readonly=\"\">\n            <\/div>\n            <div class=\"modal-form-group\">\n                <label>Zero Tolerance Error (Zt)<\/label>\n                <input type=\"text\" id=\"popZt\" readonly=\"\">\n            <\/div>\n            <div class=\"modal-form-group\">\n                <label style=\"color:red\">Reverse Error Minor(RMi)*<\/label>\n                <input type=\"number\" id=\"popReverseMinor\" class=\"editable\" placeholder=\"Enter Reverse Error Minor\" required=\"\">\n            <\/div>\n            <div class=\"modal-form-group\">\n                <label style=\"color:red\">Reverse Critical Minor (RCr)*<\/label>\n                <input type=\"number\" id=\"popReverseCritical\" class=\"editable\" placeholder=\"Enter Reverse Critical Minor\" required=\"\">\n            <\/div>\n            <div class=\"modal-form-group\">\n                <label style=\"color:red\">Reverse Zero Tolerance Minor (RZt)*<\/label>\n                <input type=\"number\" id=\"popReverseZt\" class=\"editable\" placeholder=\"Enter Reverse Zero Tolerance Minor\" required=\"\">\n            <\/div>\n            <div class=\"modal-form-group\">\n                <label style=\"color:red\">Remarks*<\/label>\n                <input type=\"text\" id=\"popRemarks\" class=\"editable\" placeholder=\"Enter Remarks\" required=\"\">\n            <\/div>\n            <div class=\"modal-form-group\">\n                <label>Assign To<\/label>\n                <input type=\"text\" id=\"popAssign\" readonly=\"\">\n            <\/div>\n            <div class=\"modal-form-group\">\n                <label>QC By<\/label>\n                <input type=\"text\" id=\"popQc\" readonly=\"\">\n            <\/div>\n            <div class=\"modal-footer\">\n                <button type=\"button\" class=\"btn btn-clear\" onclick=\"closeModal()\">Close<\/button>\n                <button type=\"submit\" class=\"btn btn-filter\" style=\"width: 120px;\">Save<\/button>\n            <\/div>\n        <\/form>\n    <\/div>\n<\/div>\n\n<script>\n    const BASE_URL = 'https:\/\/api-ph-portal.zyneventures.com\/api\/v1';\n    const ENDPOINTS = {\n        ERRORS: `${BASE_URL}\/work_assignment_error\/all`,\n        ERROR_GET: `${BASE_URL}\/work_assignment_error\/get`,\n        ERROR_LOG_EXPORT: `${BASE_URL}\/work_assignment\/error-log-qc-export`,\n        FILES: `${BASE_URL}\/file\/table\/list`,\n        ACCOUNTS: `${BASE_URL}\/accountandbenchmark\/tableList`,\n        ENTITIES: `${BASE_URL}\/entity\/all`,\n        CATEGORIES: `${BASE_URL}\/category\/table\/list`,\n        TEAM_MEMBERS: `${BASE_URL}\/user\/team-members`,\n        REVERSE_ADD: `${BASE_URL}\/work_assignment_error_reverse\/add`\n    };\n\n    let currentPage = 1;\n    let totalPages = 1;\n    let currentItem = null;\n    let currentRowId = null;\n    let allTableData = [];\n\n    \/\/ PHP viewerror.blade.php \u2014 accounts executives cannot see Action column\n    const ACCOUNTS_EXECUTIVE_ROLES = [\n        'accounts executive',\n        'accounts executive - i',\n        'accounts executive - ii',\n        'accounts executive - iii',\n        'senior accounts executive i',\n        'senior accounts executive ii',\n    ];\n\n    function isAccountsExecutiveUser() {\n        const role = (localStorage.getItem('USER_ROLE') || '').trim().toLowerCase();\n        return ACCOUNTS_EXECUTIVE_ROLES.includes(role);\n    }\n\n    \/** PHP checkErrorReverse($work_assignment_id) \u2014 any reverse row exists *\/\n    function hasErrorReverseApplied(item) {\n        return (item.work_assignment_error_reverse || []).length > 0;\n    }\n\n    \/**\n     * PHP checkErrorReverseTime() \u2014 Helpers.php always returns true\n     * (if ($diff<=48) return true; return true;)\n     *\/\n    function isWithinReverseHitWindow() {\n        return true;\n    }\n\n    \/** PHP viewerror.blade.php Action column logic *\/\n    function buildReverseActionCell(item, rowIndex) {\n        if (isAccountsExecutiveUser()) return '';\n\n        if (hasErrorReverseApplied(item)) {\n            return `<span class=\"reverse-applied-text\">Reverse Hit Applied<\/span>`;\n        }\n        if (isWithinReverseHitWindow(item)) {\n            return `<button class=\"btn-reverse\" onclick=\"openModal(${rowIndex})\">Reverse Hit<\/button>`;\n        }\n        return `<button class=\"btn-reverse\" disabled style=\"opacity:.65;cursor:not-allowed;\">Time Expire<\/button>`;\n    }\n\n    const getHeaders = () => ({\n        'Content-Type': 'application\/json',\n        'Authorization': `Bearer ${localStorage.getItem(\"TOKEN\")}`\n    });\n\n    const extractListData = (payload) => {\n        if (Array.isArray(payload?.data)) return payload.data;\n        if (Array.isArray(payload?.data?.data)) return payload.data.data;\n        if (Array.isArray(payload?.data?.data?.data)) return payload.data.data.data;\n        return [];\n    };\n\n    \/** Node + PHP paginator shapes for \/work_assignment_error\/all *\/\n    function extractErrorLogPage(result) {\n        const payload = result?.data;\n        if (!payload) return { rows: [], meta: {} };\n\n        if (Array.isArray(payload.data)) {\n            return { rows: payload.data, meta: payload };\n        }\n        if (Array.isArray(payload.data?.data)) {\n            return { rows: payload.data.data, meta: payload.data };\n        }\n        if (Array.isArray(payload)) {\n            return {\n                rows: payload,\n                meta: {\n                    total: payload.length,\n                    page: 1,\n                    perPage: payload.length || 25,\n                    pages: 1,\n                },\n            };\n        }\n        return { rows: [], meta: payload };\n    }\n\n    function showTableLoading() {\n        document.getElementById('tableBody').innerHTML =\n            '<tr><td colspan=\"16\" style=\"text-align:center;\">Loading\u2026<\/td><\/tr>';\n    }\n\n    const extractPaginationInfo = (payload, fallbackLimit) => {\n        const directPages = Number(\n            payload?.pagination?.pages ||\n            payload?.data?.pagination?.pages ||\n            payload?.last_page ||\n            payload?.data?.last_page ||\n            0\n        );\n\n        const limit = Number(\n            payload?.pagination?.limit ||\n            payload?.data?.pagination?.limit ||\n            payload?.per_page ||\n            payload?.data?.per_page ||\n            payload?.data?.perPage ||\n            fallbackLimit\n        );\n\n        if (Number.isFinite(directPages) && directPages > 0) {\n            return { pages: directPages, limit: Number.isFinite(limit) && limit > 0 ? limit : fallbackLimit };\n        }\n\n        const total = Number(\n            payload?.pagination?.total ||\n            payload?.data?.pagination?.total ||\n            payload?.total ||\n            payload?.data?.total ||\n            0\n        );\n\n        const safeLimit = Number.isFinite(limit) && limit > 0 ? limit : fallbackLimit;\n        const derivedPages = total > 0 ? Math.ceil(total \/ safeLimit) : 1;\n\n        return { pages: Math.max(1, derivedPages), limit: safeLimit };\n    };\n\n    async function fetchAllPages(endpoint) {\n        const defaultLimit = 500;\n        const buildUrl = (page, limit = defaultLimit) => {\n            const url = new URL(endpoint);\n            url.searchParams.set('page', String(page));\n            url.searchParams.set('limit', String(limit));\n            return url.toString();\n        };\n\n        const firstRes = await fetch(buildUrl(1, defaultLimit), { headers: getHeaders() });\n        const firstJson = await firstRes.json();\n\n        let allItems = extractListData(firstJson);\n        const { pages, limit } = extractPaginationInfo(firstJson, defaultLimit);\n\n        if (pages > 1) {\n            const pageRequests = [];\n            for (let page = 2; page <= pages; page++) {\n                pageRequests.push(\n                    fetch(buildUrl(page, limit), { headers: getHeaders() })\n                        .then(r => r.json())\n                        .catch(() => null)\n                );\n            }\n\n            const otherPages = await Promise.all(pageRequests);\n            otherPages.forEach(pageData => {\n                if (pageData) allItems = allItems.concat(extractListData(pageData));\n            });\n        }\n\n        return allItems;\n    }\n\n    const dropDownData = {\n        users: [],\n        files: [],\n        accounts: [],\n        entities: [],\n        categories: []\n    };\n\n    async function loadDropdowns() {\n        try {\n            const [files, accounts, entities, categories, users] = await Promise.all([\n                fetchAllPages(ENDPOINTS.FILES),\n                fetch(ENDPOINTS.ACCOUNTS, { headers: getHeaders() }).then(r => r.json()),\n                fetchAllPages(ENDPOINTS.ENTITIES),\n                fetchAllPages(ENDPOINTS.CATEGORIES),\n                fetchAllPages(ENDPOINTS.TEAM_MEMBERS)\n            ]);\n\n            dropDownData.users = Array.isArray(users) ? users : [];\n            dropDownData.files = Array.isArray(files) ? files : [];\n            dropDownData.accounts = Array.isArray(accounts) ? accounts : extractListData(accounts);\n            dropDownData.entities = Array.isArray(entities) ? entities : [];\n            dropDownData.categories = Array.isArray(categories) ? categories : [];\n\n            renderFilters();\n        } catch (err) { console.error(\"Dropdown Load Error\", err); }\n    }\n\n    \/** \u2500\u2500 RENDER SEARCHABLE SELECT \u2500\u2500 **\/\n    function renderSelect(label, selectId, data, labelKey, valueKey = 'id', multi = false) {\n        \/\/ No placeholder option in dropdown\n        const optionsData = (data || []).map(item => ({ _val: item[valueKey] ?? '', _label: item[labelKey] ?? '' }));\n        const optionsHtml = optionsData.map((o) =>\n            `<div class=\"custom-select-option\" data-value=\"${o._val}\" onclick=\"csSelect('${selectId}', '${o._val.toString().replace(\/'\/g, \"\\\\'\")}', this, ${multi})\">\n                    <div class=\"cs-checkbox\"><\/div>\n                    <span class=\"opt-label\">${o._label}<\/span>\n                <\/div>`\n        ).join('');\n        return `\n                <div class=\"filter-group\">\n                    <label>${label}<\/label>\n                    <div class=\"custom-select-wrapper${multi ? ' multi' : ''}\" id=\"csWrapper_${selectId}\">\n                        <input type=\"hidden\" id=\"${selectId}\" value=\"\">\n                        <div class=\"custom-select-trigger placeholder-shown\" id=\"csTrigger_${selectId}\" onclick=\"csToggle('${selectId}', event)\">\n                            <div class=\"cs-label\">\n                                <input type=\"text\" class=\"cs-search-input\" id=\"csSearch_${selectId}\" placeholder=\"Select ${label}\" autocomplete=\"off\"\n                                    oninput=\"csFilterIntegrated('${selectId}', this.value)\"\n                                    onclick=\"csHandleInputClick('${selectId}', event)\"\n                                    onkeydown=\"csHandleKeydown('${selectId}', event)\">\n                            <\/div>\n                            <svg class=\"cs-arrow\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><polyline points=\"6 9 12 15 18 9\"\/><\/svg>\n                        <\/div>\n                        <div class=\"custom-select-dropdown\" id=\"csDrop_${selectId}\">\n                            <div class=\"custom-select-options\">\n                                ${optionsHtml}\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            `;\n    }\n\n    function csToggle(selectId, e) {\n        e.stopPropagation();\n        const wrapper = document.getElementById('csWrapper_' + selectId);\n        const isOpen = wrapper.classList.contains('open');\n        document.querySelectorAll('.custom-select-wrapper.open').forEach(w => {\n            if (w !== wrapper) w.classList.remove('open');\n        });\n        wrapper.classList.toggle('open');\n        if (!isOpen) {\n            const searchInput = document.getElementById('csSearch_' + selectId);\n            if (searchInput) {\n                \/\/ Only clear search if no chips are selected (no values chosen)\n                const hiddenInput = document.getElementById(selectId);\n                if (!hiddenInput || !hiddenInput.value) {\n                    searchInput.value = '';\n                }\n                csFilterIntegrated(selectId, searchInput.value || '');\n                setTimeout(() => searchInput.focus(), 50);\n            }\n        }\n    }\n\n    function csHandleInputClick(selectId, e) {\n        e.stopPropagation();\n        const wrapper = document.getElementById('csWrapper_' + selectId);\n        if (!wrapper.classList.contains('open')) {\n            document.querySelectorAll('.custom-select-wrapper.open').forEach(w => {\n                if (w !== wrapper) w.classList.remove('open');\n            });\n            wrapper.classList.add('open');\n            csFilterIntegrated(selectId, e.target.value || '');\n        }\n    }\n\n    function csHandleKeydown(selectId, e) {\n        const wrapper = document.getElementById('csWrapper_' + selectId);\n        const drop = document.getElementById('csDrop_' + selectId);\n        const isOpen = wrapper.classList.contains('open');\n\n        if (e.key === 'Escape') {\n            wrapper.classList.remove('open');\n            e.preventDefault();\n            return;\n        }\n\n        if (e.key === 'Enter') {\n            if (!isOpen) {\n                wrapper.classList.add('open');\n                csFilterIntegrated(selectId, e.target.value || '');\n            } else {\n                \/\/ Select highlighted option\n                const highlighted = drop.querySelector('.custom-select-option.cs-highlighted');\n                if (highlighted) {\n                    const val = highlighted.dataset.value;\n                    csSelect(selectId, val, highlighted, true);\n                }\n            }\n            e.preventDefault();\n            return;\n        }\n\n        if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n            e.preventDefault();\n            if (!isOpen) {\n                wrapper.classList.add('open');\n                csFilterIntegrated(selectId, e.target.value || '');\n            }\n            const visibleOpts = Array.from(drop.querySelectorAll('.custom-select-option:not(.placeholder-option)')).filter(o => o.style.display !== 'none');\n            if (visibleOpts.length === 0) return;\n            const currentIdx = visibleOpts.findIndex(o => o.classList.contains('cs-highlighted'));\n            visibleOpts.forEach(o => o.classList.remove('cs-highlighted'));\n            let nextIdx;\n            if (e.key === 'ArrowDown') {\n                nextIdx = currentIdx < visibleOpts.length - 1 ? currentIdx + 1 : 0;\n            } else {\n                nextIdx = currentIdx > 0 ? currentIdx - 1 : visibleOpts.length - 1;\n            }\n            visibleOpts[nextIdx].classList.add('cs-highlighted');\n            visibleOpts[nextIdx].scrollIntoView({ block: 'nearest' });\n            return;\n        }\n\n        \/\/ Any other key: open dropdown if not open\n        if (!isOpen) {\n            wrapper.classList.add('open');\n        }\n    }\n\n    function csFilterIntegrated(selectId, query) {\n        const drop = document.getElementById('csDrop_' + selectId);\n        if (!drop) return;\n        const options = drop.querySelectorAll('.custom-select-option');\n        const q = query.toLowerCase();\n        options.forEach(opt => {\n            if (opt.classList.contains('placeholder-option')) {\n                opt.style.display = 'none'; \/\/ always hide placeholder in dropdown\n                return;\n            }\n            const text = opt.querySelector('.opt-label') ? opt.querySelector('.opt-label').textContent.toLowerCase() : opt.textContent.toLowerCase();\n            opt.style.display = text.includes(q) ? '' : 'none';\n        });\n        \/\/ Remove highlight when filter changes\n        drop.querySelectorAll('.cs-highlighted').forEach(o => o.classList.remove('cs-highlighted'));\n    }\n\n    function csFilter(selectId, query) {\n        const drop = document.getElementById('csDrop_' + selectId);\n        const options = drop.querySelectorAll('.custom-select-option');\n        const q = query.toLowerCase();\n        options.forEach(opt => {\n            if (opt.classList.contains('placeholder-option')) {\n                opt.style.display = 'none'; \/\/ always hide placeholder in dropdown\n                return;\n            }\n            const text = opt.textContent.toLowerCase();\n            opt.style.display = text.includes(q) ? '' : 'none';\n        });\n    }\n\n    function csSelect(selectId, value, optionEl, multi = false) {\n        const wrapper = document.getElementById('csWrapper_' + selectId);\n        const input = document.getElementById(selectId);\n        const trigger = wrapper.querySelector('.custom-select-trigger');\n        const labelEl = trigger.querySelector('.cs-label');\n        const searchInput = document.getElementById('csSearch_' + selectId);\n\n        \/\/ Remove highlight from all options\n        wrapper.querySelectorAll('.custom-select-option.cs-highlighted').forEach(o => o.classList.remove('cs-highlighted'));\n\n        if (value === '') {\n            input.value = '';\n            \/\/ Reset: show placeholder in input, clear chips\n            if (searchInput) {\n                searchInput.value = '';\n                \/\/ Restore placeholder text from the search input's placeholder attribute\n            }\n            \/\/ Remove any chips, keep only search input\n            const existingChips = labelEl.querySelectorAll('.cs-chip');\n            existingChips.forEach(c => c.remove());\n            trigger.classList.add('placeholder-shown');\n            wrapper.querySelectorAll('.custom-select-option').forEach(o => o.classList.remove('selected'));\n            if (!multi) wrapper.classList.remove('open');\n            \/\/ Reset integrated search\n            if (searchInput) searchInput.value = '';\n            csFilterIntegrated(selectId, '');\n            fetchErrors(1);\n            return;\n        }\n\n        if (!multi) {\n            input.value = value;\n            if (searchInput) {\n                searchInput.value = optionEl.querySelector('.opt-label').textContent.trim();\n            }\n            trigger.classList.remove('placeholder-shown');\n            wrapper.querySelectorAll('.custom-select-option').forEach(o => o.classList.remove('selected'));\n            optionEl.classList.add('selected');\n            wrapper.classList.remove('open');\n        } else {\n            let values = input.value ? input.value.split(',') : [];\n            const idx = values.indexOf(value);\n            if (idx > -1) {\n                values.splice(idx, 1);\n                optionEl.classList.remove('selected');\n            } else {\n                values.push(value);\n                optionEl.classList.add('selected');\n            }\n            input.value = values.join(',');\n\n            if (values.length === 0) {\n                trigger.classList.add('placeholder-shown');\n                \/\/ Clear chips, keep only search input\n                const existingChips = labelEl.querySelectorAll('.cs-chip');\n                existingChips.forEach(c => c.remove());\n                if (searchInput) searchInput.value = '';\n            } else {\n                trigger.classList.remove('placeholder-shown');\n                if (searchInput) searchInput.value = '';\n                \/\/ Remove old chips first\n                const existingChips = labelEl.querySelectorAll('.cs-chip');\n                existingChips.forEach(c => c.remove());\n                \/\/ Render chips before the search input\n                const selectedLabels = Array.from(wrapper.querySelectorAll('.custom-select-option.selected'))\n                    .map(opt => ({\n                        val: opt.dataset.value,\n                        label: opt.querySelector('.opt-label').textContent.trim()\n                    }));\n\n                selectedLabels.forEach(item => {\n                    const chip = document.createElement('div');\n                    chip.className = 'cs-chip';\n                    chip.innerHTML = `<span>${item.label}<\/span><span class=\"cs-chip-remove\" onclick=\"csRemoveChip(event, '${selectId}', '${item.val}')\">&times;<\/span>`;\n                    labelEl.insertBefore(chip, searchInput);\n                });\n            }\n            \/\/ Keep dropdown open for multi-select, reset filter\n            csFilterIntegrated(selectId, '');\n        }\n        fetchErrors(1);\n    }\n\n    function csRemoveChip(e, selectId, value) {\n        e.stopPropagation();\n        const wrapper = document.getElementById('csWrapper_' + selectId);\n        const optionEl = wrapper.querySelector(`.custom-select-option[data-value=\"${value}\"]`);\n        if (optionEl) {\n            csSelect(selectId, value, optionEl, true);\n        }\n    }\n\n    function getFilterValue(id) {\n        const el = document.getElementById(id);\n        return el ? el.value : '';\n    }\n\n    function renderFilters() {\n        const selects = [\n            { id: 'filterAssigned', data: dropDownData.users,      labelKey: 'pesudo_name', valueKey: 'id',        label: 'Assigned to' },\n            { id: 'filterFile',     data: dropDownData.files,      labelKey: 'file_name', valueKey: 'file_name', label: 'File Name'   },\n            { id: 'filterAccount',  data: dropDownData.accounts,   labelKey: 'name',      valueKey: 'id',        label: 'Account'     },\n            { id: 'filterEntity',   data: dropDownData.entities,   labelKey: 'entity',    valueKey: 'id',        label: 'Entity'      },\n            { id: 'filterCategory', data: dropDownData.categories, labelKey: 'category',  valueKey: 'id',        label: 'Category'    }\n        ];\n\n        selects.forEach(({ id, data, labelKey, valueKey, label }) => {\n            const optionsContainer = document.querySelector(`#csDrop_${id} .custom-select-options`);\n            if (!optionsContainer) return;\n            \/\/ Only render real options (no placeholder option in dropdown)\n            const optionsData = (data || []).map(item => ({ _val: item[valueKey] ?? '', _label: item[labelKey] ?? '' }));\n            optionsContainer.innerHTML = optionsData.map(o =>\n                `<div class=\"custom-select-option\" data-value=\"${o._val}\" onclick=\"csSelect('${id}', '${o._val.toString().replace(\/'\/g, \"\\\\'\")}', this, true)\">\n                    <div class=\"cs-checkbox\"><\/div>\n                    <span class=\"opt-label\">${o._label}<\/span>\n                <\/div>`\n            ).join('');\n        });\n    }\n\n    function formatDatesParam(value) {\n        if (!value) return '';\n        return value.trim();\n    }\n\n    function resolveFilterLabels(csvValues, data, valueKey, labelKey) {\n        if (!csvValues) return '';\n        return String(csvValues)\n            .split(',')\n            .map((v) => v.trim())\n            .filter(Boolean)\n            .map((v) => {\n                const item = (data || []).find((d) => String(d[valueKey]) === String(v));\n                return item ? String(item[labelKey]) : v;\n            })\n            .join(',');\n    }\n\n    function appendErrorLogFilters(params) {\n        const assigned = getFilterValue('filterAssigned');\n        if (assigned) params.set('assigned_to', assigned);\n\n        const file = getFilterValue('filterFile');\n        if (file) params.set('file_id', file);\n\n        const account = getFilterValue('filterAccount');\n        if (account) params.set('account_id', account);\n\n        const entity = getFilterValue('filterEntity');\n        if (entity) params.set('entity_id', entity);\n\n        const category = getFilterValue('filterCategory');\n        if (category) params.set('category_id', category);\n\n        const dateVal = getFilterValue('filterDate');\n        if (dateVal) {\n            const datesParam = formatDatesParam(dateVal);\n            if (datesParam) params.set('dates', datesParam);\n        }\n\n        const errType = getFilterValue('filterType');\n        if (errType) params.set('type', errType);\n    }\n\n    function buildErrorLogExportUrl() {\n        const params = new URLSearchParams();\n        appendErrorLogFilters(params);\n        return ENDPOINTS.ERROR_LOG_EXPORT + '?' + params.toString();\n    }\n\n    async function fetchErrors(page = 1) {\n        currentPage = page;\n        showTableLoading();\n\n        const perPage = getFilterValue('filterPerPage') || '25';\n        const url = new URL(ENDPOINTS.ERRORS);\n        url.searchParams.set('page', String(page));\n        url.searchParams.set('perPage', perPage);\n\n        const assigned = getFilterValue('filterAssigned');\n        if (assigned) url.searchParams.set('assigned_to', assigned);\n\n        const file = getFilterValue('filterFile');\n        if (file) url.searchParams.set('file_name', file);\n\n        const account = getFilterValue('filterAccount');\n        if (account) url.searchParams.set('account_id', account);\n\n        const entity = getFilterValue('filterEntity');\n        if (entity) url.searchParams.set('entity_id', entity);\n\n        const category = getFilterValue('filterCategory');\n        if (category) url.searchParams.set('category_id', category);\n\n        const listType = getFilterValue('filterType');\n        if (listType) url.searchParams.set('type', listType);\n\n        const dateVal = getFilterValue('filterDate');\n        if (dateVal) {\n            const datesParam = formatDatesParam(dateVal);\n            if (datesParam) url.searchParams.set('dates', datesParam);\n        }\n\n        try {\n            const res = await fetch(url.toString(), { headers: getHeaders() });\n            let result;\n            try {\n                result = await res.json();\n            } catch (parseErr) {\n                throw new Error('Invalid response from server');\n            }\n\n            const ok =\n                res.ok &&\n                (result.code === 200 ||\n                    result.code === '200' ||\n                    result.status === 'success');\n\n            if (!ok) {\n                const msg =\n                    result.message ||\n                    (Array.isArray(result.messages) ? result.messages.join(', ') : '') ||\n                    (result.code === 'NO_TOKEN' || result.code === 'INVALID_TOKEN'\n                        ? 'Session expired \u2014 please log in again'\n                        : `Request failed (${res.status})`);\n                document.getElementById('tableBody').innerHTML =\n                    `<tr><td colspan=\"16\" style=\"text-align:center;color:#c0392b;\">${escapeHtml(msg)}<\/td><\/tr>`;\n                console.error('Error log API:', res.status, result);\n                return;\n            }\n\n            const { rows, meta } = extractErrorLogPage(result);\n            renderTable(rows);\n            renderPagination({\n                total: meta.total ?? rows.length,\n                page: meta.page ?? meta.current_page ?? page,\n                perPage: meta.perPage ?? meta.per_page ?? Number(perPage),\n                pages:\n                    meta.pages ??\n                    meta.last_page ??\n                    Math.max(1, Math.ceil((meta.total ?? rows.length) \/ (meta.perPage ?? meta.per_page ?? perPage))),\n            });\n        } catch (err) {\n            console.error('Fetch Error:', err);\n            document.getElementById('tableBody').innerHTML =\n                '<tr><td colspan=\"16\" style=\"text-align:center;color:#c0392b;\">Failed to load error logs. Check connection and try again.<\/td><\/tr>';\n        }\n    }\n\n    function escapeHtml(value) {\n        if (value === null || value === undefined) return '';\n        return String(value)\n            .replace(\/&\/g, '&amp;')\n            .replace(\/<\/g, '&lt;')\n            .replace(\/>\/g, '&gt;')\n            .replace(\/\"\/g, '&quot;');\n    }\n\n    function joinCellLines(values) {\n        const lines = (values || [])\n            .map(v => (v === null || v === undefined || v === '' ? null : String(v)))\n            .filter(Boolean);\n        return lines.length ? lines.map(escapeHtml).join('<br>') : '-';\n    }\n\n    \/** PHP viewerror.blade.php: one table row per work assignment *\/\n    function normalizeErrorLogRows(data) {\n        if (!Array.isArray(data) || !data.length) return [];\n\n        if (Array.isArray(data[0]?.work_assignment_errors)) {\n            return data.map(item => ({\n                ...item,\n                work_assignment_id: item.work_assignment_id || item.id,\n            }));\n        }\n\n        const grouped = new Map();\n        data.forEach(item => {\n            const waId = item.work_assignment_id || item.id;\n            if (!grouped.has(waId)) {\n                grouped.set(waId, {\n                    id: waId,\n                    work_assignment_id: waId,\n                    assigned_date: item.assigned_date,\n                    file_name: item.file_name,\n                    assigned_to: item.assigned_to,\n                    assigned_to_name: item.assigned_to_name,\n                    account_name: item.account_name,\n                    category_name: item.category_name,\n                    entity_name: item.entity_name,\n                    qc_by_name: item.qc_by_name,\n                    qc_date: item.qc_date,\n                    work_assignment_errors: [],\n                    work_assignment_error_reverse: item.work_assignment_error_reverse || [],\n                });\n            }\n            grouped.get(waId).work_assignment_errors.push(item);\n        });\n        return Array.from(grouped.values());\n    }\n\n    function renderTable(data) {\n        const tbody = document.getElementById('tableBody');\n        tbody.innerHTML = '';\n        const rows = normalizeErrorLogRows(data);\n        allTableData = rows;\n        if (!rows.length) {\n            tbody.innerHTML = '<tr><td colspan=\"16\" style=\"text-align:center;\">No data found<\/td><\/tr>';\n            return;\n        }\n        rows.forEach((item, rowIndex) => {\n            const errors = item.work_assignment_errors || [];\n            const reverses = item.work_assignment_error_reverse || [];\n            const rowId = item.work_assignment_id || item.id;\n            const actionCell = buildReverseActionCell(item, rowIndex);\n            const row = `<tr>\n                <td>${escapeHtml(item.assigned_date || '-')}<\/td>\n                <td>${escapeHtml(item.file_name || '-')}<\/td>\n                <td>${escapeHtml(item.assigned_to_name || '-')}<\/td>\n                <td>${escapeHtml(item.account_name || '-')}<\/td>\n                <td>${escapeHtml(item.category_name || '-')}<\/td>\n                <td>${joinCellLines(errors.map(e => e.error_type))}<\/td>\n                <td>${joinCellLines(errors.map(e => e.error_count))}<\/td>\n                <td>${reverses.length ? joinCellLines(reverses.map(r => r.reverse_error_count)) : (item.reversal_count ?? 0)}<\/td>\n                <td>${joinCellLines(errors.map(e => e.mistake))}<\/td>\n                <td>${joinCellLines(errors.map(e => e.patient_account))}<\/td>\n                <td>${escapeHtml(item.entity_name || '-')}<\/td>\n                <td>${joinCellLines(errors.map(e => e.dos_date))}<\/td>\n                <td>${joinCellLines(errors.map(e => e.description))}<\/td>\n                <td>${escapeHtml(item.qc_by_name || '-')}<\/td>\n                <td>${escapeHtml(item.qc_date || '-')}<\/td>\n                <td data-row-id=\"${rowId}\">${actionCell}<\/td>\n            <\/tr>`;\n            tbody.insertAdjacentHTML('beforeend', row);\n        });\n    }\n\n    function renderPagination(meta) {\n        document.getElementById('totalCount').textContent = `(${meta.total})`;\n        const container = document.getElementById('pageNumbers');\n        container.innerHTML = '';\n\n        totalPages = meta.pages || Math.ceil(meta.total \/ meta.perPage);\n\n        document.getElementById('prevBtn').onclick = () => fetchErrors(currentPage - 1);\n        document.getElementById('prevBtn').className = currentPage === 1 ? 'nav-btn disabled' : 'nav-btn';\n        document.getElementById('nextBtn').onclick = () => fetchErrors(currentPage + 1);\n        document.getElementById('nextBtn').className = currentPage === totalPages ? 'nav-btn disabled' : 'nav-btn';\n\n        let pages = [];\n        if (totalPages <= 5) {\n            for (let i = 1; i <= totalPages; i++) pages.push(i);\n        } else {\n            pages.push(1);\n            if (currentPage > 3) pages.push('...');\n\n            let start = Math.max(2, currentPage - 1);\n            let end = Math.min(totalPages - 1, currentPage + 1);\n\n            if (currentPage <= 2) end = 4;\n            if (currentPage >= totalPages - 1) start = totalPages - 3;\n\n            for (let i = start; i <= end; i++) {\n                if (!pages.includes(i)) pages.push(i);\n            }\n\n            if (currentPage < totalPages - 2) pages.push('...');\n            if (!pages.includes(totalPages)) pages.push(totalPages);\n        }\n\n        pages.forEach(p => {\n            if (p === '...') {\n                const span = document.createElement('span');\n                span.className = 'dots';\n                span.textContent = '...';\n                container.appendChild(span);\n            } else {\n                const span = document.createElement('span');\n                span.className = p === currentPage ? 'page-num active' : 'page-num';\n                span.textContent = p;\n                span.onclick = () => fetchErrors(p);\n                container.appendChild(span);\n            }\n        });\n\n        const start = meta.total === 0 ? 0 : ((currentPage - 1) * meta.perPage) + 1;\n        const end = Math.min(currentPage * meta.perPage, meta.total);\n        document.getElementById('entryInfo').textContent = `Showing ${start} to ${end} of ${meta.total} entries`;\n    }\n\n    function normalizeErrorType(value) {\n        const t = String(value ?? '').trim();\n        if (!t) return null;\n        if (t === 'Minor') return 'Minor';\n        if (t === 'Critical') return 'Critical';\n        if (['Zero_Tolerence', 'Zero Tolerence', 'Zero Tolerance', 'Zero_Tolerance', 'ZTE', 'ZT'].includes(t)) {\n            return 'Zero_Tolerence';\n        }\n        const compact = t.toLowerCase().replace(\/[_-]\/g, ' ').replace(\/\\s+\/g, ' ').trim();\n        if (compact === 'zero tolerence' || compact === 'zero tolerance') return 'Zero_Tolerence';\n        return t;\n    }\n\n    function sumErrorCount(errors, type) {\n        const target = normalizeErrorType(type);\n        return (errors || [])\n            .filter(e => normalizeErrorType(e.error_type) === target)\n            .reduce((sum, e) => sum + (parseInt(e.error_count, 10) || 0), 0);\n    }\n\n    function fillReversePopupFields(item, errors) {\n        const stats = item.error_stats;\n        document.getElementById('popFile').value = item.file_name || '';\n        if (stats && typeof stats === 'object') {\n            document.getElementById('popMinor').value = stats.minor ?? 0;\n            document.getElementById('popCritical').value = stats.critical ?? 0;\n            document.getElementById('popZt').value = stats.zeroTolerence ?? 0;\n        } else {\n            document.getElementById('popMinor').value = sumErrorCount(errors, 'Minor');\n            document.getElementById('popCritical').value = sumErrorCount(errors, 'Critical');\n            document.getElementById('popZt').value = sumErrorCount(errors, 'Zero_Tolerence');\n        }\n        document.getElementById('popAssign').value = item.assigned_to_name || '';\n        document.getElementById('popQc').value = item.qc_by_name || '';\n    }\n\n    async function openModal(rowIndexOrItem) {\n        const item = typeof rowIndexOrItem === 'number'\n            ? allTableData[rowIndexOrItem]\n            : rowIndexOrItem;\n        if (!item) return;\n        currentItem = item;\n        currentRowId = String(item.work_assignment_id || item.id);\n        const errors = item.work_assignment_errors || [];\n        const waId = item.work_assignment_id || item.id;\n\n        fillReversePopupFields(item, errors.length ? errors : [item]);\n\n        \/\/ Reset editable reverse fields (user enters these manually \u2014 PHP parity)\n        document.getElementById('popReverseMinor').value = '';\n        document.getElementById('popReverseCritical').value = '';\n        document.getElementById('popReverseZt').value = '';\n        document.getElementById('popRemarks').value = '';\n\n        document.getElementById('reverseModal').style.display = 'flex';\n        document.body.style.overflow = 'hidden';\n\n        \/\/ PHP custom.js: POST \/work_assignment_error\/get \u2192 stats.zeroTolerence\n        if (!waId) return;\n        try {\n            const res = await fetch(ENDPOINTS.ERROR_GET, {\n                method: 'POST',\n                headers: getHeaders(),\n                body: JSON.stringify({ id: waId }),\n            });\n            const result = await res.json();\n            if (result.code === 200 || result.status === 'success') {\n                const stats = result.stats;\n                if (stats && typeof stats === 'object') {\n                    document.getElementById('popMinor').value = stats.minor ?? 0;\n                    document.getElementById('popCritical').value = stats.critical ?? 0;\n                    document.getElementById('popZt').value = stats.zeroTolerence ?? 0;\n                } else if (Array.isArray(result.data) && result.data.length) {\n                    fillReversePopupFields(item, result.data);\n                }\n            }\n        } catch (err) {\n            console.warn('Reverse popup stats fetch failed:', err);\n        }\n    }\n\n    function closeModal() {\n        document.getElementById('reverseModal').style.display = 'none';\n        document.body.style.overflow = 'auto';\n    }\n\n    function resetFilters() {\n        \/\/ Reset native selects\n        const pp = document.getElementById('filterPerPage');\n        if (pp) pp.value = '';\n        const ft = document.getElementById('filterType');\n        if (ft) ft.value = '';\n\n        \/\/ Reset custom multi-select dropdowns\n        ['filterAssigned', 'filterFile', 'filterAccount', 'filterEntity', 'filterCategory'].forEach(id => {\n            const input = document.getElementById(id);\n            if (input) {\n                input.value = '';\n                const wrapper = document.getElementById('csWrapper_' + id);\n                if (wrapper) {\n                    const trigger = wrapper.querySelector('.custom-select-trigger');\n                    const labelEl = trigger.querySelector('.cs-label');\n                    \/\/ Remove chips\n                    labelEl.querySelectorAll('.cs-chip').forEach(c => c.remove());\n                    \/\/ Reset search input\n                    const searchInput = document.getElementById('csSearch_' + id);\n                    if (searchInput) searchInput.value = '';\n                    trigger.classList.add('placeholder-shown');\n                    wrapper.querySelectorAll('.custom-select-option').forEach(o => o.classList.remove('selected'));\n                    csFilterIntegrated(id, '');\n                }\n            }\n        });\n\n        \/\/ Reset date picker\n        document.getElementById('filterDate').value = '';\n        if (dpState.errdate) {\n            dpState.errdate.startDate = null;\n            dpState.errdate.endDate = null;\n            dpState.errdate.hoverDate = null;\n            dpState.errdate.activePreset = null;\n            dpUpdateFooterRange('errdate');\n        }\n        fetchErrors(1);\n    }\n\n    \/\/ Reverse Hit form submit \u2192 POST API\n    document.getElementById('reverseForm').addEventListener('submit', async function (e) {\n        e.preventDefault();\n        if (!currentItem) return;\n\n        const saveBtn = this.querySelector('button[type=\"submit\"]');\n        const originalText = saveBtn.textContent;\n        saveBtn.textContent = 'Saving...';\n        saveBtn.disabled = true;\n\n        const payload = {\n            work_assignment_id: currentItem.work_assignment_id || currentItem.id,\n            submited_by: Number(localStorage.getItem(\"USER_ID\")) || 0,\n            remarks: document.getElementById('popRemarks').value,\n            reverse_minor_error: Number(document.getElementById('popReverseMinor').value) || 0,\n            reverse_critical_error: Number(document.getElementById('popReverseCritical').value) || 0,\n            rever_zero_tolerance: Number(document.getElementById('popReverseZt').value) || 0,\n            action_by: currentItem.action_by || currentItem.assigned_to || 0,\n            qc_by: currentItem.qc_by || 0\n        };\n\n        try {\n            const res = await fetch(ENDPOINTS.REVERSE_ADD, {\n                method: 'POST',\n                headers: getHeaders(),\n                body: JSON.stringify(payload)\n            });\n            const result = await res.json();\n            if (result.code === 200 || result.code === 201 || res.ok) {\n                closeModal();\n                await fetchErrors(currentPage);\n            } else {\n                alert(result.message || 'Failed to save. Please try again.');\n            }\n        } catch (err) {\n            console.error('Reverse Add Error:', err);\n            alert('An error occurred. Please try again.');\n        } finally {\n            saveBtn.textContent = originalText;\n            saveBtn.disabled = false;\n        }\n    });\n\n    \/\/ Download CSV (PHP parity: GET \/work_assignment\/error-log-qc-export)\n    async function downloadCSV() {\n        const downloadBtn = document.querySelector('.btn-download[onclick=\"downloadCSV()\"]');\n        const originalText = downloadBtn ? downloadBtn.textContent : 'Download CSV';\n        if (downloadBtn) {\n            downloadBtn.disabled = true;\n            downloadBtn.textContent = 'Downloading...';\n        }\n\n        try {\n            const token = localStorage.getItem('TOKEN');\n            if (!token) {\n                alert('You are not logged in. Please login again.');\n                return;\n            }\n\n            const res = await fetch(buildErrorLogExportUrl(), {\n                method: 'GET',\n                headers: { Authorization: 'Bearer ' + token }\n            });\n\n            if (!res.ok) {\n                let message = 'Failed to download CSV.';\n                try {\n                    const errJson = await res.json();\n                    message = errJson.message || (errJson.messages && errJson.messages[0]) || message;\n                } catch (_) {\n                    message = message + ' (HTTP ' + res.status + ')';\n                }\n                alert(message);\n                return;\n            }\n\n            const blob = await res.blob();\n            if (!blob || blob.size === 0) {\n                alert('No data available to export for the selected filters.');\n                return;\n            }\n\n            let filename = 'work-assignment-error-log' + Date.now() + '.csv';\n            const disposition = res.headers.get('Content-Disposition');\n            if (disposition) {\n                const match = disposition.match(\/filename=\"?([^\";\\n]+)\"?\/i);\n                if (match && match[1]) filename = match[1].trim();\n            }\n\n            const objectUrl = URL.createObjectURL(blob);\n            const a = document.createElement('a');\n            a.href = objectUrl;\n            a.download = filename;\n            document.body.appendChild(a);\n            a.click();\n            document.body.removeChild(a);\n            URL.revokeObjectURL(objectUrl);\n        } catch (error) {\n            console.error('Error log export download error', error);\n            alert('Failed to download CSV. Please try again.');\n        } finally {\n            if (downloadBtn) {\n                downloadBtn.disabled = false;\n                downloadBtn.textContent = originalText;\n            }\n        }\n    }\n\n    \/\/ \u2500\u2500 UPGRADED RANGE DATE PICKER \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n    const dpState = {\n        errdate: { viewYear: null, viewMonth: null, startDate: null, endDate: null, hoverDate: null, activePreset: null }\n    };\n\n    const DP_IDS = {\n        errdate: { dropdown: 'dpDropdownErrdate', backdrop: 'dpBackdropErrdate', title: 'dpCalTitleErrdate', days: 'dpDaysErrdate', title2: 'dpCalTitleErrdate2', days2: 'dpDaysErrdate2', display: 'filterDate' }\n    };\n\n    const DP_MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n\n    function dpToday() { const d = new Date(); d.setHours(0, 0, 0, 0); return d; }\n\n    function dpSameDay(a, b) {\n        if (!a || !b) return false;\n        return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();\n    }\n\n    function dpFmtISO(d) {\n        if (!d) return '';\n        return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;\n    }\n\n    function dpRenderCalendar(inst) {\n        const s = dpState[inst];\n        const ids = DP_IDS[inst];\n        let y2 = s.viewYear, m2 = s.viewMonth + 1;\n        if (m2 > 11) { m2 = 0; y2++; }\n        document.getElementById(ids.title).textContent = `${DP_MONTHS[s.viewMonth]} ${s.viewYear}`;\n        document.getElementById(ids.title2).textContent = `${DP_MONTHS[m2]} ${y2}`;\n        document.getElementById(ids.days).innerHTML = dpBuildDays(s.viewYear, s.viewMonth, s, inst);\n        document.getElementById(ids.days2).innerHTML = dpBuildDays(y2, m2, s, inst);\n    }\n\n    function dpBuildDays(year, month, s, inst) {\n        const today = dpToday();\n        const startDay = new Date(year, month, 1).getDay();\n        const daysInMonth = new Date(year, month + 1, 0).getDate();\n        let html = '';\n        for (let i = 0; i < startDay; i++) html += `<div class=\"dp-day other-month\"><\/div>`;\n        for (let d = 1; d <= daysInMonth; d++) {\n            const cur = new Date(year, month, d);\n            let cls = 'dp-day';\n            if (dpSameDay(cur, today)) cls += ' today';\n            const dayOfWeek = cur.getDay();\n            if (s.startDate) {\n                if (s.endDate) {\n                    if (dpSameDay(cur, s.startDate)) {\n                        cls += ' selected selected-start';\n                    } else if (dpSameDay(cur, s.endDate)) {\n                        cls += ' selected selected-end';\n                    } else if (cur > s.startDate && cur < s.endDate) {\n                        cls += ' in-range';\n                        if (dayOfWeek === 0) cls += ' row-start';\n                        if (dayOfWeek === 6) cls += ' row-end';\n                    }\n                } else if (dpSameDay(cur, s.startDate)) {\n                    cls += ' selected selected-start selected-end';\n                } else if (s.hoverDate) {\n                    let rS = s.startDate, rE = s.hoverDate;\n                    if (rE < rS) { const t = rS; rS = rE; rE = t; }\n                    if (dpSameDay(cur, s.hoverDate)) {\n                        cls += (s.hoverDate < s.startDate) ? ' hover-start hover-range' : ' hover-end hover-range';\n                    } else if (cur > rS && cur < rE) {\n                        cls += ' hover-range';\n                        if (dayOfWeek === 0) cls += ' row-start';\n                        if (dayOfWeek === 6) cls += ' row-end';\n                    }\n                }\n            }\n            html += `<div class=\"${cls}\" onclick=\"dpPickDay(event,${year},${month},${d},'${inst}')\" onmouseover=\"dpHoverDay('${inst}',${year},${month},${d})\">${d}<\/div>`;\n        }\n        return html;\n    }\n\n    function dpPickDay(e, y, m, d, inst) {\n        e.stopPropagation();\n        const s = dpState[inst];\n        const chosen = new Date(y, m, d);\n        if (!s.startDate) {\n            s.startDate = chosen; s.endDate = null;\n        } else if (s.endDate) {\n            s.startDate = chosen; s.endDate = null;\n        } else {\n            if (chosen < s.startDate) { s.endDate = s.startDate; s.startDate = chosen; }\n            else { s.endDate = chosen; }\n        }\n        s.hoverDate = null;\n        document.querySelectorAll(`#${DP_IDS[inst].dropdown} .dp-preset-item`).forEach(el => el.classList.remove('active'));\n        dpRenderCalendar(inst);\n        dpUpdateFooterRange(inst);\n    }\n\n    function dpHoverDay(inst, y, m, d) {\n        const s = dpState[inst];\n        if (s.startDate && !s.endDate) {\n            const h = new Date(y, m, d);\n            if (!dpSameDay(h, s.hoverDate)) {\n                s.hoverDate = h;\n                dpRenderCalendar(inst);\n            }\n        }\n    }\n\n    \/\/ \u2500\u2500 FIX #3: Footer range display uses ' to ' separator \u2500\u2500\n    function dpUpdateFooterRange(inst) {\n        const s = dpState[inst];\n        const el = document.getElementById('dpRangeDisplayErrdate');\n        if (!el) return;\n        if (s.startDate) {\n            if (s.endDate) el.textContent = `${dpFmtISO(s.startDate)} to ${dpFmtISO(s.endDate)}`;\n            else el.textContent = `${dpFmtISO(s.startDate)} - Select end date`;\n        } else el.textContent = 'Select Date Range';\n    }\n\n    function selectPreset(e, preset, inst) {\n        if (e) e.stopPropagation();\n        const s = dpState[inst];\n        const today = dpToday();\n        document.querySelectorAll(`#${DP_IDS[inst].dropdown} .dp-preset-item`).forEach(el =>\n            el.classList.toggle('active', el.dataset.preset === preset));\n        switch (preset) {\n            case 'today': s.startDate = today; s.endDate = new Date(today); break;\n            case 'yesterday': { const y = new Date(today); y.setDate(y.getDate() - 1); s.startDate = y; s.endDate = new Date(y); break; }\n            case 'last7': { const y = new Date(today); y.setDate(y.getDate() - 6); s.startDate = y; s.endDate = new Date(today); break; }\n            case 'last30': { const y = new Date(today); y.setDate(y.getDate() - 29); s.startDate = y; s.endDate = new Date(today); break; }\n            case 'thisMonth': s.startDate = new Date(today.getFullYear(), today.getMonth(), 1); s.endDate = new Date(today); break;\n            case 'lastMonth': s.startDate = new Date(today.getFullYear(), today.getMonth() - 1, 1); s.endDate = new Date(today.getFullYear(), today.getMonth(), 0); break;\n        }\n        s.viewYear = s.startDate.getFullYear(); s.viewMonth = s.startDate.getMonth();\n        dpRenderCalendar(inst); dpUpdateFooterRange(inst); dpApply(e, inst);\n    }\n\n    \/\/ \u2500\u2500 FIX #3: dpApply uses ' to ' separator so API receives correct format \u2500\u2500\n    \/\/ Supports both single date (same start\/end) and range (start to end).\n    \/\/ Triggers fetchErrors(1) so table reactively updates from the API.\n    function dpApply(e, inst) {\n        if (e) e.stopPropagation();\n        const s = dpState[inst];\n        const display = document.getElementById(DP_IDS[inst].display);\n        if (s.startDate) {\n            if (s.endDate) {\n                display.value = dpSameDay(s.startDate, s.endDate)\n                    ? dpFmtISO(s.startDate)\n                    : `${dpFmtISO(s.startDate)} to ${dpFmtISO(s.endDate)}`;\n            } else display.value = '';\n        } else display.value = '';\n        closeDatePicker(inst);\n        fetchErrors(1); \/\/ reactive table refresh based on selected date \/ range\n    }\n\n    function dpClear(e, inst) {\n        if (e) e.stopPropagation();\n        const s = dpState[inst];\n        s.startDate = null; s.endDate = null; s.hoverDate = null;\n        document.getElementById(DP_IDS[inst].display).value = '';\n        const dropId = DP_IDS[inst].dropdown;\n        document.querySelectorAll(`#${dropId} .dp-preset-item`).forEach(el => el.classList.remove('active'));\n        dpRenderCalendar(inst); dpUpdateFooterRange(inst); closeDatePicker(inst);\n        fetchErrors(1); \/\/ reactive table refresh after date is cleared\n    }\n\n    function dpChangeMonth(e, dir, inst) {\n        e.stopPropagation();\n        const s = dpState[inst];\n        s.viewMonth += dir;\n        if (s.viewMonth > 11) { s.viewMonth = 0; s.viewYear++; }\n        if (s.viewMonth < 0) { s.viewMonth = 11; s.viewYear--; }\n        dpRenderCalendar(inst);\n    }\n\n    function toggleDatePicker(e, inst) {\n        e.stopPropagation();\n        const dd = document.getElementById(DP_IDS[inst].dropdown);\n        if (dd.classList.contains('open')) closeDatePicker(inst);\n        else {\n            const s = dpState[inst];\n            const ref = s.startDate || dpToday();\n            s.viewYear = ref.getFullYear(); s.viewMonth = ref.getMonth();\n            dpRenderCalendar(inst); dpUpdateFooterRange(inst);\n            dd.classList.add('open');\n            document.getElementById(DP_IDS[inst].backdrop).classList.add('show');\n            requestAnimationFrame(() => {\n                const rect = dd.getBoundingClientRect();\n                if (rect.right > window.innerWidth - 8) dd.classList.add('align-right');\n                else dd.classList.remove('align-right');\n            });\n        }\n    }\n\n    function closeDatePicker(inst) {\n        const dd = document.getElementById(DP_IDS[inst].dropdown);\n        const bd = document.getElementById(DP_IDS[inst].backdrop);\n        if (dd) dd.classList.remove('open');\n        if (bd) bd.classList.remove('show');\n    }\n\n    document.addEventListener('click', function (e) {\n        if (!e.target.closest('.custom-select-wrapper')) {\n            document.querySelectorAll('.custom-select-wrapper.open').forEach(w => w.classList.remove('open'));\n        }\n        if (!e.target.closest('.date-wrapper')) {\n            closeDatePicker('errdate');\n        }\n    });\n\n    loadDropdowns();\n    fetchErrors();\n\n    \/\/ \u2500\u2500 PHP parity: hide Action column for accounts executives \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n    (function applyRoleVisibility() {\n        if (!isAccountsExecutiveUser()) return;\n\n        const table = document.getElementById('errorTable');\n        const headerCells = table.querySelectorAll('thead tr th');\n        headerCells.forEach(th => {\n            if (th.textContent.trim() === 'Action') {\n                th.style.display = 'none';\n            }\n        });\n        hideActionCells();\n    })();\n\n    function hideActionCells() {\n        \/\/ Action <td> cells are identified by the data-row-id attribute\n        document.querySelectorAll('#tableBody td[data-row-id]').forEach(td => {\n            td.style.display = 'none';\n        });\n    }\n\n    \/\/ Patch renderTable so that after every re-render the column stays hidden\n    \/\/ for associate users without touching any other logic.\n    const _originalRenderTable = renderTable;\n    renderTable = function(data) {\n        _originalRenderTable(data);\n        if (isAccountsExecutiveUser()) {\n            hideActionCells();\n        }\n    };\n    \/\/ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n<\/script>\n<\/div><\/div>\n\n<\/div><\/div><\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>List View All Error (0) Assigned to File Name Account Entity Category Date Qc Submitted Today Yesterday Last 7 Days Last 30 Days This Month Last Month \u2039 \u203a Su Mo Tu We Th Fr Sa \u2039 \u203a Su Mo Tu We Th Fr Sa Select Date Range Cancel Apply Per Page Per Page10152550100 Type&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-206","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ph-portal-v2.zyneventures.com\/index.php\/wp-json\/wp\/v2\/pages\/206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ph-portal-v2.zyneventures.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ph-portal-v2.zyneventures.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ph-portal-v2.zyneventures.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ph-portal-v2.zyneventures.com\/index.php\/wp-json\/wp\/v2\/comments?post=206"}],"version-history":[{"count":49,"href":"https:\/\/ph-portal-v2.zyneventures.com\/index.php\/wp-json\/wp\/v2\/pages\/206\/revisions"}],"predecessor-version":[{"id":1233,"href":"https:\/\/ph-portal-v2.zyneventures.com\/index.php\/wp-json\/wp\/v2\/pages\/206\/revisions\/1233"}],"wp:attachment":[{"href":"https:\/\/ph-portal-v2.zyneventures.com\/index.php\/wp-json\/wp\/v2\/media?parent=206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}