@@ -76,6 +76,43 @@ <h2>👨🔧 Request Expert Advice</h2>
7676 < footer style = "text-align: center; padding: 20px; font-size: 14px; color: #8b949e;" >
7777 < p > © 2026 Abdurhaman Mohammed | Dire Dawa, Ethiopia</ p >
7878 </ footer >
79+ < script >
80+ < section id = "admin-dashboard" style = "display:none; padding:80px 20px; background:#f0f2f5;" >
81+ < div class = "container" >
82+ < h2 style = "color:#1a1a1a;" > SBM Admin Dashboard</ h2 >
83+
84+ < div style = "display:flex; gap:20px; margin-bottom:30px;" >
85+ < div style = "background:#ff9900; color:#fff; padding:20px; border-radius:10px; flex:1;" >
86+ < h3 > Total Bookings</ h3 >
87+ < p id = "total-count" style = "font-size:2rem; font-weight:bold;" > 0</ p >
88+ </ div >
89+ < div style = "background:#222; color:#fff; padding:20px; border-radius:10px; flex:1;" >
90+ < h3 > Status</ h3 >
91+ < p style = "font-size:1.5rem;" > System Active</ p >
92+ </ div >
93+ </ div >
94+
95+ < div style = "overflow-x:auto; background:#fff; padding:20px; border-radius:10px; box-shadow:0 4px 10px rgba(0,0,0,0.1);" >
96+ < table style = "width:100%; border-collapse: collapse; text-align:left;" >
97+ < thead style = "background:#eee;" >
98+ < tr >
99+ < th style = "padding:12px;" > Date</ th >
100+ < th style = "padding:12px;" > Name</ th >
101+ < th style = "padding:12px;" > Machine/Issue</ th >
102+ </ tr >
103+ </ thead >
104+ < tbody id = "admin-table-body" >
105+ </ tbody >
106+ </ table >
107+ </ div >
108+ < button onclick = "logoutAdmin()" style = "margin-top:20px; background:red; color:white; border:none; padding:10px 20px; border-radius:5px; cursor:pointer;" > Logout</ button >
109+ </ div >
110+ </ section >
111+
112+ < div style = "text-align:center; padding:20px;" >
113+ < p onclick = "adminLogin()" style = "color:#ccc; cursor:pointer; font-size:0.8rem;" > Admin Login</ p >
114+ < / d i v >
115+ </ script >
79116 </ script >
80117< script >
81118 function checkMachineStatus ( ) {
@@ -147,14 +184,14 @@ <h2>👨🔧 Request Expert Advice</h2>
147184</ script >
148185 < Script >
149186async function submitToDatabase ( event ) {
150- event . preventDefault ( ) ; // Fuulli akka refresh hin taane
187+ event . preventDefault ( ) ; Fuulli akka refresh hin taane
151188
152189
153190 let name = document . getElementById ( 'name' ) . value ;
154191 let msg = document . getElementById ( 'msg' ) . value ;
155192
156193
157- const scriptURL = https :/ / script . google . com / macros / s / AKfycbyuBeTxVIg5gBJ0e5IRudXiqbwbNFKqcXtQMuGsiee_aFJzWBRvuKgem1kHRgWzHMtr / exec
194+ const scriptURL = https :script . google . com / macros / s / AKfycbyuBeTxVIg5gBJ0e5IRudXiqbwbNFKqcXtQMuGsiee_aFJzWBRvuKgem1kHRgWzHMtr / exec
158195
159196 let data = {
160197 name : name ,
@@ -166,7 +203,7 @@ <h2>👨🔧 Request Expert Advice</h2>
166203 3. Data gara Google Sheets erguu
167204 await fetch ( scriptURL , {
168205 method : 'POST' ,
169- mode : 'no-cors' , // Bilbilaaf murteessaadha
206+ mode : 'no-cors' , Bilbilaaf murteessaadha
170207 body : JSON . stringify ( data )
171208 } ) ;
172209
@@ -251,7 +288,7 @@ <h2>👨🔧 Request Expert Advice</h2>
251288</ script >
252289 < Script >
253290async function submitToDatabase ( event ) {
254- event . preventDefault ( ) ; // Fuulli akka refresh hin taane
291+ event . preventDefault ( ) ; Fuulli akka refresh hin taane
255292
256293 Data foomii irraa fuudhuu
257294 let name = document . getElementById ( 'name' ) . value ;
@@ -270,7 +307,7 @@ <h2>👨🔧 Request Expert Advice</h2>
270307 Data gara Google Sheets erguu
271308 await fetch ( scriptURL , {
272309 method : 'POST' ,
273- mode : 'no-cors' , // Bilbilaan yoo ta'e kana dabalachuu qabna
310+ mode : 'no-cors' , Bilbilaan yoo ta 'e kana dabalachuu qabna
274311 body : JSON . stringify ( data )
275312 } ) ;
276313
0 commit comments