{"id":12263,"date":"2026-03-22T06:01:13","date_gmt":"2026-03-22T14:01:13","guid":{"rendered":"https:\/\/botiscorp.com\/?page_id=12263"},"modified":"2026-09-07T04:43:50","modified_gmt":"2026-09-07T12:43:50","slug":"fleet-dashboard","status":"publish","type":"page","link":"https:\/\/botiscorp.com\/es\/fleet-dashboard\/","title":{"rendered":"Panel de flota"},"content":{"rendered":"  <style>\n  *{box-sizing:border-box;margin:0;padding:0;}\n  .dash-wrap{max-width:960px;margin:20px auto;padding:16px;font-family:Arial,sans-serif;}\n  .dash-header{background:#1A2F5A;color:white;border-radius:10px 10px 0 0;padding:20px 24px;display:flex;justify-content:space-between;align-items:center;}\n  .dash-header h1{font-size:20px;}\n  .dash-header p{font-size:12px;opacity:0.75;margin-top:2px;}\n  .refresh-btn{background:white;color:#1A2F5A;border:none;padding:8px 16px;border-radius:6px;font-size:13px;font-weight:700;cursor:pointer;}\n  .dash-body{background:white;border-radius:0 0 10px 10px;padding:20px;box-shadow:0 2px 8px rgba(0,0,0,0.08);}\n  .summary-bar{display:flex;gap:12px;margin-bottom:20px;flex-wrap:wrap;}\n  .summary-card{flex:1;min-width:100px;border-radius:8px;padding:14px 16px;text-align:center;}\n  .summary-card .count{font-size:32px;font-weight:900;line-height:1;}\n  .summary-card .label{font-size:11px;text-transform:uppercase;letter-spacing:0.06em;margin-top:4px;}\n  .card-total{background:#f0f4f8;color:#1A2F5A;}\n  .card-green{background:#dcfce7;color:#16a34a;}\n  .card-yellow{background:#fef9c3;color:#ca8a04;}\n  .card-red{background:#fee2e2;color:#dc2626;}\n  .filters{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap;}\n  .filters input,.filters select{padding:9px 12px;border:1px solid #d1d5db;border-radius:7px;font-size:13px;color:#111827;flex:1;min-width:140px;}\n  .dash-table{width:100%;border-collapse:collapse;font-size:13px;}\n  .dash-table th{background:#f8fafc;color:#6b7280;font-size:11px;text-transform:uppercase;letter-spacing:0.05em;padding:10px 12px;text-align:left;border-bottom:2px solid #e5e7eb;}\n  .dash-table td{padding:10px 12px;border-bottom:1px solid #f3f4f6;vertical-align:middle;}\n  .dash-table tr:hover td{background:#f9fafb;}\n  .eq-id{font-weight:700;color:#1A2F5A;}\n  .status-dot{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:12px;font-size:11px;font-weight:700;}\n  .dot-green{background:#dcfce7;color:#16a34a;}\n  .dot-yellow{background:#fef9c3;color:#ca8a04;}\n  .dot-red{background:#fee2e2;color:#dc2626;}\n  .view-btn{background:#1A2F5A;color:white;border:none;padding:5px 12px;border-radius:5px;font-size:12px;cursor:pointer;text-decoration:none;display:inline-block;}\n  .dash-loading{text-align:center;padding:40px;color:#6b7280;}\n  .dash-empty{text-align:center;padding:40px;color:#9ca3af;font-size:14px;}\n  <\/style>\n\n  <div class=\"dash-wrap\">\n    <div class=\"dash-header\">\n      <div>\n        <h1>Fleet Dashboard<\/h1>\n        <p id=\"dash-subtitle\">Boti's Corporation \u2014 Equipment Overview<\/p>\n      <\/div>\n      <button class=\"refresh-btn\" onclick=\"botisLoadDashboard()\">\u21bb Refresh<\/button>\n    <\/div>\n    <div class=\"dash-body\">\n      <div class=\"summary-bar\">\n        <div class=\"summary-card card-total\"><div class=\"count\" id=\"count-total\">\u2014<\/div><div class=\"label\">Total Units<\/div><\/div>\n        <div class=\"summary-card card-green\"><div class=\"count\" id=\"count-green\">\u2014<\/div><div class=\"label\">\u2705 Green<\/div><\/div>\n        <div class=\"summary-card card-yellow\"><div class=\"count\" id=\"count-yellow\">\u2014<\/div><div class=\"label\">\u26a0\ufe0f Yellow<\/div><\/div>\n        <div class=\"summary-card card-red\"><div class=\"count\" id=\"count-red\">\u2014<\/div><div class=\"label\">\ud83d\udd34 Red<\/div><\/div>\n      <\/div>\n      <div class=\"filters\">\n        <input type=\"text\" id=\"botis-search\" placeholder=\"Search by ID, make, model, serial...\" oninput=\"botisRenderTable()\" \/>\n        <select id=\"botis-filter-status\" onchange=\"botisRenderTable()\">\n          <option value=\"\">All Statuses<\/option>\n          <option value=\"green\">Green<\/option>\n          <option value=\"yellow\">Yellow<\/option>\n          <option value=\"red\">Red<\/option>\n        <\/select>\n        <select id=\"botis-filter-site\" onchange=\"botisRenderTable()\">\n          <option value=\"\">All Sites<\/option>\n        <\/select>\n      <\/div>\n      <div id=\"botis-dash-content\"><div class=\"dash-loading\">Loading fleet data...<\/div><\/div>\n    <\/div>\n  <\/div>\n\n  <script>\n  var botisAllEquipment = [];\n\n  function botisGetStatus(u) {\n    var s = (u['Inspection Status'] || '').toUpperCase();\n    var li = u['Last Inspection Date'] || '';\n    var nd = u['Next Inspection Due'] || '';\n    var today = new Date();\n    if (s === 'FAIL') return {level:'red',label:'FAIL',dot:'dot-red'};\n    var ld = li ? new Date(li) : null;\n    if (ld && !isNaN(ld) && (today - ld) \/ 86400000 > 90) return {level:'red',label:'Overdue',dot:'dot-red'};\n    if (!li || s === 'PENDING' || s === '') return {level:'yellow',label:'Pending',dot:'dot-yellow'};\n    if (nd) { var dd = new Date(nd); if (!isNaN(dd) && (dd-today)\/86400000 <= 30 && (dd-today)\/86400000 >= 0) return {level:'yellow',label:'Due Soon',dot:'dot-yellow'}; }\n    if (s === 'PASS') return {level:'green',label:'PASS',dot:'dot-green'};\n    return {level:'yellow',label:s||'Unknown',dot:'dot-yellow'};\n  }\n\n  function botisRenderTable() {\n    var search = (document.getElementById('botis-search').value || '').toLowerCase();\n    var sf = document.getElementById('botis-filter-status').value;\n    var site = document.getElementById('botis-filter-site').value;\n    var filtered = botisAllEquipment.filter(function(u) {\n      var ms = !search || (u.EquipmentID||'').toLowerCase().includes(search) || (u.Make||'').toLowerCase().includes(search) || (u.Model||'').toLowerCase().includes(search) || (u['Serial Number']||'').toLowerCase().includes(search);\n      var si = botisGetStatus(u);\n      return ms && (!sf || si.level === sf) && (!site || (u['Site Name']||u.SiteID||'') === site);\n    });\n    var g=0,y=0,r=0;\n    botisAllEquipment.forEach(function(u){var s=botisGetStatus(u).level;if(s==='green')g++;else if(s==='yellow')y++;else r++;});\n    document.getElementById('count-total').textContent = botisAllEquipment.length;\n    document.getElementById('count-green').textContent = g;\n    document.getElementById('count-yellow').textContent = y;\n    document.getElementById('count-red').textContent = r;\n    if (!filtered.length) { document.getElementById('botis-dash-content').innerHTML = '<div class=\"dash-empty\">No equipment found.<\/div>'; return; }\n    var rows = filtered.map(function(u) {\n      var si = botisGetStatus(u);\n      var li = u['Last Inspection Date'] || '\u2014';\n      if (li && li !== '\u2014') { var d = new Date(li); if (!isNaN(d)) li = (d.getMonth()+1)+'\/'+d.getDate()+'\/'+d.getFullYear(); }\n      return '<tr><td data-label=\"ID\"><span class=\"eq-id\">'+(u.EquipmentID||u.NumericID||'\u2014')+'<\/span><\/td><td data-label=\"Make\/Model\">'+(u.Make||'\u2014')+' '+(u.Model||'')+'<\/td><td data-label=\"Serial\">'+(u['Serial Number']||'\u2014')+'<\/td><td data-label=\"Site\">'+(u['Site Name']||u.SiteID||'\u2014')+'<\/td><td data-label=\"Customer\">'+(u['Company Name']||'\u2014')+'<\/td><td data-label=\"Status\"><span class=\"status-dot '+si.dot+'\">'+si.label+'<\/span><\/td><td data-label=\"Last Inspection\">'+li+'<\/td><td data-label=\"Action\"><a href=\"https:\/\/botiscorp.com\/equipment-portal\/?id='+u.NumericID+'\" class=\"view-btn\">View<\/a><\/td><\/tr>';\n    }).join('');\n    document.getElementById('botis-dash-content').innerHTML = '<table class=\"dash-table\"><thead><tr><th>Equipment ID<\/th><th>Make \/ Model<\/th><th>Serial<\/th><th>Site<\/th><th>Customer<\/th><th>Status<\/th><th>Last Inspection<\/th><th>Action<\/th><\/tr><\/thead><tbody>'+rows+'<\/tbody><\/table>';\n  }\n\n  function botisLoadDashboard() {\n    document.getElementById('botis-dash-content').innerHTML = '<div class=\"dash-loading\">Loading fleet data...<\/div>';\n    fetch('https:\/\/botiscorp.com\/es\/wp-json\/botis\/v1\/fleet')\n      .then(function(r){ return r.json(); })\n      .then(function(data) {\n        botisAllEquipment = data;\n        var sites = {};\n        data.forEach(function(u){ var s=u['Site Name']||u.SiteID||''; if(s) sites[s]=true; });\n        var sel = document.getElementById('botis-filter-site');\n        sel.innerHTML = '<option value=\"\">All Sites<\/option>';\n        Object.keys(sites).sort().forEach(function(s){ sel.innerHTML += '<option value=\"'+s+'\">'+s+'<\/option>'; });\n        botisRenderTable();\n      })\n      .catch(function(err){\n        document.getElementById('botis-dash-content').innerHTML = '<div class=\"dash-empty\">Error loading data: ' + err.message + '<\/div>';\n      });\n  }\n\n  document.addEventListener('DOMContentLoaded', function(){ botisLoadDashboard(); });\n  <\/script>\n  \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-12263","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Fleet Dashboard | BOTIS Corp<\/title>\n<meta name=\"robots\" content=\"noindex, nofollow\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fleet Dashboard | BOTIS Corp\" \/>\n<meta property=\"og:url\" content=\"https:\/\/botiscorp.com\/es\/fleet-dashboard\/\" \/>\n<meta property=\"og:site_name\" content=\"Boti&#039;s Corp\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-07T12:43:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/botiscorp.com\/wp-content\/uploads\/2025\/01\/Botis_Logo-e1736684009823.png\" \/>\n\t<meta property=\"og:image:width\" content=\"200\" \/>\n\t<meta property=\"og:image:height\" content=\"54\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/botiscorp.com\\\/fleet-dashboard\\\/\",\"url\":\"https:\\\/\\\/botiscorp.com\\\/fleet-dashboard\\\/\",\"name\":\"Fleet Dashboard | BOTIS Corp\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/botiscorp.com\\\/#website\"},\"datePublished\":\"2026-03-22T14:01:13+00:00\",\"dateModified\":\"2026-09-07T12:43:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/botiscorp.com\\\/fleet-dashboard\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/botiscorp.com\\\/fleet-dashboard\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/botiscorp.com\\\/fleet-dashboard\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/botiscorp.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fleet Dashboard\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/botiscorp.com\\\/#website\",\"url\":\"https:\\\/\\\/botiscorp.com\\\/\",\"name\":\"BOTIS Corp\",\"description\":\"Forklifts, Lifts &amp; Trailers for Sale &amp; Rent | BOTIS Corp\",\"publisher\":{\"@id\":\"https:\\\/\\\/botiscorp.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/botiscorp.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/botiscorp.com\\\/#organization\",\"name\":\"BOTIS Corp\",\"url\":\"https:\\\/\\\/botiscorp.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/botiscorp.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/botiscorp.com\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/logoW_botiscorp.png\",\"contentUrl\":\"https:\\\/\\\/botiscorp.com\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/logoW_botiscorp.png\",\"width\":2449,\"height\":758,\"caption\":\"BOTIS Corp\"},\"image\":{\"@id\":\"https:\\\/\\\/botiscorp.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fleet Dashboard | BOTIS Corp","robots":{"index":"noindex","follow":"nofollow"},"og_locale":"es_MX","og_type":"article","og_title":"Fleet Dashboard | BOTIS Corp","og_url":"https:\/\/botiscorp.com\/es\/fleet-dashboard\/","og_site_name":"Boti&#039;s Corp","article_modified_time":"2026-09-07T12:43:50+00:00","og_image":[{"width":200,"height":54,"url":"https:\/\/botiscorp.com\/wp-content\/uploads\/2025\/01\/Botis_Logo-e1736684009823.png","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/botiscorp.com\/fleet-dashboard\/","url":"https:\/\/botiscorp.com\/fleet-dashboard\/","name":"Fleet Dashboard | BOTIS Corp","isPartOf":{"@id":"https:\/\/botiscorp.com\/#website"},"datePublished":"2026-03-22T14:01:13+00:00","dateModified":"2026-09-07T12:43:50+00:00","breadcrumb":{"@id":"https:\/\/botiscorp.com\/fleet-dashboard\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/botiscorp.com\/fleet-dashboard\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/botiscorp.com\/fleet-dashboard\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/botiscorp.com\/"},{"@type":"ListItem","position":2,"name":"Fleet Dashboard"}]},{"@type":"WebSite","@id":"https:\/\/botiscorp.com\/#website","url":"https:\/\/botiscorp.com\/","name":"BOTIS Corp","description":"Forklifts, Lifts &amp; Trailers for Sale &amp; Rent | BOTIS Corp","publisher":{"@id":"https:\/\/botiscorp.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/botiscorp.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/botiscorp.com\/#organization","name":"BOTIS Corp","url":"https:\/\/botiscorp.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/botiscorp.com\/#\/schema\/logo\/image\/","url":"https:\/\/botiscorp.com\/wp-content\/uploads\/2025\/10\/logoW_botiscorp.png","contentUrl":"https:\/\/botiscorp.com\/wp-content\/uploads\/2025\/10\/logoW_botiscorp.png","width":2449,"height":758,"caption":"BOTIS Corp"},"image":{"@id":"https:\/\/botiscorp.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/botiscorp.com\/es\/wp-json\/wp\/v2\/pages\/12263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/botiscorp.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/botiscorp.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/botiscorp.com\/es\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/botiscorp.com\/es\/wp-json\/wp\/v2\/comments?post=12263"}],"version-history":[{"count":13,"href":"https:\/\/botiscorp.com\/es\/wp-json\/wp\/v2\/pages\/12263\/revisions"}],"predecessor-version":[{"id":12392,"href":"https:\/\/botiscorp.com\/es\/wp-json\/wp\/v2\/pages\/12263\/revisions\/12392"}],"wp:attachment":[{"href":"https:\/\/botiscorp.com\/es\/wp-json\/wp\/v2\/media?parent=12263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}