From 9f4cb1601643ee9c76e96850e3f17fe1d3eab7b3 Mon Sep 17 00:00:00 2001 From: bilal Date: Fri, 19 Jun 2020 12:36:16 +0200 Subject: [PATCH 1/2] update notice text when creating task request --- config/locales/en.yml | 2 +- config/locales/es.yml | 2 +- db/structure.sql | 30 ++++++++---------------------- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index a8fe4bd..0ffbad0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -947,7 +947,7 @@ en: heading: Edit Task Request form: - info_message: After submitting this task request, you'll be connected via chat with a BIG representative. + info_message: After submitting this task request, you'll be connected via chat with a ME Suite representative. labels: additional_notes: Please add any additional notes we should be aware of regarding this task. deadline: What is the deadline for this task? diff --git a/config/locales/es.yml b/config/locales/es.yml index 174b604..58364f8 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -184,7 +184,7 @@ es: heading: Guardian Photo (ES) task_requests: form: - info_message: After submitting this task request, you'll be connected via chat with a BIG representative. (ES) + info_message: After submitting this task request, you'll be connected via chat with a ME Suite representative. (ES) task_request: actions: manage: Manage (ES) diff --git a/db/structure.sql b/db/structure.sql index e1fe1e4..31bf054 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -43,14 +43,14 @@ COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching CREATE FUNCTION public.pg_search_dmetaphone(text) RETURNS text LANGUAGE sql IMMUTABLE STRICT - AS $_$ - SELECT array_to_string(ARRAY(SELECT dmetaphone(unnest(regexp_split_to_array($1, E'\\s+')))), ' ') + AS $_$ + SELECT array_to_string(ARRAY(SELECT dmetaphone(unnest(regexp_split_to_array($1, E'\\s+')))), ' ') $_$; SET default_tablespace = ''; -SET default_table_access_method = heap; +SET default_with_oids = false; -- -- Name: account_auths; Type: TABLE; Schema: public; Owner: - @@ -615,15 +615,6 @@ CREATE SEQUENCE public.contract_templates_id_seq ALTER SEQUENCE public.contract_templates_id_seq OWNED BY public.contract_templates.id; --- --- Name: data_migrations; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.data_migrations ( - version character varying NOT NULL -); - - -- -- Name: directories; Type: TABLE; Schema: public; Owner: - -- @@ -1181,6 +1172,7 @@ CREATE TABLE public.settings ( -- CREATE SEQUENCE public.settings_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1216,6 +1208,7 @@ CREATE TABLE public.taggings ( -- CREATE SEQUENCE public.taggings_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1246,6 +1239,7 @@ CREATE TABLE public.tags ( -- CREATE SEQUENCE public.tags_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1597,9 +1591,9 @@ CREATE TABLE public.zoom_meetings ( created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL, broadcast_id bigint, - status integer DEFAULT 0, zoom_user_id bigint, - project_id bigint + project_id bigint, + status integer DEFAULT 0 ); @@ -2053,14 +2047,6 @@ ALTER TABLE ONLY public.contract_templates ADD CONSTRAINT contract_templates_pkey PRIMARY KEY (id); --- --- Name: data_migrations data_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.data_migrations - ADD CONSTRAINT data_migrations_pkey PRIMARY KEY (version); - - -- -- Name: directories directories_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -- 2.47.3 From 43e69d1e88d732405a9e84408f30592227693bc2 Mon Sep 17 00:00:00 2001 From: bilal Date: Mon, 22 Jun 2020 19:22:23 +0200 Subject: [PATCH 2/2] change text and spec --- app/views/task_requests/create.html.erb | 2 +- config/locales/en.yml | 1 + config/locales/es.yml | 2 ++ spec/features/user_creates_task_request_spec.rb | 6 +++++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/task_requests/create.html.erb b/app/views/task_requests/create.html.erb index 3974af1..382bbe0 100644 --- a/app/views/task_requests/create.html.erb +++ b/app/views/task_requests/create.html.erb @@ -1,4 +1,4 @@ <% if params[:show_chat] %> <%= javascript_include_tag "https://js.hs-scripts.com/7344617.js", defer: "defer", async: true, id: "hs-script-loader" %> <% end %> -

Your task request was successfully submitted. Thank you.

+

<%= t '.success_message' %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 0ffbad0..ee67a04 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -943,6 +943,7 @@ en: notice: Task has been cancelled successfully. create: notice: Task request created succussfully. + success_message: Your task request was successfully submitted. Thank you. A chat window will pop up on the lower right in a few seconds. edit: heading: Edit Task Request diff --git a/config/locales/es.yml b/config/locales/es.yml index 58364f8..6f72b38 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -189,3 +189,5 @@ es: actions: manage: Manage (ES) open_deliverable: Open Deliverable (ES) + create: + success_message: Your task request was successfully submitted. Thank you. A chat window will pop up on the lower right in a few seconds. (ES) diff --git a/spec/features/user_creates_task_request_spec.rb b/spec/features/user_creates_task_request_spec.rb index b2540fe..2ecb847 100644 --- a/spec/features/user_creates_task_request_spec.rb +++ b/spec/features/user_creates_task_request_spec.rb @@ -20,7 +20,7 @@ RSpec.feature 'User creates task request', type: :feature do click_on 'Create Task request' - expect(page).to have_content('Task request created succussfully.') + expect(page).to have_content task_created_message end scenario 'user can view task request details' do @@ -85,4 +85,8 @@ RSpec.feature 'User creates task request', type: :feature do def additional_notes_field t "task_requests.form.labels.additional_notes" end + + def task_created_message + t 'task_requests.create.success_message' + end end \ No newline at end of file -- 2.47.3