From 1158d0a384651b0b08773e19943fe64b5d789a22 Mon Sep 17 00:00:00 2001 From: unimatrix Date: Tue, 17 Nov 2026 21:29:10 +0000 Subject: [PATCH] Use shared illustrated cards for organisation Exchange panels --- .../control-panel/public/cp-v2/cp-v2-jarvis-recruitment.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/control-panel/public/cp-v2/cp-v2-jarvis-recruitment.mjs b/website/control-panel/public/cp-v2/cp-v2-jarvis-recruitment.mjs index 66bcc55b..f875f1df 100644 --- a/website/control-panel/public/cp-v2/cp-v2-jarvis-recruitment.mjs +++ b/website/control-panel/public/cp-v2/cp-v2-jarvis-recruitment.mjs @@ -14,9 +14,10 @@ export function mountJarvisRecruitment({mine,post,applications,promotions,banner catch(error){if(!active)return;banner.textContent=error.message;eligibility.textContent='Organisation authority could not be confirmed. Publishing remains unavailable.';for(const host of [mine,post,applications,promotions])host.replaceChildren(el('p',error.message));} } function renderOrganisationContext(){ + for(const host of [mine,post,applications,promotions])host.classList.add('jarvis-listing-card'); const company=context.kind==='company',noun=company?'Company':'Political House';banner.textContent='J.A.R.V.I.S. · '+context.name;eligibility.textContent=company?'Company management · verified founder or CEO.':'Current office deed · membership follows the election register.'; renderMine();post.replaceChildren(el('h3',noun+' listings'),el('p',context.publishingReason));applications.replaceChildren(el('h3',noun+' applications'),el('p',context.applicationReason));promotions.replaceChildren(el('h3','Promotions & delivery'),el('p','Promotions become available with supported organisation listings. No fee or credit is charged.')); - for(const [host,key,label]of [[post,'settings','Open organisation settings →'],[applications,'elections','Open elections →']])if(context.links?.[key]){const a=el('a',label);a.href=context.links[key];host.append(a);} + for(const [host,key,label]of [[post,'settings','Open organisation settings →'],[applications,'elections','Open elections →']])if(context.links?.[key]){const a=el('a',label,'jarvis-action');a.href=context.links[key];host.append(a);} if(context.officeDeed){const box=el('dl');for(const [name,value]of [['Authority','Current office deed'],['Term ends',new Date(context.officeDeed.expiresAt).toLocaleString('en-GB')]])box.append(el('dt',name),el('dd',value));applications.append(box);} } function renderMine(){mine.replaceChildren(el('h3',context.kind==='clan'?'My recruitment listings':'My organisation listings'));const {wrap,body}=table(['Listing','State','Publishing fee','Action']);for(const listing of context.listings){const row=el('tr'),controls=el('td');if(listing.state==='open'&&context.canPublish)controls.append(action('Close listing',async()=>{if(busy||!await confirmAction('Close this listing?','The advertisement will be removed. An incurred publishing fee remains payable.'))return;busy=true;try{await request('/api/jarvis/cancel',{id:listing.id,revision:listing.revision});await refresh(true);}catch(error){banner.textContent=error.message;}finally{busy=false;}}));row.append(el('td',listing.title),el('td',listing.state),el('td',listing.feeMinor?amount(listing.feeMinor):'Free'),controls);body.append(row);}if(!context.listings.length){const row=el('tr'),cell=el('td','No listings have been published.');cell.colSpan=4;row.append(cell);body.append(row);}mine.append(wrap);}