This commit is contained in:
728
2023-03-08 23:55:38 +08:00
parent 6aa0e9b197
commit 075d31b8b6
2 changed files with 15 additions and 15 deletions

View File

@ -120,9 +120,9 @@ export function rolref(
t: HTMLParagraphElement,
u: Usr,
) {
if (u.aut) ida(t, [[`${u._id}`, `主义主义书记 (${u.ref.length}推荐)`]], "isec")
ida(t, u.aref.sec.map(([a, r]) => [`a${a}`, `${u.anam.get(a)}书记 (${r}推荐)`]), "sec")
ida(t, u.sref.sec.map(([a, r]) => [`s${a}`, `${u.snam.get(a)}书记 (${r}推荐)`]), "sec")
if (u.aut) ida(t, [[`${u._id}`, `主义主义管理员 (${u.ref.length}推荐)`]], "isec")
ida(t, u.aref.sec.map(([a, r]) => [`a${a}`, `${u.anam.get(a)}管理员 (${r}推荐)`]), "sec")
ida(t, u.sref.sec.map(([a, r]) => [`s${a}`, `${u.snam.get(a)}管理员 (${r}推荐)`]), "sec")
ida(t, u.aref.uid.map(([a, r]) => [`a${a}`, `${u.anam.get(a)}志愿者 (${r}推荐)`]), "uid")
ida(t, u.sref.uid.map(([a, r]) => [`s${a}`, `${u.snam.get(a)}志愿者 (${r}推荐)`]), "uid")
ida(t, u.aref.res.map(([a, r]) => [`a${a}`, `${u.anam.get(a)}申请人 (${r}推荐)`]), "res")
@ -143,7 +143,7 @@ export function rel(
t: Section["rel"],
d: Soc | Agd,
) {
label(t.sec, `书记${d.sec.length}/${lim_sec}`)
label(t.sec, `管理员${d.sec.length}/${lim_sec}`)
ida(t.sec, d.sec.map(r => [`${r}`, d.unam.get(r)!]))
label(t.uid, `志愿者:(${d.uid.length}/${d.uidlim}`)
ida(t.uid, d.uid.map(r => [`${r}`, d.unam.get(r)!]))
@ -260,13 +260,13 @@ export function putrel(
if (!nav.pas) { t.putrel.remove(); return }
const namid = new Map([...d.unam.entries()].map(([u, nam]) => [nam, u]))
if (d.ref.includes(nav.pas.uid)) btn(t.putsec, t.putsec.innerText, {
prompt1: "输入要增加或删除的书记名",
prompt1: "输入要增加或删除的管理员名",
pos: p1 => {
const uid = namid.get(p1 ?? "")
if (!uid) return null
return pos<DocU>("put", { [id]: d._id, rol: "sec", uid, add: !d.sec.includes(uid) })
},
alert: `无效书记名或书记已满\n增删的书记需先作为申请人或其它出现在${id === "sid" ? "社团" : "活动"}名单`,
alert: `无效管理员名或管理员已满\n增删的管理员需先作为申请人或其它出现在${id === "sid" ? "社团" : "活动"}名单`,
refresh: async () => { await navpas(); refresh() },
}); else t.putsec.remove() // deno-lint-ignore no-explicit-any
if (is_sec(nav.pas, { [id]: d._id } as any)) btn(t.putuid, t.putuid.innerText, {

View File

@ -49,7 +49,7 @@
<hr>
反对者达两名时,<em class="rej2">信息不公示</em><br>
推荐人达两名前,<em class="ref2">权限不可用</em><br>
书记有权限反对或推荐用户
管理员有权限反对或推荐用户
</section>
<hr>
<section>
@ -118,11 +118,11 @@
<hr>
反对者达两名时,<em class="rej2">信息不公示</em><br>
推荐人达两名前,<em class="ref2">权限不可用</em><br>
仅主义主义书记有权限反对或推荐社团
仅主义主义管理员有权限反对或推荐社团
</section>
<hr>
<section>
<label>书记</label>
<label>管理员</label>
<p class="sec"></p>
</section>
<hr>
@ -157,7 +157,7 @@
</section>
<hr>
<section class="putrel flex">
<button class="putsec">增删书记</button>
<button class="putsec">增删管理员</button>
<button class="putuid">增删志愿者</button>
<button class="putres">申请加入</button>
</section>
@ -185,7 +185,7 @@
<hr>
反对者达两名时,<em class="rej2">信息不公示</em><br>
推荐人达两名前,<em class="ref2">权限不可用</em><br>
仅主义主义书记有权限反对或推荐活动
仅主义主义管理员有权限反对或推荐活动
</section>
<hr>
<section class="cover flex">
@ -221,7 +221,7 @@
</section>
<hr>
<section>
<label>书记</label>
<label>管理员</label>
<p class="sec"></p>
</section>
<hr>
@ -255,7 +255,7 @@
</section>
<hr>
<section class="putrel flex">
<button class="putsec">增删书记</button>
<button class="putsec">增删管理员</button>
<button class="putuid">增删志愿者</button>
<button class="putres">申请加入</button>
</section>
@ -350,8 +350,8 @@
</section>
<hr>
<section class="meta">
以上基础信息仅主义主义书记可编辑<br>
以下内容信息仅社团活动书记可编辑
以上基础信息仅主义主义管理员可编辑<br>
以下内容信息仅社团活动管理员可编辑
</section>
<hr>
<section>