PageSourceSearch

https://bttlgrnd.com/VAADIN/build/cadmin-people-staff-one-CTJthCsn.js

js bttlgrnd.com collected 2026-10-10 02:01:13 UTC 13,849 bytes, 188 lines download raw bytes

1import{C as b}from"./cadmin-base-D1Atg8vc.js";import{n as u,aw as m,dW as k,k as t,m as a,R as v,A as _,aS as w,df as S,x as d,r as M,s as l,Q as A,U as r,d$ as x,dX as I,dY as C,dd as j,de as O,dU as T,e0 as y,dV as V,e1 as J,e3 as R,l as o,e4 as D,dZ as P,d_ as B,ep as z,a$ as H,d as L,au as N,a as W,t as $,y as K,e as U}from"./indexhtml-DernGyVj.js";import{s as E,a as q,b as Q}from"./EndpointCompStaff-C7Zos1eu.js";import"./oum-dialog-confirm-BDhyA_P0.js";import"./cadmin-people-staff-details-BJMomFC8.js";var X=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,p=(i,e,s,h)=>{for(var n=h>1?void 0:h?Y(e,s):e,g=i.length-1,f;g>=0;g--)(f=i[g])&&(n=(h?f(e,s,n):f(n))||n);return h&&n&&X(e,s,n),n};let c=class extends b{constructor(){super(...arguments),this.tab="settings",this.askRemove=!1}loadData(){u.detailKey?m.currentOne?.id?.id===u.detailKey?this.data=m.currentOne:k(t.compMainId(),u.detailKey).then(i=>this.data=i):(console.log("no detailKey => no data.."),this.data=void 0)}renderTop(){return d`
2            <flex-c style="width:100%">
3                <flex-r style="align-items:center;gap:var(--space-l);padding:var(--space-sm) var(--space-sm) 0 var(--space-sm);width:100%">
4                    <wa-button appearance="plain"
5                               aria-label="Back"
6                               @click=${()=>{m.setCurrentOne(void 0),v.showCAdmin("cadmin-people","staffs")}}>
7                        <wa-icon name="reply" label="Back"></wa-icon>
8                    </wa-button>
9                    <h3 style="flex:1">${this.data?.id?.name.replace(";"," ")??"Noname"}</h3>
10                    <wa-button appearance="${_.mobile?"plain":"filled"}"
11                               @click="${()=>{this.data?.supportDiscussion?w.select(this.data?.supportDiscussion,S.Standard):this.data&&w.selectSupportOrganizerByPerson(this.data.id.id,m.dataMain.id.id),w.setActive(!0)}}">
12                        <wa-icon name="comment" label="Chat"></wa-icon>
13                    </wa-button>
14                </flex-r>
15                <wa-tab-group style="flex:1;width:100%">
16                    <wa-tab ?active=${this.tab=="settings"} @click="${()=>this.tab="settings"}">
17                        ${a("Settings")}
18                    </wa-tab>
19                    <wa-tab ?active=${this.tab=="other"} @click="${()=>this.tab="other"}">
20                        ${a("Other assignments")}
21                    </wa-tab>
22                    <wa-tab ?active=${this.tab=="notes"} @click="${()=>this.tab="notes"}">
23                        ${a("Internal notes (only seen by your organization)")}
24                    </wa-tab>
25                </wa-tab-group>
26        `}renderContent(){return d`
27            ${M(this.tab,[["settings",()=>this.renderSettings()],["other",()=>this.renderOther()],["notes",()=>this.renderNotes()]],()=>d``)}
28            ${this.renderRemove()}
29        `}renderRemove(){return this.askRemove?d`
30            <oum-dialog-confirm
31                    .message="${a(l`Really remove ${this.data.id.name}?`)}"
32                    .okName="${a("Remove")}"
33                    @cancel="${()=>this.askRemove=!1}"
34                    @ok="${()=>this.doRemoveJudge()}">
35            </oum-dialog-confirm>
36        `:null}renderSettings(){return d`
37            <design-centered style="flex:1;padding:var(--space-sl)">
38                <cadmin-people-staff-details .data=${this.data}
39                                             .showOpen="${!1}"
40                                             style="margin:var(--space-m) auto">
41                </cadmin-people-staff-details>
42                <oum-panel .mainTitle="${a("Pseudonym")}"
43                           .subTitle="${this.data?.pseudonym?this.data.pseudonym:a("No pseudonym set")}">
44                    <flex-r slot="content"
45                            style="padding:var(--space-sl)">
46                        <wa-input appearance="filled"
47                                  value="${this.data?.pseudonym??""}"
48                                  @change=${i=>{console.log("changing pseudonym to ",i.target.value,t.dataMain.id.id.id,this.data.id.id.id),i.stopPropagation();const e=i.target.value.trim();E(t.dataMain.id.id.id,this.data.id.id.id,e).then(()=>{A(()=>{this.data.pseudonym=e,this.requestUpdate("data"),console.log("pseudonym changed",this.data.pseudonym)})})}}
49                                  style="flex:1">
50                        </wa-input>
51                    </flex-r>
52                </oum-panel>
53
54            </design-centered>
55        `}renderSettingsOld(){if(!this.data)return r.loadingHtml();const i=e=>{o.isAdminOf(e)&&o.reload(()=>{})};return d`
56            <div style="display:block;flex:1;overflow-y:auto;padding:var(--space-ml)">
57                <flex-c class="d-card" style="gap:var(--space-m);margin:auto;max-width:var(--desktop-center-width-small);padding:var(--space-m)">
58                    <wa-switch
59                            ?checked=${this.data.admin}
60                            aria-label="Administrator"
61                            @change=${e=>{e.target.checked?j(t.compMainId(),this.data.id.id.id):this.data.adminThroughOrganizer?(r.showMessage(a(l`This person is an admin through the organizer and cannot be removed as an admin here.`)),e.target.checked=!0):O(t.compMainId(),this.data.id.id.id),this.data.admin=e.target.checked}}>
62                        ${a("Administrator")}
63                    </wa-switch>
64                    <wa-switch ?checked=${this.data.judge}
65                               aria-label="Judge"
66                               @change=${e=>{e.target.checked?T(t.compMainId(),this.data.id.id.id).then(()=>{i(this.data.id.id)}):y(t.compMainId(),this.data.id.id.id).then(()=>{i(this.data.id.id)}),this.data.judge=e.target.checked}}>
67                        ${a("Judge")}
68                    </wa-switch>
69                    <wa-switch
70                            ?checked=${this.data.volunteer}
71                            aria-label="Volunteer"
72                            @change=${e=>{e.target.checked?V(t.compMainId(),this.data.id.id.id).then(()=>{i(this.data.id.id)}):J(t.compMainId(),this.data.id.id.id).then(()=>{i(this.data.id.id)}),this.data.volunteer=e.target.checked}}>
73                        ${a("Volunteer")}
74                    </wa-switch>
75                    ${this.data.admin||!this.data.judge?null:d`
76                        <wa-switch
77                                id="verified-switch-what"
78                                ?checked=${this.data?.verifiedJudgeByWhat??!1}
79                                aria-label="Verified"
80                                @change=${e=>R(t.compMainId(),this.data.id.id.id,e.currentTarget.checked?1:0)}>
81                            ${a("Judge")+" • "+a("Verified by organizer")}
82                        </wa-switch>
83                        <wa-switch
84                                id="verified-switch-who"
85                                ?checked=${this.data?.verifiedJudgeByWho??!1}
86                                ?disabled=${!o.isSiteAdmin()}
87                                aria-label="Verified"
88                                @change=${e=>{q(t.compMainId(),this.data.id.id.id,e.currentTarget.checked?1:0)}}>
89                            ${a("Judge")+" • "+a("Verified by person")}
90                            ${o.isSiteAdmin()?"(Only editable by SiteAdmin)":null}
91                        </wa-switch>
92                    `}
93                    ${this.data.admin||!this.data.volunteer?null:d`
94                        <wa-switch
95                                id="verified-switch-what"
96                                ?checked=${this.data?.verifiedJudgeByWhat??!1}
97                                aria-label="Verified"
98                                @change=${e=>D(t.compMainId(),this.data.id.id.id,e.currentTarget.checked?1:0)}>
99                            ${a("Volunteer")+" • "+a("Verified by organizer")}
100                        </wa-switch>
101                        <wa-switch
102                                id="verified-switch-who"
103                                ?checked=${this.data?.verifiedJudgeByWho??!1}
104                                ?disabled=${!o.isSiteAdmin()}
105                                aria-label="Verified"
106                                @change=${e=>{Q(t.compMainId(),this.data.id.id.id,e.currentTarget.checked?1:0)}}>
107                            ${a("Volunteer")+" • "+a("Verified by person")}
108                            ${o.isSiteAdmin()?"(Only editable by SiteAdmin)":null}
109                        </wa-switch>
110                    `}
111                    <wa-switch
112                            ?checked=${this.data.admin||this.data.allowResultEditing}
113                            aria-label="Allowed to use full results editor"
114                            @change=${e=>{this.data.admin?(r.showMessage(a(l`Admins are always allowed to use ${a("Live scoring")}`)),e.target.checked=!0):P(t.compMainId(),this.data.id.id.id,e.currentTarget.checked)}}>
115                        ${a("Allowed to access full results editor")}
116                    </wa-switch>
117                    <wa-switch
118                            id="live-switch"
119                            ?checked=${this.data.admin||this.data.allowLiveScoring}
120                            aria-label="Allowed to use LiveScoring app"
121                            @change=${e=>{this.data.admin?(r.showMessage(a(l`Admins are always allowed to use ${a("Live scoring")}`)),e.target.selected=!0):B(t.compMainId(),this.data.id.id.id,e.currentTarget.checked)}}>
122                        ${a("Allowed to use LiveScoring app")}
123                    </wa-switch>
124                    ${this.data.admin||this.data.judge?d`
125                        <wa-switch
126                                ?checked=${this.data?.headJudge??!1}
127                                aria-label="Head judge"
128                                @change=${e=>z(t.compMainId(),this.data.id.id.id,e.currentTarget.checked)}>
129                            ${a("Head judge")}
130                        </wa-switch>
131                    `:null}
132                    <wa-switch
133                            id="ticket-switch"
134                            ?checked=${this.data?.ticketApp??!1}
135                            aria-label="Allowed to use Ticket App"
136                            @change=${e=>x(t.compMainId(),this.data.id.id.id,e.currentTarget.checked)}>
137                        ${a("Allowed to use Ticket App")}
138                    </wa-switch>
139                    <wa-switch
140                            id="speaker-switch"
141                            ?checked=${this.data?.speaker??!1}
142                            aria-label="Speaker"
143                            @change=${e=>I(t.compMainId(),this.data.id.id.id,e.currentTarget.checked)}>
144                        ${a("Speaker",{id:"speaker_person"})}
145                    </wa-switch>
146                    <wa-switch
147                            id="medical-switch"
148                            ?checked=${this.data?.medicalStaff??!1}
149                            aria-label="Medical staff"
150                            @change=${e=>C(t.compMainId(),this.data.id.id.id,e.currentTarget.checked)}>
151                        ${a("Medical staff")}
152                    </wa-switch>
153                </flex-c>
154            </div>
155        `}renderOther(){if(!this.data)return r.loadingHtml();let i=0,e=0;return this.data.judge&&(i+=this.data.judgedCompetitions?.length??0,e++),this.data.volunteer&&(i+=this.data.volunteeredCompetitions?.length??0,e++),this.data.grapher&&(i+=this.data.graphedCompetitions?.length??0,e++),d`
156            <div style="display:block;flex:1;overflow-y:auto">
157                ${i==0?d`
158                    <flex-r style="justify-content:center;padding:var(--space-l);width:100%">
159                        <flex-c id="cadmin-content" class="d-card">
160                            ${a(l`${this.data.id.name.replace(";"," ")} is not connected to any other competitions.`)}
161                        </flex-c>
162                    </flex-r>
163                `:d`
164                    <flex-c style="align-items:center;gap:var(--space-m);width:100%">
165                        ${e>1&&this.data.judgedCompetitions?.length?d`<h2>${a("Judge")}</h2>`:null}
166                        ${this.data.judgedCompetitions?.map(s=>d`
167                            <card-competition-main .data=${s}></card-competition-main>`)}
168                        ${e>1&&this.data.volunteeredCompetitions?.length?d`<h2>${a("Volunteer")}</h2>`:null}
169                        ${this.data.volunteeredCompetitions?.map(s=>d`
170                            <card-competition-main .data=${s}></card-competition-main>`)}
171                        ${e>1&&this.data.graphedCompetitions?.length?d`<h2>${a("Photographer")}</h2>`:null}
172                        ${this.data.graphedCompetitions?.map(s=>d`
173                            <card-competition-main .data=${s}></card-competition-main>`)}
174                    </flex-c>
175                `}
176            </div>
177        `}renderNotes(){return this.data?this.data.internalDiscussion?d`
178            <oum-disc style="flex:1" .discussion=${this.data.internalDiscussion} .suggestedCompId=${t.compMainId()}></oum-disc>
179        `:(this.loadInternalDiscussion(),r.loadingHtml()):r.loadingHtml()}loadInternalDiscussion(){H(t.dataMain.organizer.id,this.data.id.id,0).then(i=>{this.data.internalDiscussion=i,this.data={...this.data}})}doRemoveJudge(){y(u.shortie,this.data.id.id.id).then(()=>{v.showCAdmin("cadmin-people","judges")})}};c.styles=[L,N,b.stylesBase,W`
180        #cadmin-content {
181            padding: var(--space-l);
182        }
183
184        oum-disc-m, oum-disc-d {
185            margin-left: 10px;
186        }
187
188    `];p([$()],c.prototype,"data",2);p([$()],c.prototype,"tab",2);p([$()],c.prototype,"askRemove",2);c=p([K(),U("cadmin-people-staff-one")],c);export{c as CadminPeopleStaffOne};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.