diff --git a/app/views/admin/lieutenants/index.html.slim b/app/views/admin/lieutenants/index.html.slim index 43f42f5f4..6525259f8 100644 --- a/app/views/admin/lieutenants/index.html.slim +++ b/app/views/admin/lieutenants/index.html.slim @@ -25,20 +25,19 @@ .govuk-grid-row = render "shared/users/search_count" .govuk-button-group - - if controller_name == "lieutenants" - - if action_name == "deleted" - = link_to "Show active users", - admin_lieutenants_path, - class: "new-user govuk-button pull-right", - role: "button", - aria: { label: "Show active users" } + - if action_name == "deleted" + = link_to "Show active users", + admin_lieutenants_path, + class: "new-user govuk-button pull-right", + role: "button", + aria: { label: "Show active users" } - - else - = link_to "Show deleted users", - deleted_admin_lieutenants_path, - class: "new-user govuk-button pull-right", - role: "button", - aria: { label: "Show deleted users" } + - else + = link_to "Show deleted users", + deleted_admin_lieutenants_path, + class: "new-user govuk-button pull-right", + role: "button", + aria: { label: "Show deleted users" } = link_to public_send("new_admin_#{controller_name.singularize}_path", search: params[:search], page: params[:page]), class: 'new-user govuk-button pull-right', role: 'button' do = t("admin.users.new_button.#{controller_name}") diff --git a/db/seeds.rb b/db/seeds.rb index e8ea10515..d94faa7b4 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -3,7 +3,7 @@ unless Admin.exists? admin_args = { email: "admin@example.com", - password: SecureRandom.alphanumeric(12), + password: SecureRandom.alphanumeric(14), first_name: "First name", last_name: "Last name", confirmed_at: DateTime.now @@ -17,7 +17,7 @@ assessor_args = { email: "assessor@example.com", sub_group: "sub_group_1", - password: SecureRandom.alphanumeric(12), + password: SecureRandom.alphanumeric(14), first_name: "First name", last_name: "Last name", confirmed_at: DateTime.now diff --git a/db/structure.sql b/db/structure.sql index 99cd08162..0fae4c66c 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -9,6 +9,13 @@ SET xmloption = content; SET client_min_messages = warning; SET row_security = off; +-- +-- Name: public; Type: SCHEMA; Schema: -; Owner: - +-- + +-- *not* creating schema, since initdb creates it + + -- -- Name: hstore; Type: EXTENSION; Schema: -; Owner: - -- @@ -44,6 +51,7 @@ CREATE TABLE public.accounts ( -- CREATE SEQUENCE public.accounts_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -132,6 +140,7 @@ CREATE TABLE public.admins ( -- CREATE SEQUENCE public.admins_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -174,7 +183,8 @@ CREATE TABLE public.assessor_assignments ( editable_id integer, assessed_at timestamp without time zone, locked_at timestamp without time zone, - award_year_id integer + award_year_id integer, + status character varying ); @@ -183,6 +193,7 @@ CREATE TABLE public.assessor_assignments ( -- CREATE SEQUENCE public.assessor_assignments_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -238,6 +249,7 @@ CREATE TABLE public.assessors ( -- CREATE SEQUENCE public.assessors_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -273,6 +285,7 @@ CREATE TABLE public.audit_logs ( -- CREATE SEQUENCE public.audit_logs_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -309,6 +322,7 @@ CREATE TABLE public.award_years ( -- CREATE SEQUENCE public.award_years_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -412,6 +426,7 @@ CREATE TABLE public.comments ( -- CREATE SEQUENCE public.comments_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -446,6 +461,7 @@ CREATE TABLE public.deadlines ( -- CREATE SEQUENCE public.deadlines_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -482,6 +498,7 @@ CREATE TABLE public.draft_notes ( -- CREATE SEQUENCE public.draft_notes_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -517,6 +534,7 @@ CREATE TABLE public.eligibilities ( -- CREATE SEQUENCE public.eligibilities_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -551,6 +569,7 @@ CREATE TABLE public.email_notifications ( -- CREATE SEQUENCE public.email_notifications_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -588,6 +607,7 @@ CREATE TABLE public.feedbacks ( -- CREATE SEQUENCE public.feedbacks_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -627,6 +647,7 @@ CREATE TABLE public.form_answer_attachments ( -- CREATE SEQUENCE public.form_answer_attachments_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -657,6 +678,7 @@ CREATE TABLE public.form_answer_progresses ( -- CREATE SEQUENCE public.form_answer_progresses_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -692,6 +714,7 @@ CREATE TABLE public.form_answer_transitions ( -- CREATE SEQUENCE public.form_answer_transitions_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -760,6 +783,7 @@ CREATE TABLE public.form_answers ( -- CREATE SEQUENCE public.form_answers_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -801,7 +825,7 @@ CREATE TABLE public.group_leaders ( first_name character varying, last_name character varying, deleted boolean DEFAULT false NOT NULL, - form_answer_id integer + form_answer_id bigint ); @@ -941,6 +965,7 @@ CREATE TABLE public.palace_attendees ( -- CREATE SEQUENCE public.palace_attendees_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -975,6 +1000,7 @@ CREATE TABLE public.palace_invites ( -- CREATE SEQUENCE public.palace_invites_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1008,6 +1034,7 @@ CREATE TABLE public.previous_wins ( -- CREATE SEQUENCE public.previous_wins_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1045,6 +1072,7 @@ CREATE TABLE public.scans ( -- CREATE SEQUENCE public.scans_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1085,6 +1113,7 @@ CREATE TABLE public.settings ( -- CREATE SEQUENCE public.settings_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1117,6 +1146,7 @@ CREATE TABLE public.site_feedbacks ( -- CREATE SEQUENCE public.site_feedbacks_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1153,6 +1183,7 @@ CREATE TABLE public.support_letter_attachments ( -- CREATE SEQUENCE public.support_letter_attachments_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1198,6 +1229,7 @@ CREATE TABLE public.support_letters ( -- CREATE SEQUENCE public.support_letters_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2497,6 +2529,7 @@ CREATE TABLE public.users ( -- CREATE SEQUENCE public.users_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2528,6 +2561,7 @@ CREATE TABLE public.version_associations ( -- CREATE SEQUENCE public.version_associations_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2564,6 +2598,7 @@ CREATE TABLE public.versions ( -- CREATE SEQUENCE public.versions_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -3572,6 +3607,14 @@ ALTER TABLE ONLY public.feedbacks ADD CONSTRAINT fk_rails_85a1d7f049 FOREIGN KEY (form_answer_id) REFERENCES public.form_answers(id); +-- +-- Name: group_leaders fk_rails_8781709c53; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.group_leaders + ADD CONSTRAINT fk_rails_8781709c53 FOREIGN KEY (form_answer_id) REFERENCES public.form_answers(id); + + -- -- Name: support_letter_attachments fk_rails_abd43a0510; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -3611,230 +3654,232 @@ ALTER TABLE ONLY public.support_letters SET search_path TO "$user", public; INSERT INTO "schema_migrations" (version) VALUES -('20141124095215'), -('20141124112326'), -('20141124161532'), -('20141127094914'), -('20141127094940'), -('20141127095334'), -('20141128115405'), -('20141130191608'), -('20141201084521'), -('20141203090803'), -('20141203135504'), -('20141203140154'), -('20141203172220'), -('20141203182047'), -('20141204113405'), -('20141204113729'), -('20141204134014'), -('20141204161223'), -('20141208085751'), -('20141208105812'), -('20141209150903'), -('20141211103406'), -('20141211103425'), -('20141217112332'), -('20141219102035'), -('20150109142716'), -('20150112121539'), -('20150113154435'), -('20150113155731'), -('20150216232552'), -('20150217114106'), -('20150218132412'), -('20150218141547'), -('20150218150006'), -('20150219102528'), -('20150219125327'), -('20150223100419'), -('20150223115842'), -('20150223123005'), -('20150224115303'), -('20150224115503'), -('20150225090728'), -('20150225122104'), -('20150226141107'), -('20150227124243'), -('20150227125140'), -('20150227125226'), -('20150227125421'), -('20150227135432'), -('20150227141437'), -('20150228145247'), -('20150302092030'), -('20150302095528'), -('20150303120704'), -('20150303123415'), -('20150303152052'), -('20150303163541'), -('20150304075824'), -('20150304080108'), -('20150304084018'), -('20150304144532'), -('20150304145423'), -('20150304155948'), -('20150305084628'), -('20150305104844'), -('20150306122216'), -('20150309112759'), -('20150309114102'), -('20150309114427'), -('20150309143448'), -('20150310114756'), -('20150310124624'), -('20150310130907'), -('20150312105021'), -('20150312114528'), -('20150313090152'), -('20150317130146'), -('20150318123932'), -('20150318142055'), -('20150323132637'), -('20150323155826'), -('20150324104816'), -('20150324104913'), -('20150324163344'), -('20150325092930'), -('20150325133040'), -('20150325160755'), -('20150325201007'), -('20150326105117'), -('20150326170750'), -('20150326170823'), -('20150326221536'), -('20150327122904'), -('20150327190410'), -('20150331061542'), -('20150331180118'), -('20150406130916'), -('20150407122134'), -('20150407132835'), -('20150407134028'), -('20150407172016'), -('20150409082247'), -('20150409090140'), -('20150410091747'), -('20150410131705'), -('20150411113516'), -('20150411113532'), -('20150411113543'), -('20150411113558'), -('20150414102640'), -('20150414133524'), -('20150414141823'), -('20150414170238'), -('20150417153811'), -('20150427100604'), -('20150429171132'), -('20150429171704'), -('20150429171705'), -('20150504112318'), -('20150506150526'), -('20150507114157'), -('20150507143136'), -('20150515145647'), -('20150519123524'), -('20150617142142'), -('20150622173914'), -('20150907131321'), -('20150907145343'), -('20150907145955'), -('20150907161006'), -('20150907165227'), -('20150908105756'), -('20150908151417'), -('20150908163040'), -('20150908172247'), -('20150914114817'), -('20150917134236'), -('20150917135114'), -('20150922132151'), -('20151001144155'), -('20151005112348'), -('20151126154434'), -('20151126171347'), -('20151130145800'), -('20160106115349'), -('20160121080201'), -('20160204203037'), -('20160222153821'), -('20160222175452'), -('20160224174712'), -('20160302191539'), -('20160302191611'), -('20160302191628'), -('20160310140650'), -('20160311130931'), -('20160314141838'), -('20160323103504'), -('20160328090616'), -('20160328124213'), -('20160604141333'), -('20160607085426'), -('20160607172315'), -('20160621114955'), -('20160708131227'), -('20160727154722'), -('20160728174708'), -('20160728174732'), -('20160729082206'), -('20160729082616'), -('20160729090515'), -('20160729131756'), -('20160729132247'), -('20160729132552'), -('20160731102944'), -('20160731121716'), -('20160802111557'), -('20160804172537'), -('20160804175341'), -('20160804175513'), -('20160804175527'), -('20160906174550'), -('20161021111201'), -('20161021140457'), -('20161116104612'), -('20180820050136'), -('20181102125508'), -('20181102125923'), -('20190415133209'), -('20190422174739'), -('20190501154629'), -('20190501162430'), -('20190501163901'), -('20190513114859'), -('20190514192116'), -('20190515121928'), -('20200710150405'), -('20200714125921'), -('20200814122259'), -('20200918110854'), -('20200918151320'), -('20201023115307'), -('20210517075551'), -('20210615093659'), -('20210616135647'), -('20210629130552'), -('20210707081708'), -('20210707115136'), -('20210707122554'), -('20210803084421'), -('20210803120605'), -('20210806102135'), -('20210808194051'), -('20210809072025'), -('20210809072320'), -('20210809073242'), -('20210810173827'), -('20210810175339'), -('20210816072005'), -('20210817084427'), -('20210819140008'), -('20210826124140'), -('20210831085355'), -('20210928120530'), -('20211011083451'), -('20211013073349'), +('20240216144428'), +('20211214111643'), ('20211104074415'), -('20211214111643'); +('20211013073349'), +('20211011083451'), +('20210928120530'), +('20210831085355'), +('20210826124140'), +('20210819140008'), +('20210817084427'), +('20210816072005'), +('20210810175339'), +('20210810173827'), +('20210809073242'), +('20210809072320'), +('20210809072025'), +('20210808194051'), +('20210806102135'), +('20210803120605'), +('20210803084421'), +('20210707122554'), +('20210707115136'), +('20210707081708'), +('20210629130552'), +('20210616135647'), +('20210615093659'), +('20210517075551'), +('20201023115307'), +('20200918151320'), +('20200918110854'), +('20200814122259'), +('20200714125921'), +('20200710150405'), +('20190515121928'), +('20190514192116'), +('20190513114859'), +('20190501163901'), +('20190501162430'), +('20190501154629'), +('20190422174739'), +('20190415133209'), +('20181102125923'), +('20181102125508'), +('20180820050136'), +('20161116104612'), +('20161021140457'), +('20161021111201'), +('20160906174550'), +('20160804175527'), +('20160804175513'), +('20160804175341'), +('20160804172537'), +('20160802111557'), +('20160731121716'), +('20160731102944'), +('20160729132552'), +('20160729132247'), +('20160729131756'), +('20160729090515'), +('20160729082616'), +('20160729082206'), +('20160728174732'), +('20160728174708'), +('20160727154722'), +('20160708131227'), +('20160621114955'), +('20160607172315'), +('20160607085426'), +('20160604141333'), +('20160328124213'), +('20160328090616'), +('20160323103504'), +('20160314141838'), +('20160311130931'), +('20160310140650'), +('20160302191628'), +('20160302191611'), +('20160302191539'), +('20160224174712'), +('20160222175452'), +('20160222153821'), +('20160204203037'), +('20160121080201'), +('20160106115349'), +('20151130145800'), +('20151126171347'), +('20151126154434'), +('20151005112348'), +('20151001144155'), +('20150922132151'), +('20150917135114'), +('20150917134236'), +('20150914114817'), +('20150908172247'), +('20150908163040'), +('20150908151417'), +('20150908105756'), +('20150907165227'), +('20150907161006'), +('20150907145955'), +('20150907145343'), +('20150907131321'), +('20150622173914'), +('20150617142142'), +('20150519123524'), +('20150515145647'), +('20150507143136'), +('20150507114157'), +('20150506150526'), +('20150504112318'), +('20150429171705'), +('20150429171704'), +('20150429171132'), +('20150427100604'), +('20150417153811'), +('20150414170238'), +('20150414141823'), +('20150414133524'), +('20150414102640'), +('20150411113558'), +('20150411113543'), +('20150411113532'), +('20150411113516'), +('20150410131705'), +('20150410091747'), +('20150409090140'), +('20150409082247'), +('20150407172016'), +('20150407134028'), +('20150407132835'), +('20150407122134'), +('20150406130916'), +('20150331180118'), +('20150331061542'), +('20150327190410'), +('20150327122904'), +('20150326221536'), +('20150326170823'), +('20150326170750'), +('20150326105117'), +('20150325201007'), +('20150325160755'), +('20150325133040'), +('20150325092930'), +('20150324163344'), +('20150324104913'), +('20150324104816'), +('20150323155826'), +('20150323132637'), +('20150318142055'), +('20150318123932'), +('20150317130146'), +('20150313090152'), +('20150312114528'), +('20150312105021'), +('20150310130907'), +('20150310124624'), +('20150310114756'), +('20150309143448'), +('20150309114427'), +('20150309114102'), +('20150309112759'), +('20150306122216'), +('20150305104844'), +('20150305084628'), +('20150304155948'), +('20150304145423'), +('20150304144532'), +('20150304084018'), +('20150304080108'), +('20150304075824'), +('20150303163541'), +('20150303152052'), +('20150303123415'), +('20150303120704'), +('20150302095528'), +('20150302092030'), +('20150228145247'), +('20150227141437'), +('20150227135432'), +('20150227125421'), +('20150227125226'), +('20150227125140'), +('20150227124243'), +('20150226141107'), +('20150225122104'), +('20150225090728'), +('20150224115503'), +('20150224115303'), +('20150223123005'), +('20150223115842'), +('20150223100419'), +('20150219125327'), +('20150219102528'), +('20150218150006'), +('20150218141547'), +('20150218132412'), +('20150217114106'), +('20150216232552'), +('20150113155731'), +('20150113154435'), +('20150112121539'), +('20150109142716'), +('20141219102035'), +('20141217112332'), +('20141211103425'), +('20141211103406'), +('20141209150903'), +('20141208105812'), +('20141208085751'), +('20141204161223'), +('20141204134014'), +('20141204113729'), +('20141204113405'), +('20141203182047'), +('20141203172220'), +('20141203140154'), +('20141203135504'), +('20141203090803'), +('20141201084521'), +('20141130191608'), +('20141128115405'), +('20141127095334'), +('20141127094940'), +('20141127094914'), +('20141124161532'), +('20141124112326'), +('20141124095215'); +