liquid_feedback_frontend

annotate app/main/registration_admin/index.lua @ 1325:79cc890bf694

Do not show categories not used in registration overview part2
author bsw
date Thu Aug 02 15:37:46 2018 +0200 (2018-08-02)
parents 58d2df732fc0
children 7e328a78da93
rev   line source
bsw/jbe@1309 1 ui.title(_"Usermanagement")
bsw/jbe@1309 2 app.html_title.title = _"Usermanagement"
bsw/jbe@1309 3
bsw/jbe@1309 4 ui.container{ attr = { class = "mdl-grid" }, content = function()
bsw/jbe@1309 5 ui.container{ attr = { class = "mdl-cell mdl-cell--12-col" }, content = function()
bsw/jbe@1309 6
bsw/jbe@1309 7 ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
bsw/jbe@1309 8 ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
bsw/jbe@1309 9 ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = function()
bsw/jbe@1309 10 ui.tag{ content = _"Usermanagement" }
bsw/jbe@1309 11 end }
bsw/jbe@1309 12 end }
bsw/jbe@1309 13
bsw/jbe@1309 14 ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
bsw/jbe@1309 15
bsw/jbe@1309 16 ui.container{ content = _"User accounts" }
bsw/jbe@1309 17
bsw/jbe@1309 18 ui.tag{ tag = "ul", content = function()
bsw/jbe@1309 19
bsw/jbe@1309 20 local count = Verification:new_selector()
bsw/jbe@1309 21 :add_where("verified_member_id ISNULL")
bsw/jbe@1309 22 :add_where("denied ISNULL")
bsw/jbe@1309 23 :count()
bsw/jbe@1309 24 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 25 ui.link{ module = "registration_admin", view = "verification_requests", content = _("Open requests (#{count})", { count = count }) }
bsw/jbe@1309 26 end }
bsw/jbe@1309 27
bsw/jbe@1309 28 ui.tag{ tag = "ul", content = function()
bsw/jbe@1309 29
bsw/jbe@1309 30 local count = Verification:new_selector()
bsw/jbe@1309 31 :add_where("verified_member_id ISNULL")
bsw/jbe@1309 32 :add_where("denied ISNULL")
bsw/jbe@1309 33 :add_where("comment ilike '%User requested manual verification (during step 1)'")
bsw/jbe@1309 34 :count()
bsw/jbe@1309 35 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 36 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "manual_requested", step = 1 }, content = _("Manual verification requested during step 1 (#{count})", { count = count }) }
bsw/jbe@1309 37 end }
bsw/jbe@1309 38
bsw@1324 39 if config.self_registration.sms_id then
bsw@1324 40 local count = Verification:new_selector()
bsw@1324 41 :add_where("verified_member_id ISNULL")
bsw@1324 42 :add_where("denied ISNULL")
bsw@1325 43 :add_where("comment ilike '%User requested manual verification (during step 2)'")
bsw@1325 44 :count()
bsw@1325 45 ui.tag{ tag = "li", content = function()
bsw@1325 46 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "manual_requested", step = 2 }, content = _("Manual verification requested during step 2 (#{count})", { count = count }) }
bsw@1325 47 end }
bsw@1325 48
bsw@1325 49 local count = Verification:new_selector()
bsw@1325 50 :add_where("verified_member_id ISNULL")
bsw@1325 51 :add_where("denied ISNULL")
bsw@1324 52 :add_where("comment ilike '% sent'")
bsw@1324 53 :count()
bsw@1324 54 ui.tag{ tag = "li", content = function()
bsw@1324 55 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "pin_sent" }, content = _("PIN code not entered (yet) (#{count})", { count = count }) }
bsw@1324 56 end }
bsw@1324 57
bsw@1324 58 local count = Verification:new_selector()
bsw@1324 59 :add_where("verified_member_id ISNULL")
bsw@1324 60 :add_where("denied ISNULL")
bsw@1324 61 :add_where("comment ilike '%user entered invalid PIN three times'")
bsw@1324 62 :count()
bsw@1324 63 ui.tag{ tag = "li", content = function()
bsw@1324 64 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "invalid_pin" }, content = _("Invalid PIN entered (#{count})", { count = count }) }
bsw@1324 65 end }
bsw@1324 66 end
bsw/jbe@1309 67
bsw@1324 68 if config.self_registration.check_for_italian_fiscal_code then
bsw@1324 69 local count = Verification:new_selector()
bsw@1324 70 :add_where("verified_member_id ISNULL")
bsw@1324 71 :add_where("denied ISNULL")
bsw@1324 72 :add_where("comment similar to '%fiscal code does not match[^/]*'")
bsw@1324 73 :count()
bsw@1324 74 ui.tag{ tag = "li", content = function()
bsw@1324 75 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "fiscal_code" }, content = _("Fiscal code does not match (#{count})", { count = count }) }
bsw@1324 76 end }
bsw@1324 77 end
bsw@1324 78
bsw/jbe@1309 79 local count = Verification:new_selector()
bsw/jbe@1309 80 :add_where("verified_member_id ISNULL")
bsw/jbe@1309 81 :add_where("denied ISNULL")
bsw/jbe@1309 82 :add_where("comment ilike '%mobile phone number already used before'")
bsw/jbe@1309 83 :count()
bsw/jbe@1309 84 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 85 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "mobile_phone" }, content = _("Phone number used before (#{count})", { count = count }) }
bsw/jbe@1309 86 end }
bsw/jbe@1309 87
bsw/jbe@1309 88 local count = Verification:new_selector()
bsw/jbe@1309 89 :add_where("verified_member_id ISNULL")
bsw/jbe@1309 90 :add_where("denied ISNULL")
bsw/jbe@1309 91 :add_where("comment ilike '%user with same name already exist'")
bsw/jbe@1309 92 :count()
bsw/jbe@1309 93 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 94 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "identification" }, content = _("Identification used before (#{count})", { count = count }) }
bsw/jbe@1309 95 end }
bsw/jbe@1309 96
bsw/jbe@1309 97
bsw/jbe@1309 98 local count = Verification:new_selector()
bsw/jbe@1309 99 :add_where("verified_member_id ISNULL")
bsw/jbe@1309 100 :add_where("denied ISNULL")
bsw/jbe@1309 101 :add_where("comment ilike '%user with same name already exists'")
bsw/jbe@1309 102 :count()
bsw/jbe@1309 103 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 104 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "same_name_already_exists" }, content = _("User with same name already exists (#{count})", { count = count }) }
bsw/jbe@1309 105 end }
bsw/jbe@1309 106
bsw/jbe@1309 107 local count = Verification:new_selector()
bsw/jbe@1309 108 :add_where("verified_member_id ISNULL")
bsw/jbe@1309 109 :add_where("denied ISNULL")
bsw@1322 110 :add_where("not comment ilike '%User requested manual verification (during step 1)'")
bsw@1322 111 :add_where("not comment ilike '%User requested manual verification (during step 2)'")
bsw/jbe@1309 112 :add_where("not comment ilike '%User requested manual verification'")
bsw/jbe@1309 113 :add_where("not comment ilike '% sent'")
bsw/jbe@1309 114 :add_where("not comment similar to '%fiscal code does not match[^/]*'")
bsw/jbe@1309 115 :add_where("not comment ilike '%mobile phone number already used before'")
bsw/jbe@1309 116 :add_where("not comment ilike '%user with same name already exist'")
bsw/jbe@1309 117 :add_where("not comment ilike '%user entered invalid PIN three times'")
bsw/jbe@1309 118 :add_where("not comment ilike '%user with same name already exists'")
bsw/jbe@1309 119 :count()
bsw/jbe@1309 120 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 121 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "other" }, content = _("other reasons (#{count})", { count = count }) }
bsw/jbe@1309 122 end }
bsw/jbe@1309 123 end }
bsw/jbe@1309 124
bsw/jbe@1309 125 local count = Verification:new_selector()
bsw/jbe@1309 126 :join("member", nil, "member.id = verification.verified_member_id")
bsw/jbe@1309 127 :count()
bsw/jbe@1309 128 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 129 ui.link{ module = "registration_admin", view = "verification_accredited", content = _("Accredited (#{count})", { count = count }) }
bsw/jbe@1309 130 ui.tag{ tag = "ul", content = function()
bsw/jbe@1309 131
bsw/jbe@1309 132 local count = Verification:new_selector()
bsw/jbe@1309 133 :join("member", nil, "member.id = verification.verified_member_id")
bsw/jbe@1309 134 :add_where("member.activated ISNULL")
bsw/jbe@1309 135 :add_where("member.deleted ISNULL")
bsw/jbe@1309 136 :count()
bsw/jbe@1309 137 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 138 ui.link{ module = "registration_admin", view = "verification_accredited", params = { mode = "not_activated" }, content = _("Account not activated (yet) (#{count})", { count = count }) }
bsw/jbe@1309 139 end }
bsw/jbe@1309 140
bsw/jbe@1309 141 local count = Verification:new_selector()
bsw/jbe@1309 142 :join("member", nil, "member.id = verification.verified_member_id")
bsw/jbe@1309 143 :add_where("member.activated NOTNULL")
bsw/jbe@1309 144 :add_where("member.deleted ISNULL")
bsw/jbe@1309 145 :count()
bsw/jbe@1309 146 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 147 ui.link{ module = "registration_admin", view = "verification_accredited", params = { mode = "activated" }, content = _("Activated accounts (#{count})", { count = count }) }
bsw/jbe@1309 148 end }
bsw/jbe@1309 149
bsw/jbe@1309 150 local count = Verification:new_selector()
bsw/jbe@1309 151 :join("member", nil, "member.id = verification.verified_member_id")
bsw/jbe@1309 152 :add_where("member.deleted NOTNULL")
bsw/jbe@1309 153 :count()
bsw/jbe@1309 154 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 155 ui.link{ module = "registration_admin", view = "verification_cancelled", content = _("Cancelled accounts (#{count})", { count = count }) }
bsw/jbe@1309 156 end }
bsw/jbe@1309 157 end }
bsw/jbe@1309 158 end }
bsw/jbe@1309 159
bsw/jbe@1309 160 local count = Verification:new_selector()
bsw/jbe@1309 161 :add_where("denied NOTNULL")
bsw/jbe@1309 162 :count()
bsw/jbe@1309 163 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 164 ui.link{ module = "registration_admin", view = "verification_rejected", content = _("Rejected requests (#{count})", { count = count }) }
bsw/jbe@1309 165 end }
bsw/jbe@1309 166
bsw/jbe@1309 167 end }
bsw/jbe@1309 168
bsw/jbe@1309 169 ui.container{ content = _"Role accounts" }
bsw/jbe@1309 170
bsw/jbe@1309 171 ui.tag{ tag = "ul", content = function()
bsw/jbe@1309 172
bsw/jbe@1309 173 local count = RoleVerification:new_selector()
bsw/jbe@1309 174 :add_where("verified ISNULL")
bsw/jbe@1309 175 :add_where("denied ISNULL")
bsw/jbe@1309 176 :count()
bsw/jbe@1309 177 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 178 ui.link{ module = "registration_admin", view = "role_verification_requests", content = _("Open requests (#{count})", { count = count }) }
bsw/jbe@1309 179 end }
bsw/jbe@1309 180
bsw/jbe@1309 181 local count = RoleVerification:new_selector()
bsw/jbe@1309 182 :add_where("verified NOTNULL")
bsw/jbe@1309 183 :add_where("denied ISNULL")
bsw/jbe@1309 184 :join("member", nil, "member.id = role_verification.verified_member_id")
bsw/jbe@1309 185 :add_where("member.deleted ISNULL")
bsw/jbe@1309 186 :count()
bsw/jbe@1309 187 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 188 ui.link{ module = "registration_admin", view = "role_verification_accredited", content = _("Accredited (#{count})", { count = count }) }
bsw/jbe@1309 189 end }
bsw/jbe@1309 190
bsw/jbe@1309 191 local count = RoleVerification:new_selector()
bsw/jbe@1309 192 :add_where("verified NOTNULL")
bsw/jbe@1309 193 :add_where("denied ISNULL")
bsw/jbe@1309 194 :join("member", nil, "member.id = role_verification.verified_member_id")
bsw/jbe@1309 195 :add_where("member.deleted NOTNULL")
bsw/jbe@1309 196 :count()
bsw/jbe@1309 197 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 198 ui.link{ module = "registration_admin", view = "role_verification_cancelled", content = _("Cancelled (#{count})", { count = count }) }
bsw/jbe@1309 199 end }
bsw/jbe@1309 200
bsw/jbe@1309 201 local count = RoleVerification:new_selector()
bsw/jbe@1309 202 :add_where("verified ISNULL")
bsw/jbe@1309 203 :add_where("denied NOTNULL")
bsw/jbe@1309 204 :count()
bsw/jbe@1309 205 ui.tag{ tag = "li", content = function()
bsw/jbe@1309 206 ui.link{ module = "registration_admin", view = "role_verification_rejected", content = _("Rejected (#{count})", { count = count }) }
bsw/jbe@1309 207 end }
bsw/jbe@1309 208
bsw/jbe@1309 209
bsw/jbe@1309 210 end }
bsw/jbe@1309 211
bsw/jbe@1309 212 end }
bsw/jbe@1309 213 end }
bsw/jbe@1309 214
bsw/jbe@1309 215
bsw/jbe@1309 216
bsw/jbe@1309 217 end }
bsw/jbe@1309 218 end }
bsw/jbe@1309 219

Impressum / About Us