This commit is contained in:
parent
2699634e0f
commit
d48fdbf2e5
13 changed files with 217 additions and 10 deletions
6
src/game/90-actions/45-pni-list.js
Normal file
6
src/game/90-actions/45-pni-list.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// The PNI list's filter, sort and folded groups (#175, #172): view state only, never saved.
|
||||
Object.assign(ACT,{
|
||||
pniFilter:({f})=>{UI.pniF=['all','t','worth','pni'].includes(f)?f:'all';listReset('pni');renderPanel();},
|
||||
pniGrp:({g,o})=>{if(!PNI_GRP.includes(g))return;UI.pniOpen=UI.pniOpen||{};UI.pniOpen[g]=!!o;renderPanel();},
|
||||
pniSort:()=>{UI.pniSort=UI.pniSort==='az'?'worth':'az';renderPanel();},
|
||||
});
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Object.assign(ACT,{
|
||||
custGo:({id})=>{const b=S.biz.find(x=>x.id===id);if(!b)return;$('dash').hidden=true;ACT.focusCity({city:b.city});UI.tab='cust';renderPanel();},
|
||||
listMore:({k})=>{if(k!=='conn'&&k!=='cust'&&k!=='nets')return;UI.listN=UI.listN||{};UI.listN[k]=listN(k)+LIST_PAGE;if(k==='nets'){renderLeft();return;}renderDash();},
|
||||
listMore:({k})=>{if(k!=='conn'&&k!=='cust'&&k!=='nets'&&k!=='pni')return;UI.listN=UI.listN||{};UI.listN[k]=listN(k)+LIST_PAGE;if(k==='nets'){renderLeft();return;}if(k==='pni'){renderPanel();return;}renderDash();},
|
||||
custF:({v})=>{UI.kf=UI.kf||{};UI.kf.f=v==='sad'?'sad':'';listReset('cust');renderDash();},
|
||||
custCity:({v})=>{UI.kf=UI.kf||{};UI.kf.city=isCity(v)?v:'';listReset('cust');renderDash();},
|
||||
custSort:({k})=>{if(!['mood','mo','name','city'].includes(k))return;listReset('cust');if(UI.custSort===k)UI.custDir=-(UI.custDir||1);else{UI.custSort=k;UI.custDir=k==='mo'?-1:1;}renderDash();},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue