@@ -6,30 +6,55 @@ <h6>Google Calendar</h6>
66 </ div >
77
88 < div th:if ="${hasAccounts} ">
9- < div th:each ="account : ${accounts} ">
10- < div th:text ="${account.email} "> email@example.com</ div >
11- < ul class ="list-unstyled ms-3 my-1 ">
12- < li class ="d-flex justify-content-between align-items-center py-1 "
13- th:each ="cal : ${account.calendars} ">
14- < span th:text ="${cal.title} "> Calendar name</ span >
15- < div class ="form-check form-switch m-0 ">
16- < input aria-label ="Показывать календарь " class ="form-check-input "
17- th:checked ="${cal.shouldBeShown} "
18- hx-ext ="json-enc "
19- hx-swap ="none "
20- hx-trigger ="change "
21- hx-vals ='js:{ "shouldBeShown": !!event.target.checked } '
22- name ="shouldBeShown "
23- th:attr ="hx-patch=@{/therapist/schedule/settings/google-calendar/{accountId}/calendars/{id}(accountId=${account.id},id=${cal.id})} "
24- type ="checkbox ">
25- </ div >
26- </ li >
27- </ ul >
9+ < div class ="mb-2 google-account-item " th:each ="account : ${accounts} ">
10+ < div class =" border-bottom pb-1 mb-2 text-body-secondary small " th:text ="${account.email} ">
11+ email@example.com
12+ </ div >
13+ < div th:if ="${account.content instanceof T(pro.qyoga.core.calendar.google.GoogleAccountContentView$Calendars)} ">
14+ < ul class ="list-unstyled ms-3 my-1 ">
15+ < li class ="d-flex justify-content-between align-items-center py-2 "
16+ th:each ="cal : ${account.content.calendars} ">
17+ < span th:text ="${cal.title} "> Calendar name</ span >
18+ < div class ="form-check form-switch m-0 ">
19+ < input
20+ aria-label ="Показывать календарь "
21+ class ="form-check-input "
22+ hx-ext ="json-enc "
23+ hx-swap ="none "
24+ hx-trigger ="change "
25+ hx-vals ='js:{ "shouldBeShown": !!event.target.checked } '
26+ name ="shouldBeShown "
27+ style ="height: 22px;width: 44px; "
28+ th:attr ="hx-patch=@{/therapist/schedule/settings/google-calendar/{accountId}/calendars/{id}(accountId=${account.id},id=${cal.id})} "
29+ th:checked ="${cal.shouldBeShown} "
30+ type ="checkbox "
31+ >
32+ </ div >
33+ </ li >
34+ </ ul >
35+ </ div >
36+ < div
37+ class ="text-danger ms-3 my-1 google-account-error-content d-inline-flex align-items-center "
38+ th:if ="${account.content instanceof T(pro.qyoga.core.calendar.google.GoogleAccountContentView$Error)} "
39+ >
40+ < svg aria-hidden ="true " class ="me-2 align-middle " height ="14 " style ="fill: currentColor; "
41+ viewBox ="0 0 16 16 " width ="14 " xmlns ="http://www.w3.org/2000/svg ">
42+ < path d ="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16 "/>
43+ < path d ="M7.002 11a1 1 0 1 0 2 0 1 1 0 0 0-2 0M7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.555.555 0 0 1-1.1 0z "/>
44+ </ svg >
45+ Ошибка получения календарей аккаунта
46+ </ div >
2847 </ div >
2948 </ div >
3049 </ div >
31- < a class ="btn btn-outline-secondary " href ="/oauth2/authorization/google " id ="connect-google-calendar ">
50+ < a
51+ class ="btn btn-outline-secondary "
52+ href ="/oauth2/authorization/google "
53+ id ="connect-google-calendar "
54+ >
3255 < img alt ="G "
33- class ="me-2 " src ="https://www.gstatic.com/marketing-cms/assets/images/d5/dc/cfe9ce8b4425b410b49b7f2dd3f3/g.webp=s48-fcrop64=1,00000000ffffffff-rw " width ="20 "> Добавить аккаунт
56+ class ="me-2 "
57+ src ="https://www.gstatic.com/marketing-cms/assets/images/d5/dc/cfe9ce8b4425b410b49b7f2dd3f3/g.webp=s48-fcrop64=1,00000000ffffffff-rw "
58+ width ="20 "> Добавить аккаунт
3459 </ a >
3560</ div >
0 commit comments