add splash screen to the casting calls #66

Closed
bilal.catic wants to merge 1 commits from add-splash-screen-to-the-casting-calls into cast-me-mvp
7 changed files with 171 additions and 42 deletions

View File

@@ -4,6 +4,7 @@ class CastingCallsController < ApplicationController
before_action :set_project
before_action :build_casting_call, only: [:new, :create]
before_action :set_casting_call, only: [:show, :edit, :update, :cancel]
before_action :show_splash_screen, only: :index
def index
@casting_calls = casting_calls.order_by_recent.paginate(page: params[:page])
@@ -45,6 +46,10 @@ class CastingCallsController < ApplicationController
private
def show_splash_screen
render :splash if casting_calls.count.zero?
end
def casting_call_params
params.require(:casting_call).permit(:title, :description, :project_description, :interview_instructions, :interview_requirements, :questions)
end

View File

@@ -0,0 +1,58 @@
<div class="d-flex flex-row">
<div class="d-flex flex-column">
<%= product_wordmark :cast_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(CastingCall).new? %>
<%= link_to t(".actions.create_casting_call"), [:new, @project, :casting_call], 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_information' %></li>
<li><%= t '.list_items.enter_questions' %></li>
<li><%= t '.list_items.copy_and_paste_submission_link' %></li>
<li><%= t '.list_items.wait_for_the_submission_video' %></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.fewer_team_members_needed'))) %>
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.fewer_resources_needed'))) %>
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.more_time_spent_with_quality_candidates'))) %>
</ul>
</div>
</div>
</div>
</div>
</div>

View File

@@ -274,6 +274,23 @@ en:
casting_call_title: Casting Title
new:
heading: New Casting Call
splash:
actions:
book_demo: Schedule a Demo
create_casting_call: Create Casting Call
headings:
benefits: Benefits
how_it_works: How It Works
subtitle: The media industry's first automated casting bot
welcome: Welcome to
list_items:
copy_and_paste_submission_link: Copy and paste the submission link wherever you want
enter_information: Enter information about the role and project
enter_questions: Enter the questions you want the Chatbot to ask
fewer_resources_needed: Fewer resources needed for first round of casting search
fewer_team_members_needed: Fewer team members needed to cast large projects
more_time_spent_with_quality_candidates: More time spent with quality casting candidates
wait_for_the_submission_video: Wait for the casting bot to deliver you casting submission videos
update:
notice: The casting call request has been updated
casting_submission_downloads:

View File

@@ -76,6 +76,26 @@ es:
share_stream: Share live stream link with clients
stream_from_mobile_app: Stream from ME Suite Mobile app, or via a professional camera
stream_multiple_cameras: Stream multiple cameras at one time
casting_calls:
index:
empty: Casting calls will appear here (ES)
splash:
actions:
book_demo: Schedule a Demo (ES)
create_casting_call: Create Casting Call (ES)
headings:
benefits: Benefits (ES)
how_it_works: How It Works (ES)
subtitle: The media industry's first automated casting bot (ES)
welcome: Welcome to (ES)
list_items:
copy_and_paste_submission_link: Copy and paste the submission link wherever you want (ES)
enter_information: Enter information about the role and project (ES)
enter_questions: Enter the questions you want the Chatbot to ask (ES)
fewer_resources_needed: Fewer resources needed for first round of casting search (ES)
fewer_team_members_needed: Fewer team members needed to cast large projects (ES)
more_time_spent_with_quality_candidates: More time spent with quality casting candidates (ES)
wait_for_the_submission_video: Wait for the casting bot to deliver you casting submission videos (ES)
contract_templates:
blank_contracts:
create:

View File

