{"id":7,"date":"2026-04-05T22:16:52","date_gmt":"2026-04-05T22:16:52","guid":{"rendered":"https:\/\/kontractz.online\/?page_id=7"},"modified":"2026-04-05T22:16:52","modified_gmt":"2026-04-05T22:16:52","slug":"member-dashboard","status":"publish","type":"page","link":"https:\/\/kontractz.online\/?page_id=7","title":{"rendered":"Member Dashboard"},"content":{"rendered":"<link href=\"https:\/\/cdn.jsdelivr.net\/npm\/tailwindcss@2.2.19\/dist\/tailwind.min.css\" rel=\"stylesheet\">\n<script src=\"https:\/\/unpkg.com\/alpinejs\" defer><\/script>\n\n<div x-data=\"{tab:'dashboard'}\" class=\"flex h-screen\">\n\n<div class=\"w-64 bg-gray-800 text-white p-4\">\n<h2 class=\"text-xl mb-4\">Kontractz<\/h2>\n<button @click=\"tab='dashboard'\">Dashboard<\/button><br>\n<button @click=\"tab='rfq'\">RFQ<\/button><br>\n<button @click=\"tab='chat'\">Chat<\/button><br>\n<button @click=\"tab='escrow'\">Escrow<\/button><br>\n<button @click=\"tab='dispute'\">Dispute<\/button>\n<\/div>\n\n<div class=\"flex-1 p-4\">\n\n<div x-show=\"tab==='dashboard'\"><h1>Welcome<\/h1><\/div>\n\n<div x-show=\"tab==='rfq'\">\n<input id=\"title\" class=\"border p-2\">\n<button onclick=\"createRFQ()\">Submit RFQ<\/button>\n<\/div>\n\n<div x-show=\"tab==='chat'\">\n<div id=\"chat\"><\/div>\n<input id=\"msg\">\n<button onclick=\"sendMsg()\">Send<\/button>\n<\/div>\n\n<div x-show=\"tab==='escrow'\">\n<button onclick=\"release()\">Release Payment<\/button>\n<\/div>\n\n<div x-show=\"tab==='dispute'\">\n<input id=\"reason\" placeholder=\"Reason\">\n<button onclick=\"dispute()\">Submit Dispute<\/button>\n<\/div>\n\n<\/div>\n<\/div>\n\n<script>\nconst ajaxurl='\/wp-admin\/admin-ajax.php';\nconst nonce='f707f6a5f1';\n\nfunction createRFQ(){\nfetch(ajaxurl,{method:'POST',body:new URLSearchParams({\naction:'ktz_action',ktz_action:'create_rfq',title:document.getElementById('title').value,_wpnonce:nonce\n})});\n}\n\nfunction sendMsg(){\nfetch(ajaxurl,{method:'POST',body:new URLSearchParams({\naction:'ktz_action',ktz_action:'send_message',rfq_id:1,receiver_id:1,message:document.getElementById('msg').value,_wpnonce:nonce\n})});\n}\n\nfunction release(){\nfetch(ajaxurl,{method:'POST',body:new URLSearchParams({\naction:'ktz_action',ktz_action:'release_payment',order_id:1,_wpnonce:nonce\n})});\n}\n\nfunction dispute(){\nfetch(ajaxurl,{method:'POST',body:new URLSearchParams({\naction:'ktz_action',ktz_action:'create_dispute',order_id:1,reason:document.getElementById('reason').value,_wpnonce:nonce\n})});\n}\n\nsetInterval(()=>{\nfetch(ajaxurl,{method:'POST',body:new URLSearchParams({\naction:'ktz_action',ktz_action:'get_messages',_wpnonce:nonce\n})})\n.then(r=>r.json())\n.then(d=>{\ndocument.getElementById('chat').innerHTML=d.map(m=>'<p>'+m.message+'<\/p>').join('');\n});\n},3000);\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-7","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/kontractz.online\/index.php?rest_route=\/wp\/v2\/pages\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kontractz.online\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kontractz.online\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kontractz.online\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kontractz.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"}],"version-history":[{"count":1,"href":"https:\/\/kontractz.online\/index.php?rest_route=\/wp\/v2\/pages\/7\/revisions"}],"predecessor-version":[{"id":9,"href":"https:\/\/kontractz.online\/index.php?rest_route=\/wp\/v2\/pages\/7\/revisions\/9"}],"wp:attachment":[{"href":"https:\/\/kontractz.online\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}