Compare commits
2 Commits
add-video-
...
add-splash
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d11ceab916 | ||
|
|
e1c003d6af |
@@ -4,6 +4,7 @@ class TaskRequestsController < ApplicationController
|
||||
before_action :set_project
|
||||
before_action :build_task_request, only: [:new, :create]
|
||||
before_action :set_task_request, only: [:show, :edit, :update, :cancel]
|
||||
before_action :show_splash_screen, only: :index
|
||||
|
||||
def index
|
||||
@task_requests = task_requests.order_by_recent.paginate(page: params[:page])
|
||||
@@ -46,6 +47,10 @@ class TaskRequestsController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
def show_splash_screen
|
||||
render :splash if task_requests.count.zero?
|
||||
end
|
||||
|
||||
def task_request_params
|
||||
params.require(:task_request).permit(:description, :deadline, :time_allowed, :additional_notes, files: [])
|
||||
end
|
||||
|
||||
@@ -13,10 +13,13 @@ module WordmarkHelper
|
||||
css += options[:class].to_s
|
||||
|
||||
content_tag(:div, class: css) do
|
||||
safe_join [
|
||||
elements = [
|
||||
content_tag(:span, t("shared.#{product_name}")),
|
||||
content_tag(:span, t("shared.me"))
|
||||
]
|
||||
prefix = options[:prefix]
|
||||
elements.unshift content_tag(:span, "#{prefix} ") unless prefix.blank?
|
||||
safe_join elements
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
58
app/views/task_requests/splash.html.erb
Normal file
58
app/views/task_requests/splash.html.erb
Normal file
@@ -0,0 +1,58 @@
|
||||
<div class="d-flex flex-row">
|
||||
<div class="d-flex flex-column">
|
||||
<%= product_wordmark :task_me, prefix: t('.headings.welcome'), class: "h2" %>
|
||||
<p class="text-muted"><%= t '.headings.subtitle' %>
|
||||
</div>
|
||||
|
||||
<%= link_to t(".actions.book_demo"), 'https://meetings.hubspot.com/bray2', class: "btn btn-primary border align-self-center h-50 ml-auto mr-2 pb-2", target: '_blank' %>
|
||||
<% if policy(TaskRequest).new? %>
|
||||
<%= link_to t(".actions.create_task_request"), [:new, @project, :task_request], class: "btn btn-success border align-self-center h-50 pb-2" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="pt-2">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card-body p-0">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<div class="embed-responsive-item">
|
||||
<table class="w-100 h-100 bg-secondary">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center align-middle text-white">
|
||||
Video tutorial will be available soon
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3><%= t '.headings.how_it_works' %></h3>
|
||||
<ol>
|
||||
<li><%= t '.list_items.enter_task_request' %></li>
|
||||
<li><%= t '.list_items.state_deadline' %></li>
|
||||
<li><%= t '.list_items.enter_number_of_hours' %></li>
|
||||
<li><%= t '.list_items.virtual_assistant_delivers_task' %></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3><%= t '.headings.benefits' %></h3>
|
||||
<ul class="fa-ul ml-5">
|
||||
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.reduces_need_for_full_time_staff'))) %>
|
||||
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.reduces_workload'))) %>
|
||||
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.spend_per_task'))) %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -324,11 +324,11 @@ en:
|
||||
notice: The release has been updated
|
||||
helpers:
|
||||
help:
|
||||
task_request:
|
||||
time_allowed: Minimum of 2 hours, no partial hours allowed
|
||||
contract_template:
|
||||
fee: Leave at $0.00 for no-fee
|
||||
guardian_clause: Leave blank if not required for this contract
|
||||
task_request:
|
||||
time_allowed: Minimum of 2 hours, no partial hours allowed
|
||||
video:
|
||||
audio_only_edl_file: If you do not upload an Audio Only EDL, the software will not generate a BiG Music Cue Sheet.
|
||||
edl_file: Please follow our directions on exporting the All Tracks EDL. Failure to do so could result in inaccurate and incomplete reporting.
|
||||
@@ -1202,6 +1202,23 @@ en:
|
||||
heading: New Task Request
|
||||
show:
|
||||
empty: Attached files will appear here.
|
||||
splash:
|
||||
actions:
|
||||
book_demo: Schedule a Demo
|
||||
create_task_request: Create Task Request
|
||||
headings:
|
||||
benefits: Benefits
|
||||
how_it_works: How It Works
|
||||
subtitle: Pay-by-the-hour, digitally-enabled remote assistants
|
||||
welcome: Welcome to
|
||||
list_items:
|
||||
enter_number_of_hours: Enter the number of hours you want the task worked on
|
||||
enter_task_request: Enter your task request
|
||||
reduces_need_for_full_time_staff: Reduces need to hire full-time staff
|
||||
reduces_workload: Reduces workload for current staff
|
||||
spend_per_task: Spend as little as $60 per task
|
||||
state_deadline: State your deadline
|
||||
virtual_assistant_delivers_task: Virtual assistant delivers task via TaskME portal
|
||||
task_request:
|
||||
actions:
|
||||
manage: Manage
|
||||
|
||||
@@ -358,6 +358,23 @@ es:
|
||||
index:
|
||||
table_headers:
|
||||
task_request_description: Description (ES)
|
||||
splash:
|
||||
actions:
|
||||
book_demo: Schedule a Demo (ES)
|
||||
create_task_request: Create Task Request
|
||||
headings:
|
||||
benefits: Benefits (ES)
|
||||
how_it_works: How It Works (ES)
|
||||
subtitle: Pay-by-the-hour, digitally-enabled remote assistants (ES)
|
||||
welcome: Welcome to (ES)
|
||||
list_items:
|
||||
enter_number_of_hours: Enter the number of hours you want the task worked on (ES)
|
||||
enter_task_request: Enter your task request (ES)
|
||||
reduces_need_for_full_time_staff: Reduces need to hire full-time staff (ES)
|
||||
reduces_workload: Reduces workload for current staff (ES)
|
||||
spend_per_task: Spend as little as $60 per task (ES)
|
||||
state_deadline: State your deadline (ES)
|
||||
virtual_assistant_delivers_task: Virtual assistant delivers task via TaskME portal (ES)
|
||||
task_request:
|
||||
actions:
|
||||
manage: Manage (ES)
|
||||
|
||||
@@ -9,20 +9,6 @@ SET xmloption = content;
|
||||
SET client_min_messages = warning;
|
||||
SET row_security = off;
|
||||
|
||||
--
|
||||
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
|
||||
--
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
|
||||
|
||||
|
||||
--
|
||||
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
|
||||
--
|
||||
|
||||
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
|
||||
|
||||
|
||||
--
|
||||
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
|
||||
--
|
||||
@@ -331,8 +317,8 @@ CREATE TABLE public.appearance_releases (
|
||||
person_last_name character varying,
|
||||
guardian_first_name character varying,
|
||||
guardian_last_name character varying,
|
||||
guardian_email character varying,
|
||||
identifier character varying,
|
||||
guardian_email character varying,
|
||||
person_address_street2 character varying,
|
||||
person_address_city character varying,
|
||||
person_address_state character varying,
|
||||
@@ -666,15 +652,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: -
|
||||
--
|
||||
@@ -1401,6 +1378,7 @@ CREATE TABLE public.settings (
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.settings_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
@@ -1436,6 +1414,7 @@ CREATE TABLE public.taggings (
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.taggings_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
@@ -1466,6 +1445,7 @@ CREATE TABLE public.tags (
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public.tags_id_seq
|
||||
AS integer
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
@@ -1826,9 +1806,9 @@ CREATE TABLE public.zoom_meetings (
|
||||
api_meeting_id character varying,
|
||||
created_at timestamp(6) without time zone NOT NULL,
|
||||
updated_at timestamp(6) without time zone NOT NULL,
|
||||
status integer DEFAULT 0,
|
||||
zoom_user_id bigint,
|
||||
project_id bigint
|
||||
project_id bigint,
|
||||
status integer DEFAULT 0
|
||||
);
|
||||
|
||||
|
||||
@@ -2305,14 +2285,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: -
|
||||
--
|
||||
|
||||
@@ -18,7 +18,14 @@ RSpec.describe TaskRequestsController, type: :controller do
|
||||
expect(response).to be_successful
|
||||
end
|
||||
|
||||
it "renders content" do
|
||||
it "renders splash page if there are no task requests" do
|
||||
get :index, params: { project_id: project }
|
||||
|
||||
expect(response.body).to have_link "Create Task Request"
|
||||
expect(response.body).to have_link schedule_demo
|
||||
end
|
||||
|
||||
it "renders task requests table if there are task requests" do
|
||||
create(:task_request, project: project, description: "Another Request")
|
||||
|
||||
get :index, params: { project_id: project }
|
||||
@@ -126,4 +133,8 @@ RSpec.describe TaskRequestsController, type: :controller do
|
||||
def update_params
|
||||
{ description: "This is updated description" }
|
||||
end
|
||||
|
||||
def schedule_demo
|
||||
t 'task_requests.splash.actions.book_demo'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,7 +8,14 @@ feature "User managing task requests" do
|
||||
sign_in current_user
|
||||
end
|
||||
|
||||
scenario "splash page is shown if there are no task requests" do
|
||||
visit project_task_requests_path(project)
|
||||
|
||||
expect(page).to have_content schedule_demo
|
||||
end
|
||||
|
||||
scenario "task requests table is visible" do
|
||||
create(:task_request, project: project, description: 'Short Desc')
|
||||
visit project_task_requests_path(project)
|
||||
|
||||
expect(page).to have_content "Created On"
|
||||
@@ -19,10 +26,6 @@ feature "User managing task requests" do
|
||||
end
|
||||
|
||||
scenario "sees list of task requests" do
|
||||
visit project_task_requests_path(project)
|
||||
|
||||
expect(page).to have_content no_task_requests_label
|
||||
|
||||
task_request = create(:task_request, project: project)
|
||||
|
||||
visit project_task_requests_path(project)
|
||||
@@ -113,4 +116,8 @@ feature "User managing task requests" do
|
||||
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
|
||||
|
||||
def schedule_demo
|
||||
t 'task_requests.splash.actions.book_demo'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user