@@ -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,
@@ -772,15 +758,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: -
--
@@ -1522,6 +1499,7 @@ CREATE TABLE public.settings (
--
CREATE SEQUENCE public.settings_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -1557,6 +1535,7 @@ CREATE TABLE public.taggings (
--
CREATE SEQUENCE public.taggings_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -1587,6 +1566,7 @@ CREATE TABLE public.tags (
--
CREATE SEQUENCE public.tags_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -1947,9 +1927,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
);
@@ -2456,14 +2436,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: -
--

View File

@@ -18,7 +18,7 @@ RSpec.describe CastingCallsController, type: :controller do
expect(response).to be_successful
end
it "renders content" do
it "renders content if there are existing broadcasts" do
create(:casting_call, project: project)
get :index, params: { project_id: project }
@@ -36,6 +36,18 @@ RSpec.describe CastingCallsController, type: :controller do
expect(response.body).to have_link("2", href: project_casting_calls_path(project, page: 2))
end
end
context "when there are no records" do
it "renders splash screen" do
CastingCall.destroy_all
get :index, params: { project_id: project }
expect(response.body).not_to have_content no_casting_calls_message
expect(response.body).to have_link create_casting_call
expect(response.body).to have_link schedule_demo
end
end
end
describe "#new" do
@@ -117,4 +129,16 @@ RSpec.describe CastingCallsController, type: :controller do
def update_params
{ description: "This is updated description" }
end
def no_casting_calls_message
t 'casting_calls.index.empty'
end
def create_casting_call
t 'casting_calls.splash.actions.create_casting_call'
end
def schedule_demo
t 'casting_calls.splash.actions.book_demo'
end
end

View File

@@ -1,14 +1,15 @@
require "rails_helper"
feature "User managing casting calls" do
let(:current_user) { create(:user) }
let(:project) { create(:project, account: current_user.primary_account) }
let(:current_user) { create(:user, :manager) }
let(:project) { create(:project, members: current_user, account: current_user.primary_account) }
before :each do
sign_in current_user
end
scenario "casting calls table is visible" do
scenario "casting calls table is visible if there are existing casting calls" do
create(:casting_call, project: project)
visit project_casting_calls_path(project)
expect(page).to have_content "Created On"
@@ -16,11 +17,14 @@ feature "User managing casting calls" do
expect(page).to have_content "Status"
end
scenario "sees list of casting calls" do
scenario "splash page is shown if there are no existing records" do
visit project_casting_calls_path(project)
expect(page).to have_content no_casting_calls_label
expect(page).to have_content schedule_demo
expect(page).to have_content create_casting_call
end
scenario "sees list of casting calls" do
casting_call = create(:casting_call, project: project)
visit project_casting_calls_path(project)
@@ -35,7 +39,6 @@ feature "User managing casting calls" do
scenario "can create casting call requests" do
visit project_casting_calls_path(project)
expect(page).to have_content no_casting_calls_label
click_on add_new_casting_call_label
fill_in title_field, with: "Casting Title"
@@ -92,6 +95,28 @@ feature "User managing casting calls" do
expect(page).to have_content cc.questions
end
context 'When the user is associate' do
let(:current_user) { create(:user, :associate) }
it 'does show button to create new casting call' do
visit project_casting_calls_path(project)
expect(page).to have_content schedule_demo
expect(page).to have_content create_casting_call
end
end
context 'When the user is account manager' do
let(:current_user) { create(:user, :account_manager) }
it 'does show button to create new casting call' do
visit project_casting_calls_path(project)
expect(page).to have_content schedule_demo
expect(page).to have_content create_casting_call
end
end
context "when signed out" do
scenario "user opens public accessible casting call URL" do
cc = create(:casting_call, title: "Dummy title", project: project)
@@ -114,7 +139,7 @@ feature "User managing casting calls" do
private
def no_casting_calls_label
"Casting calls will appear here"
t 'casting_calls.index.empty'
end
def manage_button
@@ -152,4 +177,12 @@ feature "User managing casting calls" do
def questions_field
t "helpers.label.casting_call.questions"
end
def create_casting_call
t 'casting_calls.splash.actions.create_casting_call'
end
def schedule_demo
t 'casting_calls.splash.actions.book_demo'
end
end