{"id":685,"date":"2025-09-17T20:49:24","date_gmt":"2025-09-17T20:49:24","guid":{"rendered":"https:\/\/truck.ctaindiaload.in\/?page_id=685"},"modified":"2025-09-18T20:42:30","modified_gmt":"2025-09-18T20:42:30","slug":"enterprises","status":"publish","type":"page","link":"https:\/\/truck.ctaindiaload.in\/?page_id=685","title":{"rendered":"Enterprises"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"685\" class=\"elementor elementor-685\">\n\t\t\t\t<div class=\"elementor-element elementor-element-132c9ab e-flex e-con-boxed e-con e-parent\" data-id=\"132c9ab\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0ccaf4a elementor-widget elementor-widget-html\" data-id=\"0ccaf4a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Enterprises - Booking<\/title>\n    <link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/6.4.2\/css\/all.min.css\">\n    <style>\n        :root {\n            --primary-color: #007bff;\n            --secondary-color: #28a745;\n            --text-color: #333;\n            --light-bg: #f8f9fa;\n            --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n            --delete-color: #dc3545;\n        }\n        body {\n            margin: 0;\n            font-family: 'Arial', sans-serif;\n            background: #fff;\n            color: var(--text-color);\n            overflow-x: hidden;\n            font-weight: 500;\n        }\n\n        \/* Top Navigation *\/\n        .top-nav {\n            position: fixed;\n            top: 0;\n            left: 0;\n            width: 100%;\n            background: #fff;\n            padding: 12px 15px;\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);\n            z-index: 1000;\n        }\n        .top-nav-title {\n            font-size: 1.4em;\n            margin: 0;\n            font-weight: 700;\n            color: var(--primary-color);\n            white-space: nowrap;\n            overflow: hidden;\n            text-overflow: ellipsis;\n            max-width: 70%;\n        }\n\n        .main-content {\n            margin-top: 60px;\n            margin-bottom: 70px;\n            padding: 15px;\n            min-height: calc(100vh - 130px);\n        }\n\n        .section { display: none; animation: fadeIn 0.5s ease-in; }\n        .section.active { display: block; }\n        @keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }\n\n        form {\n            background: white;\n            padding: 20px;\n            border-radius: 12px;\n            box-shadow: var(--card-shadow);\n            margin: 0 auto;\n        }\n        label { font-size: 1em; margin-bottom: 8px; display: block; font-weight: 600; }\n        input, select {\n            width: 100%; padding: 12px; margin-bottom: 15px;\n            border: 2px solid #ddd; border-radius: 8px; font-size: 1em;\n        }\n        button {\n            width: 100%; padding: 14px; background: var(--secondary-color);\n            color: white; border: none; border-radius: 8px; cursor: pointer;\n            font-size: 1.1em; font-weight: 700; margin-top: 10px;\n        }\n        button:hover { background: #218838; }\n\n        #history-list, #profile-details {\n            margin: 15px auto;\n        }\n\n        \/* Booking Card Design *\/\n        .booking-card {\n            background: #fff;\n            border-radius: 12px;\n            padding: 15px;\n            margin-bottom: 15px;\n            box-shadow: var(--card-shadow);\n            position: relative;\n        }\n        .booking-route {\n            font-size: 1.1em;\n            font-weight: 700;\n            color: var(--primary-color);\n            margin-bottom: 10px;\n        }\n        .booking-details {\n            font-size: 1em;\n            color: var(--text-color);\n            margin-bottom: 12px;\n        }\n        .booking-details strong {\n            font-size: 1.1em;\n            color: #000;\n        }\n        .booking-actions {\n            display: flex;\n            justify-content: flex-end;\n            gap: 15px;\n            margin-top: 10px;\n        }\n        .booking-actions i {\n            font-size: 1.4em;\n            cursor: pointer;\n            transition: transform 0.2s;\n        }\n        .booking-actions i:hover {\n            transform: scale(1.2);\n        }\n        .whatsapp-icon {\n            color: #25d366;\n        }\n        .delete-icon {\n            color: var(--delete-color);\n        }\n\n        \/* Bottom Navigation *\/\n        .bottom-nav {\n            position: fixed; bottom: 0; left: 0; width: 100%; background: #fff;\n            display: flex; justify-content: space-around; padding: 12px 0;\n            box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.15); z-index: 1000;\n        }\n        .bottom-nav-item {\n            text-align: center; cursor: pointer; color: #666; font-size: 0.9em;\n            font-weight: 600; padding: 5px 10px; border-radius: 8px;\n            display: flex; flex-direction: column; align-items: center;\n        }\n        .bottom-nav-item.active { color: var(--secondary-color); background-color: rgba(40, 167, 69, 0.1); }\n        .bottom-nav-icon { font-size: 1.4em; margin-bottom: 3px; }\n        h2 { font-weight: 700; color: var(--primary-color); font-size: 1.6em; margin-top: 0; }\n        \n        \/* Profile section styles *\/\n        .profile-detail {\n            margin-bottom: 15px;\n            padding-bottom: 15px;\n            border-bottom: 1px solid #eee;\n        }\n        .profile-detail:last-child {\n            border-bottom: none;\n        }\n        .edit-button {\n            background: var(--primary-color);\n            color: white;\n            border: none;\n            padding: 10px 15px;\n            border-radius: 6px;\n            cursor: pointer;\n            font-weight: 600;\n            margin-top: 15px;\n            width: auto;\n            display: inline-block;\n        }\n        .edit-button:hover {\n            background: #0069d9;\n        }\n    <\/style>\n<\/head>\n<body>\n    <!-- Top Navigation -->\n    <div class=\"top-nav\">\n        <h2 class=\"top-nav-title\" id=\"header-company-name\">Enterprises<\/h2>\n    <\/div>\n\n    <div class=\"main-content\">\n        <!-- Home Section -->\n        <div id=\"home\" class=\"section active\">\n            <form id=\"booking-form\">\n                <label for=\"loading-location\">Loading Location:<\/label>\n                <input type=\"text\" id=\"loading-location\" required>\n                <label for=\"unloading-location\">Unloading Location:<\/label>\n                <input type=\"text\" id=\"unloading-location\" required>\n                <label for=\"vehicle-type\">Vehicle Type:<\/label>\n                <select id=\"vehicle-type\" required>\n                    <option value=\"\">Select<\/option>\n                    <option value=\"Tata Ace\">Tata Ace<\/option>\n                    <option value=\"Pickup\">Pickup<\/option>\n                    <option value=\"14 Feet\">14 Feet<\/option>\n                    <option value=\"17 Feet\">17 Feet<\/option>\n                <\/select>\n                <label for=\"body-type\">Body Type:<\/label>\n                <select id=\"body-type\" required>\n                    <option value=\"\">Select<\/option>\n                    <option value=\"Open\">Open<\/option>\n                    <option value=\"Container\">Container<\/option>\n                <\/select>\n                <label for=\"weight\">Weight (in kg):<\/label>\n                <input type=\"number\" id=\"weight\" required>\n                <label for=\"fare\">Fare (in rupees):<\/label>\n                <input type=\"number\" id=\"fare\" required>\n                <label for=\"call-number\">Direct Call Number:<\/label>\n                <input type=\"tel\" id=\"call-number\" required>\n                <button type=\"submit\">Post<\/button>\n            <\/form>\n        <\/div>\n\n        <!-- History Section -->\n        <div id=\"history\" class=\"section\">\n            <h2>Booking History<\/h2>\n            <div id=\"history-list\"><\/div>\n        <\/div>\n\n        <!-- Profile Section -->\n        <div id=\"profile\" class=\"section\">\n            <h2>Update Profile<\/h2>\n            <form id=\"profile-form\">\n                <label for=\"company-name\">Company Name:<\/label>\n                <input type=\"text\" id=\"company-name\" required>\n                <label for=\"owner-name\">Owner Name:<\/label>\n                <input type=\"text\" id=\"owner-name\" required>\n                <label for=\"gst-number\">GST Number:<\/label>\n                <input type=\"text\" id=\"gst-number\" required>\n                <label for=\"mobile-number\">Mobile Number:<\/label>\n                <input type=\"tel\" id=\"mobile-number\" required>\n                <button type=\"submit\">Update<\/button>\n            <\/form>\n            <div id=\"profile-details\">\n                <h3>Complete Profile<\/h3>\n                <div class=\"profile-detail\">\n                    <p id=\"profile-company\"><strong>Company Name:<\/strong> Not set<\/p>\n                <\/div>\n                <div class=\"profile-detail\">\n                    <p id=\"profile-owner\"><strong>Owner Name:<\/strong> Not set<\/p>\n                <\/div>\n                <div class=\"profile-detail\">\n                    <p id=\"profile-gst\"><strong>GST Number:<\/strong> Not set<\/p>\n                <\/div>\n                <div class=\"profile-detail\">\n                    <p id=\"profile-mobile\"><strong>Mobile Number:<\/strong> Not set<\/p>\n                <\/div>\n                <button class=\"edit-button\" onclick=\"editProfile()\">Edit<\/button>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <!-- Bottom Navigation -->\n    <div class=\"bottom-nav\">\n        <div class=\"bottom-nav-item active\" onclick=\"switchTab('home', event)\">\n            <i class=\"fas fa-home bottom-nav-icon\"><\/i><span>Home<\/span>\n        <\/div>\n        <div class=\"bottom-nav-item\" onclick=\"switchTab('history', event)\">\n            <i class=\"fas fa-history bottom-nav-icon\"><\/i><span>History<\/span>\n        <\/div>\n        <div class=\"bottom-nav-item\" onclick=\"switchTab('profile', event)\">\n            <i class=\"fas fa-user bottom-nav-icon\"><\/i><span>Profile<\/span>\n        <\/div>\n    <\/div>\n\n    <script>\n        function switchTab(tabId, event) {\n            document.querySelectorAll('.section').forEach(s => s.classList.remove('active'));\n            document.getElementById(tabId).classList.add('active');\n            document.querySelectorAll('.bottom-nav-item').forEach(i => i.classList.remove('active'));\n            if (event) event.currentTarget.classList.add('active');\n            if (tabId === 'history') renderHistory();\n            else if (tabId === 'profile') renderProfile();\n        }\n\n        let bookings = JSON.parse(localStorage.getItem('bookings')) || [];\n        let profile = JSON.parse(localStorage.getItem('profile')) || {};\n\n        \/\/ Update header with company name\n        function updateHeader() {\n            const headerElement = document.getElementById('header-company-name');\n            if (profile.company && profile.company.trim() !== '') {\n                headerElement.textContent = profile.company;\n            } else {\n                headerElement.textContent = 'Enterprises';\n            }\n        }\n\n        function renderHistory() {\n            const historyList = document.getElementById('history-list');\n            historyList.innerHTML = '';\n            if (bookings.length === 0) {\n                historyList.innerHTML = '<p style=\"text-align:center;padding:20px;\">No bookings yet<\/p>';\n                return;\n            }\n            bookings.slice().reverse().forEach((booking, index) => {\n                const originalIndex = bookings.length - 1 - index;\n                const item = document.createElement('div');\n                item.classList.add('booking-card');\n                item.innerHTML = `\n                    <div class=\"booking-route\">\ud83d\udccd ${booking.loading} \u2192 ${booking.unloading}<\/div>\n                    <div class=\"booking-details\">\n                        <p><strong>Vehicle:<\/strong> ${booking.vehicle} (${booking.bodyType})<\/p>\n                        <p><strong>Weight:<\/strong> ${booking.weight} kg<\/p>\n                        <p><strong>Fare:<\/strong> \u20b9${booking.fare}<\/p>\n                        <p><strong>Call:<\/strong> ${booking.call}<\/p>\n                        <p style=\"font-size:0.9em; color:#777;\"><em>\ud83d\udcc5 ${booking.dateTime}<\/em><\/p>\n                    <\/div>\n                    <div class=\"booking-actions\">\n                        <i class=\"fab fa-whatsapp whatsapp-icon\" \n                           onclick=\"shareWhatsApp(${originalIndex})\" title=\"Share on WhatsApp\"><\/i>\n                        <i class=\"fas fa-trash-alt delete-icon\" \n                           onclick=\"deleteBooking(${originalIndex})\" title=\"Delete\"><\/i>\n                    <\/div>\n                `;\n                historyList.appendChild(item);\n            });\n        }\n\n        function deleteBooking(index) {\n            if (confirm('Are you sure you want to delete this booking?')) {\n                bookings.splice(index, 1);\n                localStorage.setItem('bookings', JSON.stringify(bookings));\n                renderHistory();\n            }\n        }\n\n        function shareWhatsApp(index) {\n            const booking = bookings[index];\n            const text = `\ud83d\ude9a Booking Details:%0A\n\ud83d\udccd ${booking.loading} \u2192 ${booking.unloading}%0A\n\ud83d\ude97 Vehicle: ${booking.vehicle} (${booking.bodyType})%0A\n\u2696\ufe0f Weight: ${booking.weight} kg%0A\n\ud83d\udcb0 Fare: \u20b9${booking.fare}%0A\n\ud83d\udcde Call: ${booking.call}%0A\n\ud83d\udcc5 Posted on: ${booking.dateTime}`;\n            const url = `https:\/\/wa.me\/?text=${text}`;\n            window.open(url, '_blank');\n        }\n\n        document.getElementById('booking-form').addEventListener('submit', (e) => {\n            e.preventDefault();\n            const booking = {\n                loading: document.getElementById('loading-location').value,\n                unloading: document.getElementById('unloading-location').value,\n                vehicle: document.getElementById('vehicle-type').value,\n                bodyType: document.getElementById('body-type').value,\n                weight: document.getElementById('weight').value,\n                fare: document.getElementById('fare').value,\n                call: document.getElementById('call-number').value,\n                dateTime: new Date().toLocaleString()\n            };\n            bookings.push(booking);\n            localStorage.setItem('bookings', JSON.stringify(bookings));\n            alert('Booking posted successfully! \u2705');\n            e.target.reset();\n            switchTab('history');\n        });\n\n        function renderProfile() {\n            document.getElementById('profile-company').innerHTML = `<strong>Company Name:<\/strong> ${profile.company || 'Not set'}`;\n            document.getElementById('profile-owner').innerHTML = `<strong>Owner Name:<\/strong> ${profile.owner || 'Not set'}`;\n            document.getElementById('profile-gst').innerHTML = `<strong>GST Number:<\/strong> ${profile.gst || 'Not set'}`;\n            document.getElementById('profile-mobile').innerHTML = `<strong>Mobile Number:<\/strong> ${profile.mobile || 'Not set'}`;\n            \n            \/\/ Update the header with company name\n            updateHeader();\n        }\n\n        function editProfile() {\n            \/\/ Fill the form with existing profile data\n            document.getElementById('company-name').value = profile.company || '';\n            document.getElementById('owner-name').value = profile.owner || '';\n            document.getElementById('gst-number').value = profile.gst || '';\n            document.getElementById('mobile-number').value = profile.mobile || '';\n            \n            \/\/ Scroll to the form\n            document.getElementById('profile-form').scrollIntoView({ behavior: 'smooth' });\n        }\n\n        document.getElementById('profile-form').addEventListener('submit', (e) => {\n            e.preventDefault();\n            profile = {\n                company: document.getElementById('company-name').value,\n                owner: document.getElementById('owner-name').value,\n                gst: document.getElementById('gst-number').value,\n                mobile: document.getElementById('mobile-number').value,\n            };\n            \n            localStorage.setItem('profile', JSON.stringify(profile));\n            renderProfile();\n            alert('Profile updated successfully! \u2705');\n        });\n\n        \/\/ Initialize profile on first load\n        document.addEventListener('DOMContentLoaded', function() {\n            renderProfile();\n        });\n    <\/script>\n<\/body>\n<\/html>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Enterprises &#8211; Booking Enterprises Loading Location: Unloading Location: Vehicle Type: SelectTata AcePickup14 Feet17 Feet Body Type: SelectOpenContainer Weight (in kg): [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-685","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/truck.ctaindiaload.in\/index.php?rest_route=\/wp\/v2\/pages\/685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truck.ctaindiaload.in\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/truck.ctaindiaload.in\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/truck.ctaindiaload.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truck.ctaindiaload.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=685"}],"version-history":[{"count":46,"href":"https:\/\/truck.ctaindiaload.in\/index.php?rest_route=\/wp\/v2\/pages\/685\/revisions"}],"predecessor-version":[{"id":874,"href":"https:\/\/truck.ctaindiaload.in\/index.php?rest_route=\/wp\/v2\/pages\/685\/revisions\/874"}],"wp:attachment":[{"href":"https:\/\/truck.ctaindiaload.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}