Compare commits
3 Commits
task-me-mv
...
add-descri
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8a311fdea | ||
|
|
ba826508d8 | ||
|
|
a5213feccc |
@@ -5,6 +5,18 @@
|
||||
<td>
|
||||
<%= task_request.deadline.try(:strftime, '%D') %>
|
||||
</td>
|
||||
<td>
|
||||
<%= truncate(task_request.description) {
|
||||
link_to t('.actions.read_more'),
|
||||
'#',
|
||||
class: 'alert-link',
|
||||
data: {
|
||||
toggle: "popover",
|
||||
content: task_request.description,
|
||||
trigger: "hover"
|
||||
}
|
||||
} %>
|
||||
</td>
|
||||
<td>
|
||||
<%= task_request.time_allowed %>
|
||||
</td>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<tr>
|
||||
<th><%= t(".table_headers.task_request_created_on") %></th>
|
||||
<th><%= t(".table_headers.task_request_deadline") %></th>
|
||||
<th><%= t(".table_headers.task_request_description") %></th>
|
||||
<th><%= t(".table_headers.task_request_time_allowed") %></th>
|
||||
<th><%= t(".table_headers.task_request_status") %></th>
|
||||
<th></th>
|
||||
@@ -26,7 +27,7 @@
|
||||
<%= render @task_requests %>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td colspan="5" class="py-4 text-center text-muted"><%= t(".empty") %></td>
|
||||
<td colspan="20" class="py-4 text-center text-muted"><%= t(".empty") %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -962,6 +962,7 @@ en:
|
||||
table_headers:
|
||||
task_request_created_on: Created On
|
||||
task_request_deadline: Deadline
|
||||
task_request_description: Description
|
||||
task_request_results: Task Results
|
||||
task_request_status: Status
|
||||
task_request_time_allowed: Time Allowed
|
||||
@@ -973,6 +974,7 @@ en:
|
||||
actions:
|
||||
manage: Manage
|
||||
open_deliverable: Open Deliverable
|
||||
read_more: read more
|
||||
update:
|
||||
notice: Task request updated successfully.
|
||||
tasks:
|
||||
|
||||
@@ -187,7 +187,11 @@ es:
|
||||
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)
|
||||
form:
|
||||
info_message: After submitting this task request, you'll be connected via chat with a ME Suite representative. (ES)
|
||||
index:
|
||||
table_headers:
|
||||
task_request_description: Description (ES)
|
||||
task_request:
|
||||
actions:
|
||||
manage: Manage (ES)
|
||||
open_deliverable: Open Deliverable (ES)
|
||||
read_more: read more (ES)
|
||||
|
||||
@@ -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: -
|
||||
--
|
||||
|
||||
@@ -13,6 +13,7 @@ feature "User managing task requests" do
|
||||
|
||||
expect(page).to have_content "Created On"
|
||||
expect(page).to have_content "Deadline"
|
||||
expect(page).to have_content description_column
|
||||
expect(page).to have_content "Time Allowed"
|
||||
expect(page).to have_content "Status"
|
||||
end
|
||||
@@ -34,6 +35,40 @@ feature "User managing task requests" do
|
||||
expect(page).to have_content task_request.status.capitalize
|
||||
end
|
||||
|
||||
scenario "full description is shown if description text is not truncated" do
|
||||
visit project_task_requests_path(project)
|
||||
|
||||
task_request = create(:task_request, project: project, description: 'Short Desc')
|
||||
visit project_task_requests_path(project)
|
||||
|
||||
expect(page).to have_content task_request.description
|
||||
end
|
||||
|
||||
scenario "truncated description is shown if description text is too long" do
|
||||
visit project_task_requests_path(project)
|
||||
|
||||
task_request = create(:task_request,
|
||||
project: project,
|
||||
description: long_description_text)
|
||||
visit project_task_requests_path(project)
|
||||
|
||||
expect(page).not_to have_content task_request.description
|
||||
truncated_text = "#{task_request.description[0..26]}...read more"
|
||||
expect(page).to have_content truncated_text
|
||||
end
|
||||
|
||||
scenario "full description is shown when user hovers over read more link in description colum", js: true do
|
||||
visit project_task_requests_path(project)
|
||||
|
||||
task_request = create(:task_request,
|
||||
project: project,
|
||||
description: long_description_text)
|
||||
visit project_task_requests_path(project)
|
||||
|
||||
page.execute_script '$("a[data-toggle=popover]").trigger("mouseover")'
|
||||
expect(page).to have_content task_request.description
|
||||
end
|
||||
|
||||
scenario "user does not see open deliverable action in manage dropdown if task status is not completed" do
|
||||
task_request = create(:task_request, project: project)
|
||||
visit project_task_requests_path(project)
|
||||
@@ -70,4 +105,12 @@ feature "User managing task requests" do
|
||||
def add_new_project_label
|
||||
t "projects.index.actions.new"
|
||||
end
|
||||
|
||||
def description_column
|
||||
t 'task_requests.index.table_headers.task_request_description'
|
||||
end
|
||||
|
||||
def long_description_text
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user