nil, :check_out => nil).each do |active|
26 | hour=time_diff(active.check_out, active.check_in)
27 | pay=hour*(get_amount(event))
28 | final_pay << pay
29 | end
30 | end
31 |
32 | end
33 | @total_attendance=attendance.collect { |c| c }.compact.reduce(0, :+)
34 | @total_sample=sample.collect { |c| c }.compact.reduce(0, :+)
35 | @total=total.collect { |c| c }.compact.reduce(0, :+)
36 | @total_product_cost=product_cost.collect { |c| c }.compact.flatten.reduce(0, :+)
37 | @total_payment=final_pay.collect { |c| c }.compact.reduce(0, :+)
38 | respond_to do |format|
39 | format.html {}
40 | format.js {
41 | html = render_to_string :partial => 'admin/dashboard/events', layout: false, :locals => {:events => @events}
42 | render :json => {:success => true, :html => html} }
43 |
44 | end
45 | end
46 |
47 |
48 | def images
49 | @user_event=UserEvent.find(params[:user_event])
50 | end
51 | end
--------------------------------------------------------------------------------
/app/controllers/admin/groups_controller.rb:
--------------------------------------------------------------------------------
1 | class Admin::GroupsController < Admin::AdminApplicationController
2 |
3 |
4 | def index
5 | @groups=@current_client.groups.page(params[:page]).per(10)
6 | end
7 |
8 | def new
9 | @group=@current_client.groups.new
10 | @promo_reps=@current_client.users.promo_rep.uniq
11 | end
12 |
13 | def create
14 | @group=Group.new(group_params)
15 | @group.user_ids= params[:group][:user_ids].reject(&:blank?)
16 | @group.save
17 | @current_client.groups << @group
18 | @current_client.save
19 | redirect_to admin_groups_path
20 | end
21 |
22 | def edit
23 | @group=@current_client.groups.find(params[:id])
24 | @promo_reps=@current_client.users.promo_rep.uniq
25 | end
26 |
27 | def update
28 | @group=@current_client.groups.find(params[:id])
29 | @group.assign_attributes(group_params)
30 | if @group.valid?
31 | @group.user_ids = params[:group][:user_ids].reject(&:blank?)
32 | @group.save
33 | redirect_to admin_groups_path
34 | else
35 | flash[:error]=@group.errors.full_messages.join(', ')
36 | redirect_to :back
37 | end
38 | end
39 |
40 |
41 | private
42 | def group_params
43 | params.require(:group,).permit(:name)
44 | end
45 | end
--------------------------------------------------------------------------------
/app/controllers/api/v1/api_application_controller.rb:
--------------------------------------------------------------------------------
1 |
2 | class Api::V1::ApiApplicationController < ApplicationController
3 | respond_to :json
4 | include ApplicationHelper
5 |
6 | protect_from_forgery with: :null_session
7 |
8 | acts_as_token_authentication_handler_for User
9 | before_filter :authenticate_user_from_token!
10 |
11 | rescue_from Exception do |e|
12 | Rails.logger.error e.to_s
13 | Rails.logger.error e.backtrace.join("\n")
14 | render json: {success: :false, error: {code: 500, message: 'Something Went Wrong!'}}, status: 200
15 | end
16 |
17 |
18 | end
19 |
--------------------------------------------------------------------------------
/app/controllers/api/v1/contacts_controller.rb:
--------------------------------------------------------------------------------
1 | class Api::V1::ContactsController < Api::V1::ApiApplicationController
2 |
3 | skip_before_action :authenticate_user_from_token!, :only => [:create]
4 |
5 | def create
6 | unless params[:contact][:details].nil?
7 | @contact=Contact.new(:details => params[:contact][:details])
8 | @contact.save
9 | end
10 | UserJob.perform_later('contact', @contact)
11 | end
12 |
13 | private
14 | def contact_params
15 | params.require(:contact).permit(:details => {})
16 | end
17 |
18 |
19 | end
--------------------------------------------------------------------------------
/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | # Prevent CSRF attacks by raising an exception.
3 | # For APIs, you may want to use :null_session instead.
4 | include ApplicationHelper
5 | protect_from_forgery
6 | # before_action :authenticate_user!
7 |
8 | def set_notification
9 | request.env['exception_notifier.exception_data'] = {'server' => Rails.env}
10 | # can be any key-value pairs
11 | end
12 |
13 | def after_sign_in_path_for(resource)
14 | if resource.super_admin?
15 | superadmin_clients_path
16 | elsif resource.client_admin?
17 | admin_dashboard_index_path
18 | else
19 | homes_path
20 | end
21 | end
22 |
23 | alias_method :orig_current_user, :current_user
24 | helper_method :current_user
25 | helper_method :orig_current_user
26 |
27 | def current_user
28 | if session[:slave_user_id]
29 | @current_slave_user ||= User.find(session[:slave_user_id].to_i)
30 | else
31 | orig_current_user
32 | end
33 | end
34 |
35 | helper_method :current_user_slave?
36 |
37 | def current_user_slave?
38 | !session[:slave_user_id].nil?
39 | end
40 |
41 | end
42 |
--------------------------------------------------------------------------------
/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/app/controllers/concerns/.keep
--------------------------------------------------------------------------------
/app/controllers/events_controller.rb:
--------------------------------------------------------------------------------
1 | class EventsController < ApplicationController
2 |
3 |
4 | def show
5 | @event=Event.find(params[:id])
6 | if params[:token]
7 | user_event=UserEvent.find_by(token: params[:token])
8 | if @event.end_time < Time.now.utc
9 | @msg= "Event expired"
10 | else
11 | if user_event.promo_group?
12 | if params[:status]=="accept"
13 | if user_event.accepted?
14 | @msg= "Event accepted already!"
15 | else
16 | if @event.max_users > @event.user_events.where(:status => UserEvent::statuses[:accepted], :category => UserEvent::categories[:promo_group]).count
17 | user_event.status = :accepted
18 | user_event.save
19 | @msg= "Event accepted successfully!"
20 | else
21 | @msg= "Sorry!!Event reached max no of users!"
22 | end
23 | end
24 |
25 | elsif params[:status]=="decline"
26 | user_event.status = :declined
27 | user_event.save
28 | @msg= "Event declined sucessfully"
29 | end
30 | end
31 | end
32 | end
33 | end
34 |
35 | end
36 |
37 |
--------------------------------------------------------------------------------
/app/controllers/homes_controller.rb:
--------------------------------------------------------------------------------
1 | class HomesController < ApplicationController
2 |
3 | def index
4 |
5 | end
6 |
7 | end
--------------------------------------------------------------------------------
/app/controllers/invitations_controller.rb:
--------------------------------------------------------------------------------
1 | class InvitationsController < Devise::InvitationsController
2 | before_action :configure_permitted_parameters, if: :devise_controller?
3 |
4 |
5 | def after_accept_path_for(resource)
6 | if resource.super_admin?
7 | superadmin_clients_path
8 | elsif resource.client_admin?
9 | admin_dashboard_index_path
10 | else
11 | homes_path
12 | end
13 | end
14 |
15 | protected
16 |
17 | def configure_permitted_parameters
18 | devise_parameter_sanitizer.permit(:accept_invitation, keys: [:first_name, :last_name, :email])
19 | end
20 |
21 | end
--------------------------------------------------------------------------------
/app/controllers/superadmin/event_types_controller.rb:
--------------------------------------------------------------------------------
1 | class Superadmin::EventTypesController < Superadmin::SuperadminApplicationController
2 |
3 |
4 | def index
5 | @event_types=EventType.all.page(params[:page]).per(20)
6 | end
7 |
8 |
9 | def new
10 | @event_type=EventType.new
11 | end
12 |
13 | def create
14 | @event_type=EventType.new(event_type_params)
15 | if @event_type.save
16 | redirect_to superadmin_event_types_path
17 | else
18 | flash[:error]=@event_type.errors.full_messages.join(', ')
19 | render :new
20 | end
21 | end
22 |
23 | def edit
24 | @event_type=EventType.find(params[:id])
25 | end
26 |
27 | def update
28 | @event_type=EventType.find(params[:id])
29 | if @event_type.update_attributes(event_type_params)
30 | redirect_to superadmin_event_types_path
31 | else
32 | flash[:error]=@event_type.errors.full_messages.join(', ')
33 | render :edit
34 | end
35 | end
36 |
37 | private
38 | def event_type_params
39 | params.require(:event_type).permit(:name)
40 | end
41 |
42 | end
--------------------------------------------------------------------------------
/app/controllers/superadmin/events_controller.rb:
--------------------------------------------------------------------------------
1 | class Superadmin::EventsController < Superadmin::SuperadminApplicationController
2 |
3 |
4 | def index
5 | @events = Event.active.order('updated_at desc')
6 | unless @events.kind_of?(Array)
7 | @events = @events.page(params[:page]).per(20)
8 | else
9 | @events = Kaminari.paginate_array(@events.uniq).page(params[:page]).per(20)
10 | end
11 | end
12 |
13 | def destroy
14 | @event = Event.find(params[:id])
15 | @event.update_attribute(:deleted, true)
16 | flash[:notice] = 'Event deleted Successfully'
17 | redirect_to superadmin_events_path
18 | end
19 |
20 | end
--------------------------------------------------------------------------------
/app/controllers/superadmin/groups_controller.rb:
--------------------------------------------------------------------------------
1 | class Superadmin::GroupsController < Superadmin::SuperadminApplicationController
2 |
3 |
4 | def index
5 | @groups=Group.all.page(params[:page]).per(10)
6 | end
7 |
8 | def new
9 | @group=Group.new
10 | @promo_reps=User.promo_rep
11 | end
12 |
13 | def create
14 | @group=Group.new(group_params)
15 | @group.user_ids= params[:group][:user_ids].reject(&:blank?)
16 | @group.save
17 | redirect_to superadmin_groups_path
18 | end
19 |
20 | def edit
21 | @group=Group.find(params[:id])
22 | @promo_reps=User.promo_rep
23 | end
24 |
25 | def update
26 | @group=Group.find(params[:id])
27 | @group.assign_attributes(group_params)
28 | if @group.valid?
29 | @group.user_ids = params[:group][:user_ids].reject(&:blank?)
30 | @group.save
31 | redirect_to superadmin_groups_path
32 | else
33 | flash[:error]=@group.errors.full_messages.join(', ')
34 | redirect_to :back
35 | end
36 | end
37 |
38 |
39 | private
40 | def group_params
41 | params.require(:group,).permit(:name)
42 | end
43 | end
--------------------------------------------------------------------------------
/app/controllers/superadmin/promo_reps_controller.rb:
--------------------------------------------------------------------------------
1 | require 'platform/email_helper'
2 | class Superadmin::PromoRepsController < Superadmin::SuperadminApplicationController
3 | include EmailHelper
4 |
5 | def index
6 | @promo_reps=User.where(role: 'promo_rep').order('first_name').collect { |u| u }
7 | unless @promo_reps.kind_of?(Array)
8 | @promo_reps = @promo_reps.page(params[:page]).per(10)
9 | else
10 | @promo_reps = Kaminari.paginate_array(@promo_reps.uniq).page(params[:page]).per(10)
11 | end
12 | end
13 |
14 | def new
15 | @promo_rep=User.new
16 | end
17 |
18 | def create
19 | pro_rep=User.new(user_params)
20 | pro_rep.password = generate_token
21 | pro_rep.token = generate_token
22 | if pro_rep.save
23 | UserJob.perform_later('add_rep', pro_rep)
24 | redirect_to superadmin_promo_reps_path
25 | else
26 | flash[:error]=pro_rep.errors.full_messages.join(', ')
27 | redirect_to :back
28 | end
29 | end
30 |
31 |
32 | def edit
33 | @promo_rep=User.find(params[:id])
34 | end
35 |
36 | def update
37 | @promo_rep=User.find(params[:id])
38 | if @promo_rep.update_attributes(user_params)
39 | redirect_to superadmin_promo_reps_path
40 | else
41 | flash[:error]=@promo_rep.errors.full_messages.join(', ')
42 | redirect_to :back
43 | end
44 | end
45 |
46 |
47 | def resend
48 | @promo_rep=User.find(params[:promo_rep_id])
49 | @promo_rep.update_attribute(:token, generate_token)
50 | UserJob.perform_later('resend_token', @promo_rep)
51 | flash[:notice] = "Password sent!"
52 | redirect_to superadmin_promo_reps_path
53 | end
54 |
55 |
56 | private
57 | def user_params
58 | params.require(:user).permit(:first_name, :last_name, :email, :role, :area ,:phone)
59 | end
60 | end
--------------------------------------------------------------------------------
/app/controllers/superadmin/superadmin_application_controller.rb:
--------------------------------------------------------------------------------
1 | module Superadmin
2 | class SuperadminApplicationController < ApplicationController
3 | protect_from_forgery with: :exception
4 |
5 | before_action :authenticate_user!
6 |
7 | layout 'superadmin/application'
8 |
9 | def authenticate_superadmin
10 | if current_user.super_admin? and ENV['superadmins'].split(',').include? current_user.email
11 | true
12 | end
13 | end
14 |
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/app/controllers/superadmin/users_controller.rb:
--------------------------------------------------------------------------------
1 | class Superadmin::UsersController < Superadmin::SuperadminApplicationController
2 |
3 | def index
4 | @client=Client.find(params[:client_id])
5 | @users=@client.users.active_users.client_admin
6 | end
7 |
8 | def new
9 | @client=Client.find(params[:client_id])
10 | @user=@client.users.new
11 | end
12 |
13 | def create
14 | @client=Client.find(params[:client_id])
15 | user = User.find_by_email(params[:user][:email])
16 | if user.nil?
17 | user=User.new(user_params)
18 | user.invite!
19 | @client.users << user
20 | @client.save
21 | flash[:notice]= "Admin Invited Sucessfully"
22 | redirect_to superadmin_client_users_path
23 | elsif user.deleted
24 | user.deleted = false
25 | user.update_attributes(user_params)
26 | user.invite!
27 | unless @client.user_ids.include? user.id
28 | @client.users << user
29 | @client.save
30 | end
31 | flash[:notice]= "Admin Invited Sucessfully"
32 | redirect_to superadmin_client_users_path
33 | else
34 | flash[:error]= "User Already Exists"
35 | redirect_to :back
36 | end
37 | end
38 |
39 | def resend_invitation
40 | @user = User.find(params[:user_id])
41 | @user.invite!
42 | flash[:notice] = 'Invitation sent!'
43 | redirect_to superadmin_client_users_path
44 | end
45 |
46 | def destroy
47 | @client=Client.find(params[:client_id])
48 | @user = User.find(params[:id])
49 | @users=@client.users.active_users.client_admin
50 | if @users.size>1
51 | @client.users.delete(@user)
52 | @user.update_attribute(:deleted , true)
53 | @client.admin=@users.first
54 | @client.save
55 | flash[:notice] = 'Admin deleted successfully!'
56 | redirect_to superadmin_client_users_path
57 | else
58 | flash[:notice] = 'Their should atleast one active admin'
59 | redirect_to :back
60 | end
61 | end
62 |
63 | private
64 | def user_params
65 | params.require(:user).permit(:first_name, :last_name, :email, :role)
66 | end
67 |
68 |
69 | end
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 |
3 | def bootstrap_class_for flash_type
4 | {success: 'success', error: 'danger', alert: 'warning', notice: 'info'}[flash_type] || flash_type.to_s
5 | end
6 |
7 | def active_class(path)
8 | if ((['new', 'edit'].include? params[:action]) && (request.path.include? path)) || (request.path == path)
9 | 'left-menu-list-active'
10 | else
11 | ''
12 | end
13 | end
14 |
15 | def generate_token
16 | (10000..99999).to_a.sample
17 | end
18 |
19 |
20 | def time_diff(end_time, start_time)
21 | hours=((end_time.to_i - start_time.to_i)/(60 * 60.00)).abs.round
22 | if hours > 1
23 | hours
24 | else
25 | 1
26 | end
27 | end
28 |
29 |
30 | def formatted_api_datetime(datetime)
31 | if datetime.blank?
32 | ''
33 | else
34 | datetime.strftime('%Y-%m-%dT%H:%M:%SZ')
35 | end
36 | end
37 |
38 | def add_images(images, event)
39 | success = true
40 | error={}
41 | images_count=event.images.count
42 | unless images.nil?
43 | if event.images.count<5 and event.images.count+images.count<=5
44 | event.images += images
45 | else
46 | success = false
47 | if (5-images_count==0) or (5-images_count<0)
48 | error={:code => 709, :message => "There are already #{images_count} file uploaded.Cant upload files "}
49 | else
50 | error={:code => 709, :message => "There are already #{images_count} file uploaded.Upload upto #{5-images_count} files "}
51 | end
52 | end
53 | end
54 | return success, error, event.images
55 | end
56 |
57 | def get_amount(event)
58 | if !event.client.payment.blank?
59 | event.client.payment
60 | elsif !event.pay.blank?
61 | event.pay
62 | end
63 | end
64 |
65 | end
66 |
--------------------------------------------------------------------------------
/app/jobs/application_job.rb:
--------------------------------------------------------------------------------
1 | class ApplicationJob < ActiveJob::Base
2 | end
3 |
--------------------------------------------------------------------------------
/app/jobs/event_job.rb:
--------------------------------------------------------------------------------
1 | require 'platform/email_helper'
2 | class EventJob < ApplicationJob
3 | queue_as :default
4 | include EmailHelper
5 |
6 | def perform(type, event, user_ids, params = {})
7 | case type
8 | when 'event'
9 | email_data={}
10 | email_data[:body] = "Please find below the event details"
11 | email_data[:subject]="#{event.name} :#{event.id}"
12 | user_ids.each do |id|
13 | user=User.find(id)
14 | user_event=event.user_events.where(:user_id => user.id).first
15 | email_data[:event]=get_event(event, user)
16 | EventMailer.accept_event(user.email, email_data, {token: user_event.token, category: user_event.category}).deliver
17 | end
18 | end
19 | end
20 |
21 | end
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/jobs/user_job.rb:
--------------------------------------------------------------------------------
1 | require 'platform/email_helper'
2 | class UserJob < ApplicationJob
3 | queue_as :default
4 | include EmailHelper
5 |
6 | def perform(type, promo_rep, params = {})
7 | case type
8 | when 'add_rep', 'resend_token'
9 | email_data={}
10 | email_data[:body] = "find below the new passcode for the Direct Sourced"
11 | email_data[:subject]="New passcode for Direct Sourced :#{promo_rep.id}"
12 | email_data[:user]=promo_ref_info(promo_rep)
13 | UserMailer.send_code(promo_rep.email, email_data).deliver
14 | when 'contact'
15 | email_data={}
16 | email_data[:body] = "Find below the New Direct Sourced details"
17 | email_data[:subject]="New Direct Sourced Registered"
18 | email_data[:contact]=get_contact(promo_rep)
19 | UserMailer.send_contact(promo_rep.details["email"], email_data).deliver
20 | end
21 | end
22 | end
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/mailers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/app/mailers/.keep
--------------------------------------------------------------------------------
/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: "admin@promotracks.com"
3 | end
4 |
--------------------------------------------------------------------------------
/app/mailers/event_mailer.rb:
--------------------------------------------------------------------------------
1 | class EventMailer < ApplicationMailer
2 |
3 | def accept_event(to_email, data, params)
4 | @data = data
5 | @data[:token]= params[:token]
6 | @data[:type]=params[:category]
7 | mail(:to => to_email,:cc=> 'admin@promotracks.com', :subject => @data[:subject])
8 | end
9 |
10 | end
--------------------------------------------------------------------------------
/app/mailers/user_mailer.rb:
--------------------------------------------------------------------------------
1 | class UserMailer < ApplicationMailer
2 |
3 | def send_email(to_email, data)
4 | @data = data
5 | mail(:to => to_email, :subject => @data[:subject])
6 | end
7 |
8 | def send_code(to_email, data)
9 | @data = data
10 | mail(:to => to_email, :subject => @data[:subject])
11 | end
12 |
13 | def send_contact(to_email, data)
14 | @data = data
15 | if Rails.env.production?
16 | email = 'admin@promotracks.com'
17 | else
18 | email = 'admin@promotracks.com'
19 | end
20 | mail(:to => email, :subject => @data[:subject])
21 | end
22 |
23 | end
--------------------------------------------------------------------------------
/app/models/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/app/models/.keep
--------------------------------------------------------------------------------
/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class ApplicationRecord < ActiveRecord::Base
2 | self.abstract_class = true
3 | end
4 |
--------------------------------------------------------------------------------
/app/models/brand.rb:
--------------------------------------------------------------------------------
1 | class Brand < ActiveRecord::Base
2 | belongs_to :user
3 | has_many :events
4 | has_and_belongs_to_many :clients, join_table: :client_brands
5 |
6 | def self.active_brands
7 | where(deleted: false)
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/models/client.rb:
--------------------------------------------------------------------------------
1 | class Client < ActiveRecord::Base
2 | has_many :events
3 | has_and_belongs_to_many :users , join_table: :clients_users
4 | has_and_belongs_to_many :brands, join_table: :client_brands
5 | has_and_belongs_to_many :groups, join_table: :clients_groups
6 | belongs_to :admin, class_name: 'User', foreign_key: :admin_id
7 | accepts_nested_attributes_for :brands, reject_if: :all_blank, allow_destroy: true
8 | accepts_nested_attributes_for :admin, reject_if: :all_blank, allow_destroy: true
9 | end
10 |
--------------------------------------------------------------------------------
/app/models/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/app/models/concerns/.keep
--------------------------------------------------------------------------------
/app/models/contact.rb:
--------------------------------------------------------------------------------
1 | class Contact < ApplicationRecord
2 | end
3 |
--------------------------------------------------------------------------------
/app/models/event.rb:
--------------------------------------------------------------------------------
1 | class Event < ActiveRecord::Base
2 |
3 | belongs_to :client
4 | belongs_to :group
5 | belongs_to :brand
6 | has_one :address, class_name: 'Location'
7 | belongs_to :creator, class_name: 'User', :foreign_key => 'user_id'
8 | has_many :user_events
9 | belongs_to :event_type
10 | has_many :users, :through => :user_events
11 | accepts_nested_attributes_for :address, reject_if: :all_blank, allow_destroy: true
12 |
13 | enum promo_category: [:promo_rep, :promo_group]
14 |
15 | def self.active
16 | self.where(deleted: false)
17 | end
18 |
19 | def self.active_events
20 | self.where('(end_time NOTNULL AND end_time > ?)', Time.now- 1.hour)
21 | .where(:user_events => {:status => UserEvent::statuses[:accepted], :check_out => nil})
22 | end
23 |
24 |
25 | def self.checkedin_events
26 | self.where('(end_time NOTNULL AND end_time > ?)', Time.now)
27 | .where(:user_events => {:status => UserEvent::statuses[:accepted], :check_out => nil}).where.not(:user_events => {:check_in => nil})
28 | end
29 |
30 | def self.expired_events
31 | self.where('(end_time NOTNULL AND end_time < ?)', Time.now)
32 | .where(:user_events => {:status => UserEvent::statuses[:accepted], :check_out => nil}).where.not(:user_events => {:check_in => nil})
33 | end
34 |
35 | SORT_BY =
36 | {
37 | # 'Date (dsc)' => 'nd',
38 | # 'Date (asc)' => 'na',
39 | 'Type (asc)' => 'ta',
40 | 'Type (dsc)' => 'td',
41 | 'Area (asc)' => 'aa',
42 | 'Area (dsc)' => 'ad',
43 | }
44 |
45 | def self.order_events(sort)
46 | if sort.nil? or sort=='nd'
47 | order(start_time: :desc)
48 | elsif sort=='na'
49 | order(start_time: :asc)
50 | elsif sort=='td'
51 | order('event_types.name DESC')
52 | elsif sort=='ta'
53 | order('event_types.name ASC')
54 | elsif sort=='aa'
55 | order(area: :asc)
56 | elsif sort=='ad'
57 | order(area: :desc)
58 | end
59 | end
60 |
61 | end
62 |
--------------------------------------------------------------------------------
/app/models/event_type.rb:
--------------------------------------------------------------------------------
1 | class EventType < ActiveRecord::Base
2 | has_many :events
3 | end
4 |
--------------------------------------------------------------------------------
/app/models/group.rb:
--------------------------------------------------------------------------------
1 | class Group < ActiveRecord::Base
2 | # has_many :users
3 | has_and_belongs_to_many :clients, join_table: :clients_groups
4 | has_many :group_members
5 | has_many :users ,:through => :group_members
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/group_member.rb:
--------------------------------------------------------------------------------
1 | class GroupMember < ActiveRecord::Base
2 |
3 | belongs_to :group
4 | belongs_to :user
5 |
6 | end
--------------------------------------------------------------------------------
/app/models/location.rb:
--------------------------------------------------------------------------------
1 | class Location < ActiveRecord::Base
2 | belongs_to :event
3 |
4 | geocoded_by :full_address
5 | after_validation :geocode, if: Proc.new {|obj| (!obj.latitude.present? or !obj.longitude.present?)}
6 |
7 |
8 | def full_address
9 | if formatted_address.blank?
10 | [address_1, city, state, zip].compact.reject(&:empty?).join(', ')
11 | else
12 | formatted_address
13 | end
14 |
15 | end
16 |
17 | after_validation :reverse_geocode
18 |
19 | reverse_geocoded_by :latitude, :longitude do |obj, results|
20 | if geo = results.first
21 | obj.time_zone = Timezone.lookup(geo.latitude, geo.longitude)
22 | end
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/app/models/user.rb:
--------------------------------------------------------------------------------
1 | class User < ActiveRecord::Base
2 | # Include default devise modules. Others available are:
3 | # :confirmable, :lockable, :timeoutable and :omniauthable
4 | acts_as_token_authenticatable
5 | devise :invitable, :database_authenticatable, :registerable,
6 | :recoverable, :rememberable, :trackable, :validatable, password_length: 5..128, :invite_for => 2.weeks
7 | belongs_to :event
8 | belongs_to :group
9 | has_many :user_events
10 | has_many :events, :through => :user_events
11 | has_many :brands
12 | has_many :group_members
13 | has_many :groups ,:through => :group_members
14 | has_and_belongs_to_many :clients , join_table: :clients_users
15 | accepts_nested_attributes_for :clients, reject_if: :all_blank, allow_destroy: true
16 | mount_uploader :image, ImageUploader
17 |
18 | enum role: [:promo_rep, :super_admin, :client_admin]
19 |
20 |
21 | def full_name
22 | "#{first_name} #{last_name}"
23 | end
24 |
25 | def self.active_users
26 | self.where(deleted: false)
27 | end
28 |
29 | def self.group_members
30 | promo_rep.where(:group_id => nil).order('first_name')
31 | end
32 |
33 | def self.promo_representatives
34 | where(role: 'promo_rep').order('first_name')
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/app/models/user_event.rb:
--------------------------------------------------------------------------------
1 | class UserEvent < ActiveRecord::Base
2 | belongs_to :event
3 | belongs_to :user
4 | mount_uploaders :images, ImagesUploader
5 |
6 | enum category: [:promo_rep, :promo_group]
7 | enum status: [:invited, :accepted, :declined]
8 |
9 | end
--------------------------------------------------------------------------------
/app/uploaders/image_uploader.rb:
--------------------------------------------------------------------------------
1 | class ImageUploader < CarrierWave::Uploader::Base
2 |
3 | # Include RMagick or MiniMagick support:
4 | # include CarrierWave::RMagick
5 | # include CarrierWave::MiniMagick
6 |
7 | # Choose what kind of storage to use for this uploader:
8 | #storage :file
9 | # storage :fog
10 |
11 | # Override the directory where uploaded files will be stored.
12 | # This is a sensible default for uploaders that are meant to be mounted:
13 | def store_dir
14 | "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
15 | end
16 |
17 | # Provide a default URL as a default if there hasn't been a file uploaded:
18 | # def default_url
19 | # # For Rails 3.1+ asset pipeline compatibility:
20 | # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
21 | #
22 | # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
23 | # end
24 |
25 | # Process files as they are uploaded:
26 | # process scale: [200, 300]
27 | #
28 | # def scale(width, height)
29 | # # do something
30 | # end
31 |
32 | # Create different versions of your uploaded files:
33 | # version :thumb do
34 | # process resize_to_fit: [50, 50]
35 | # end
36 |
37 | # Add a white list of extensions which are allowed to be uploaded.
38 | # For images you might use something like this:
39 | # def extension_whitelist
40 | # %w(jpg jpeg gif png)
41 | # end
42 |
43 | # Override the filename of the uploaded files:
44 | # Avoid using model.id or version_name here, see uploader/store.rb for details.
45 | # def filename
46 | # "something.jpg" if original_filename
47 | # end
48 |
49 | end
50 |
--------------------------------------------------------------------------------
/app/uploaders/images_uploader.rb:
--------------------------------------------------------------------------------
1 | class ImagesUploader < CarrierWave::Uploader::Base
2 |
3 | # Include RMagick or MiniMagick support:
4 | # include CarrierWave::RMagick
5 | # include CarrierWave::MiniMagick
6 |
7 | # Choose what kind of storage to use for this uploader:
8 | #storage :file
9 | # storage :fog
10 |
11 | # Override the directory where uploaded files will be stored.
12 | # This is a sensible default for uploaders that are meant to be mounted:
13 | def store_dir
14 | "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
15 | end
16 |
17 | # Provide a default URL as a default if there hasn't been a file uploaded:
18 | # def default_url
19 | # # For Rails 3.1+ asset pipeline compatibility:
20 | # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
21 | #
22 | # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
23 | # end
24 |
25 | # Process files as they are uploaded:
26 | # process scale: [200, 300]
27 | #
28 | # def scale(width, height)
29 | # # do something
30 | # end
31 |
32 | # Create different versions of your uploaded files:
33 | # version :thumb do
34 | # process resize_to_fit: [50, 50]
35 | # end
36 |
37 | # Add a white list of extensions which are allowed to be uploaded.
38 | # For images you might use something like this:
39 | # def extension_whitelist
40 | # %w(jpg jpeg gif png)
41 | # end
42 |
43 | # Override the filename of the uploaded files:
44 | # Avoid using model.id or version_name here, see uploader/store.rb for details.
45 | # def filename
46 | # "something.jpg" if original_filename
47 | # end
48 |
49 | end
50 |
--------------------------------------------------------------------------------
/app/views/admin/clients/edit.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render partial: 'superadmin/clients/form'
--------------------------------------------------------------------------------
/app/views/admin/dashboard/images.html.slim:
--------------------------------------------------------------------------------
1 | section.panel
2 | .panel-heading
3 | h3
4 | | Images
5 |
6 | =link_to 'Back', :back, :class => 'pull-right btn btn-default'
7 | .panel-body
8 | br
9 | .row
10 | - @user_event&.images.each do |img|
11 | .col-md-4
12 | a.pop href="javascript:void;"
13 | img src=image_path(img) style=("width: 400px; height: 264px;") /
14 | h5
15 | #imagemodal.modal.fade aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1"
16 | .modal-dialog
17 | .modal-content
18 | .modal-body
19 | button.close data-dismiss="modal" type="button"
20 | span aria-hidden="true" ×
21 | span.sr-only Close
22 | img.imagepreview src="" style=("width: 100%;") /
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/views/admin/dashboard/index.html.slim:
--------------------------------------------------------------------------------
1 | div
2 | .panel
3 | .panel-heading
4 | .row
5 | .col-md-6
6 | h3 Dashboard - #{@current_client.name}
7 | .pull-right.col-md-3
8 | .form-group
9 | = select_tag :sort_by, options_for_select(Event::SORT_BY, selected_key = params[:sort]), {:title=>'Nothing Selected',class: 'form-control selectpicker', id: 'order-select'}
10 | .pull-right style="margin-top: 4px;"
11 | h6.filter Filter
12 | .panel-body
13 | #events_list
14 | =render partial: 'admin/dashboard/events', :locals => {:events => @events}
15 | .row
16 | .col-md-12
17 | small
18 | /.text-inline.text-danger *
19 | .text-inline Times are in the respective location's timezone
20 | .row
21 | .col-md-12
22 | small
23 | /.text-inline.text-danger #
24 | .text-inline Times are in #{Time.zone.to_s} Timezone
25 | .padding-bottom-25
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/views/admin/events/_events.slim:
--------------------------------------------------------------------------------
1 | table.table#sort-data-table
2 | thead
3 | tr.active
4 | th ID
5 | th Event Name
6 | th Client Name
7 | th Event Type
8 | th Venue
9 | th Start Time
10 | th End Time
11 | th Brand
12 | th.text-center Actions
13 | tbody
14 | -if @events
15 | -@events.each do |event|
16 | tr
17 | td #{event.id}
18 | td #{event.name}
19 | td #{event.client.name}
20 | td #{event.event_type&.name}
21 | td #{event.address&.city}
22 | td #{((event.start_time)&.in_time_zone(event.address&.time_zone))&.strftime('%m/%d/%Y %I:%M %p')}
23 | td #{((event.end_time)&.in_time_zone(event.address&.time_zone))&.strftime('%m/%d/%Y %I:%M %p')}
24 | td #{event.brand&.name}
25 | td.text-center
26 | -if request.path.include? 'superadmin'
27 | = link_to superadmin_event_path(:id => event.id), :data => {:confirm => 'Are you sure, you want to delete?'}, :title => 'Delete', :method => :delete, class: 'btn btn-sm btn-danger' do
28 | i.glyphicon.glyphicon-trash
29 | -else
30 | = link_to edit_admin_event_path(event), class: 'btn-sm btn-icon btn btn-rounded btn-warning' do
31 | i.icmn-pencil4
32 | -else
33 | td
34 | | No events
--------------------------------------------------------------------------------
/app/views/admin/events/_footer.slim:
--------------------------------------------------------------------------------
1 | -unless @events.nil?
2 | = paginate @events
--------------------------------------------------------------------------------
/app/views/admin/events/edit.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/admin/events/index.html.slim:
--------------------------------------------------------------------------------
1 | div
2 | .panel
3 | .panel-heading
4 | .pull-right
5 | =link_to "Create Event", new_admin_event_path, class: 'btn btn-info'
6 | /= link_to new_admin_event_path, class: "btn btn-info" do
7 | / i.left-menu-link-icon
8 | / | Event
9 | .col-sm-5.pull-right
10 | .fieldwrapper
11 | =form_tag admin_events_path, method: :get, class: 'search_form' do
12 | .right.hidden-md-down.margin-left-20
13 | .search-block
14 | .form-input-icon.form-input-icon-right.disable
15 | i.glyphicon.glyphicon-search
16 | =hidden_field_tag 'search_type'
17 | =hidden_field_tag 'promo_id'
18 | =text_field_tag "search", nil, placeholder: "Reps or Groups", class: 'form-control form-control-sm form-control-rounded field search_rep', :id => 'Postcode'
19 |
20 | h3 Events List
21 | .panel-body
22 | #events
23 | =render partial: 'admin/events/events', :locals => {:events => @events}
24 | .row
25 | .col-md-12
26 | small
27 | /.text-inline.text-danger *
28 | .text-inline Times are in the respective location's timezone
29 | .row
30 | .col-md-12
31 | small
32 | /.text-inline.text-danger #
33 | .text-inline Times are in #{Time.zone.to_s} Timezone
34 | .pull-right
35 | #events-footer
36 | = render partial: 'admin/events/footer', :locals => {:events => @events}
37 | - if @events.count>=5
38 | .padding-35
39 | .padding-bottom-25
--------------------------------------------------------------------------------
/app/views/admin/events/new.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/admin/groups/_form.html.slim:
--------------------------------------------------------------------------------
1 | .col-md-offset-3.col-md-6
2 | = form_for [:admin, @group] do |f|
3 | .panel
4 | #breadcrumb-align
5 | ul.list-unstyled.breadcrumb
6 | li
7 | a href='#{admin_groups_path}' Promo Groups
8 | li
9 | span #{@group.new_record? ? 'New ' : 'Edit '} Group
10 | .clearfix
11 | .panel.panel-with-borders
12 | .panel-heading
13 | h4.panel-title #{@group.new_record? ? 'New ' : 'Edit '} Group
14 | .panel-body
15 | .form-group.row
16 | .col-md-12
17 | = f.label :name
18 | sup.text-danger *
19 | = f.text_field :name, class: 'name form-control', :autocomplete => true, required: true
20 | .form-group.row
21 | .col-md-12
22 | = f.label :promo_reps, 'Direct Sourced'
23 | sup.text-danger *
24 | =f.select :user_ids, options_for_select(@promo_reps.collect { |u| [u.full_name, u.id] }, selected_key = @group.user_ids), {}, {:multiple => true, required: true, :class => 'form-control selectpicker show-tick', :"data-live-search" => true}
25 | .help-block.with-errors
26 |
27 | .panel-footer
28 | .form-group.row
29 | .col-md-9.col-md-offset-3
30 | =f.submit 'Submit', class: 'button btn width-150 btn-primary'
31 | '
32 | a.button.btn.btn-default href="#{admin_groups_path}" Cancel
33 |
--------------------------------------------------------------------------------
/app/views/admin/groups/edit.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/admin/groups/index.html.slim:
--------------------------------------------------------------------------------
1 | .col-md-offset-3.col-md-6
2 | .clearfix
3 | .panel
4 | .panel-heading
5 | .pull-right
6 | = link_to new_admin_group_path, class: "btn btn-info btn-sm" do
7 | i.left-menu-link-icon.icmn-plus
8 | | Group
9 | /=link_to "Add Group", new_admin_group_path, class: 'btn btn-info btn-sm'
10 | h4 Promo Groups
11 | .panel-body
12 | table.table
13 | thead
14 | tr.active
15 | th Id
16 | th Name
17 | th.text-center Actions
18 |
19 | tbody
20 | -@groups.each do |group|
21 | tr
22 | td #{group.id}
23 | td
24 | -group_users=group.users&.collect { |c| c[:first_name]+c[:last_name] }.reject(&:blank?).flatten.uniq.join('
')
25 | a.group_users [href='javascript:void(0)' data-trigger="hover" data-html="true" data-container="body" data-toggle="popover" data-placement="left" data-content=group_users ] #{group.name}
26 | td.text-center
27 | = link_to edit_admin_group_path(group), class: 'btn-sm btn-icon btn btn-rounded btn-warning' do
28 | i.fa.fa-edit
29 | .pull-right
30 | -if @groups.count>0
31 | = paginate @groups
32 | .padding-35
--------------------------------------------------------------------------------
/app/views/admin/groups/new.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/admin/promo_reps/_form.html.slim:
--------------------------------------------------------------------------------
1 | -url=@promo_rep.new_record? ? admin_promo_reps_path(@promo_rep) : admin_promo_rep_path(@promo_rep)
2 | .col-md-offset-3.col-md-6
3 | =form_for @promo_rep, url: url, :html => {:"data-toggle" => "validator"} do |f|
4 | .panel
5 | #breadcrumb-align
6 | ul.list-unstyled.breadcrumb
7 | li
8 | a href='#{admin_promo_reps_path}' Direct Sourced
9 | li
10 | span #{@promo_rep.new_record? ? 'New ' : 'Edit '} Direct Sourced
11 | .panel.panel-with-borders
12 | .panel-heading
13 | h4.panel-title #{@promo_rep.new_record? ? 'New ' : 'Edit '} Direct Sourced
14 | .panel-body
15 | .form-group.row
16 | .col-md-6
17 | = f.label :first_name
18 | sup.text-danger *
19 | =f.hidden_field :role, :value => :promo_rep
20 | = f.text_field :first_name, class: 'name form-control ', required: true
21 | .col-md-6
22 | = f.label :last_name
23 | sup.text-danger *
24 | = f.text_field :last_name, class: 'name form-control ', required: true
25 | .form-group.row
26 | .col-md-12
27 | = f.label :email
28 | sup.text-danger *
29 | = f.email_field :email, class: 'form-control ', required: true
30 | .form-group.row
31 | .col-md-12
32 | = f.label :phone
33 | sup.text-danger *
34 | = f.text_field :phone, class: 'form-control'
35 | .form-group.row
36 | .col-md-12
37 | = f.label :area, 'City'
38 | sup.text-danger *
39 | = f.text_field :area, class: 'form-control ', required: true
40 |
41 | .panel-footer
42 | .form-group.row
43 | .col-md-9.col-md-offset-3
44 | =f.submit 'Submit', class: 'button btn width-150 btn-primary'
45 | '
46 | a.button.btn.btn-default href="#{admin_promo_reps_path}" Cancel
--------------------------------------------------------------------------------
/app/views/admin/promo_reps/edit.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/admin/promo_reps/index.html.slim:
--------------------------------------------------------------------------------
1 | .col-md-12
2 | .clearfix
3 | .panel
4 | .panel-heading
5 | .pull-right
6 | = link_to new_admin_promo_rep_path, class: "btn btn-info btn-sm" do
7 | i.left-menu-link-icon.fa.fa-user-plus
8 | | Direct Sourced
9 | h4 Direct Sourced
10 | .panel-body
11 | table.table
12 | thead
13 | tr.active
14 | th.col-md-1 ID
15 | th.col-md-2 Name
16 | th.col-md-4 Email
17 | th.col-md-2 Phone
18 | th.col-md-2 City
19 | th.col-md-1.text-center Actions
20 | tbody
21 | -@promo_reps.each do |user|
22 | tr
23 | td.col-md-1 #{user.id}
24 | td.col-md-2 #{user.full_name}
25 | td.col-md-4 #{user.email}
26 | td.col-md-2 #{user.phone}
27 | td.col-md-2 #{user&.area}
28 | td.col-md-1.text-center
29 | = link_to edit_admin_promo_rep_path(user), class: 'btn-sm btn-icon btn btn-rounded btn-warning' do
30 | i.fa.fa-edit
31 | '
32 | = link_to admin_promo_rep_resend_path(user), class: 'btn-sm btn-icon btn btn-rounded btn-primary', :data => {:toggle => 'tooltip', :placement => 'top'}, :title => "resend invitation" do
33 | i.icmn-envelop5
34 | .pull-right
35 | -if @promo_reps.count>0
36 | = paginate @promo_reps
37 | .padding-35
--------------------------------------------------------------------------------
/app/views/admin/promo_reps/new.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/api/v1/contacts/create.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.success :true
2 | json.contact do
3 | json.extract! @contact, :id, :details
4 | end
--------------------------------------------------------------------------------
/app/views/api/v1/events/_event.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! event, :id, :name, :promo_category
2 |
3 | json.start_time event.start_time
4 | json.start_time_utc formatted_api_datetime(event.start_time)
5 |
6 | json.end_time event.end_time
7 | json.end_time_utc formatted_api_datetime(event.end_time)
8 |
9 | json.event_type do
10 | json.extract! event.event_type, :id, :name
11 | end
12 | json.brand do
13 | if event.brand.nil?
14 | json.nil!
15 | else
16 | json.extract! event.brand, :id, :name, :description
17 | end
18 | end
19 | json.address do
20 | if event.address.nil?
21 | json.nil!
22 | else
23 | json.extract! event.address, :city, :state, :zip, :country, :formatted_address, :latitude, :longitude ,:time_zone
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/app/views/api/v1/events/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.success :true
2 | json.events @events do |event|
3 | json.partial! 'api/v1/events/event', event: event
4 | user_event=event.user_events.where(user_id: current_user.id, status: UserEvent::statuses[:accepted]).first
5 | json.user_event do
6 | if user_event.nil?
7 | json.nil!
8 | else
9 | json.extract! user_event, :sample, :attendance, :total_expense, :follow_up, :notes, :check_in, :check_out, :recommended ,:recap
10 | json.images do
11 | json.array! user_event.images.map { |image| image.url }
12 | end
13 | end
14 |
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/app/views/api/v1/events/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.success :true
2 | json.event do
3 | json.partial! 'api/v1/events/event', event: @event
4 | json.user_event do
5 | json.extract! @user_event, :total_expense, :follow_up, :notes, :check_in, :check_out, :recommended, :recap,:sample, :attendance
6 | json.images do
7 | json.array! @user_event.images.map { |image| image.url }
8 | end
9 | end
10 | end
--------------------------------------------------------------------------------
/app/views/api/v1/sign_in.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.success :true
2 | json.user do
3 | json.partial! 'api/v1/users/user', user: user
4 | end
5 |
--------------------------------------------------------------------------------
/app/views/api/v1/users/_user.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! user, :id, :email, :first_name, :last_name, :role, :authentication_token
--------------------------------------------------------------------------------
/app/views/devise/confirmations/new.html.erb:
--------------------------------------------------------------------------------
1 | Resend confirmation instructions
2 |
3 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: {method: :post}) do |f| %>
4 | <%= devise_error_messages! %>
5 |
6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
9 |
10 |
11 |
12 | <%= f.submit "Resend confirmation instructions" %>
13 |
14 | <% end %>
15 |
16 | <%= render "devise/shared/links" %>
17 |
--------------------------------------------------------------------------------
/app/views/devise/invitations/edit.html.slim:
--------------------------------------------------------------------------------
1 | body.theme-default.single-page#login-screen
2 | section.page-content
3 | .page-content-inner.single-page-login-alpha#login_screen
4 | /! Login Alpha Page
5 | .single-page-block-header
6 | .row
7 | .col-lg-4
8 | a href=root_path
9 | img src=image_url("logo.png")
10 | .single-page-block#align1
11 | .single-page-block-inner
12 | .single-page-block-form
13 | h3.text-center
14 | i.icmn-enter.margin-right-10
15 | | Set Your Password
16 | br
17 | = form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :put} do |f|
18 | = devise_error_messages!
19 | = f.hidden_field :invitation_token
20 | -if f.object.class.require_password_on_accepting
21 | .form-group
22 | = f.label :password
23 | br
24 | = f.password_field :password, class: 'form-control'
25 | .form-group
26 | = f.label :password_confirmation, 'Password Confirmation'
27 | br
28 | = f.password_field :password_confirmation, class: 'form-control'
29 | .form-actions
30 | input.button.btn.btn-primary.width-150 data-disable-with=("Set my password") name="commit" type="submit" value=("Set my password")
31 |
--------------------------------------------------------------------------------
/app/views/devise/invitations/new.html.erb:
--------------------------------------------------------------------------------
1 | <%= t "devise.invitations.new.header" %>
2 |
3 | <%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :post} do |f| %>
4 | <%= devise_error_messages! %>
5 |
6 | <% resource.class.invite_key_fields.each do |field| -%>
7 | <%= f.label field %>
8 | <%= f.text_field field %>
9 | <% end -%>
10 |
11 | <%= f.submit t("devise.invitations.new.submit_button") %>
12 | <% end %>
13 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/confirmation_instructions.html.erb:
--------------------------------------------------------------------------------
1 | Welcome <%= @email %>!
2 |
3 | You can confirm your account email through the link below:
4 |
5 | <%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
6 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/email_changed.html.erb:
--------------------------------------------------------------------------------
1 | Hello <%= @email %>!
2 |
3 | <% if @resource.try(:unconfirmed_email?) %>
4 | We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.
5 | <% else %>
6 | We're contacting you to notify you that your email has been changed to <%= @resource.email %>.
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/invitation_instructions.text.erb:
--------------------------------------------------------------------------------
1 | <%= t("devise.mailer.invitation_instructions.hello", email: @resource.email) %>
2 |
3 | <%= t("devise.mailer.invitation_instructions.someone_invited_you", url: root_url) %>
4 |
5 | <%= accept_invitation_url(@resource, :invitation_token => @token) %>
6 |
7 | <% if @resource.invitation_due_at %>
8 | <%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) %>
9 | <% end %>
10 |
11 | <%= strip_tags t("devise.mailer.invitation_instructions.ignore") %>
12 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/password_change.html.erb:
--------------------------------------------------------------------------------
1 | Hello <%= @resource.email %>!
2 |
3 | We're contacting you to notify you that your password has been changed.
4 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/unlock_instructions.html.erb:
--------------------------------------------------------------------------------
1 | Hello <%= @resource.email %>!
2 |
3 | Your account has been locked due to an excessive number of unsuccessful sign in attempts.
4 |
5 | Click the link below to unlock your account:
6 |
7 | <%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>
8 |
--------------------------------------------------------------------------------
/app/views/devise/passwords/edit.html.erb:
--------------------------------------------------------------------------------
1 | Change your password
2 |
3 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: {method: :put}) do |f| %>
4 | <%= devise_error_messages! %>
5 | <%= f.hidden_field :reset_password_token %>
6 |
7 |
8 | <%= f.label :password, "New password" %>
9 | <% if @minimum_password_length %>
10 | (<%= @minimum_password_length %> characters minimum)
11 | <% end %>
12 | <%= f.password_field :password, autofocus: true, autocomplete: "off" %>
13 |
14 |
15 |
16 | <%= f.label :password_confirmation, "Confirm new password" %>
17 | <%= f.password_field :password_confirmation, autocomplete: "off" %>
18 |
19 |
20 |
21 | <%= f.submit "Change my password" %>
22 |
23 | <% end %>
24 |
25 | <%= render "devise/shared/links" %>
26 |
--------------------------------------------------------------------------------
/app/views/devise/passwords/new.html.slim:
--------------------------------------------------------------------------------
1 | body.theme-default.single-page#login-screen
2 | section.page-content
3 | .page-content-inner.single-page-login-alpha
4 | /! Login Alpha Page
5 | .single-page-block-header
6 | .row
7 | .col-lg-4
8 | a href=root_path
9 | img src=image_url("logo.png")
10 | .single-page-block#align
11 | .row
12 | .col-xl-12
13 | .single-page-block-inner
14 | .single-page-block-form
15 | h3.text-center
16 | i.icmn-enter.margin-right-10
17 | | Forgot Your Password?
18 | = form_for(resource, as: resource_name, url: password_path(resource_name), html: {method: :post}) do |f|
19 | = devise_error_messages!
20 | .form-group
21 | = f.label :email
22 | br
23 | .input-group
24 | = f.email_field :email, :class => 'form-control', autofocus: true
25 | .input-group-addon
26 | i.icmn-envelop5
27 |
28 | .form-actions
29 | input.button.btn.btn-primary.width-150 data-disable-with=("Submit") name="commit" type="submit" value=("Submit")
30 | span.register-link
31 | a.link-blue href="/users/sign_in" Log In
32 | | or
33 | a.link-blue href="/users/sign_up" Sign Up
--------------------------------------------------------------------------------
/app/views/devise/registrations/edit.html.erb:
--------------------------------------------------------------------------------
1 | Edit <%= resource_name.to_s.humanize %>
2 |
3 | <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put}) do |f| %>
4 | <%= devise_error_messages! %>
5 |
6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true %>
9 |
10 |
11 | <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
12 | Currently waiting confirmation for: <%= resource.unconfirmed_email %>
13 | <% end %>
14 |
15 |
16 | <%= f.label :password %> (leave blank if you don't want to change it)
17 | <%= f.password_field :password, autocomplete: "off" %>
18 | <% if @minimum_password_length %>
19 |
20 | <%= @minimum_password_length %> characters minimum
21 | <% end %>
22 |
23 |
24 |
25 | <%= f.label :password_confirmation %>
26 | <%= f.password_field :password_confirmation, autocomplete: "off" %>
27 |
28 |
29 |
30 | <%= f.label :current_password %> (we need your current password to confirm your changes)
31 | <%= f.password_field :current_password, autocomplete: "off" %>
32 |
33 |
34 |
35 | <%= f.submit "Update" %>
36 |
37 | <% end %>
38 |
39 | Cancel my account
40 |
41 | Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: {confirm: "Are you sure?"}, method: :delete %>
42 |
43 | <%= link_to "Back", :back %>
44 |
--------------------------------------------------------------------------------
/app/views/devise/shared/_links.html.erb:
--------------------------------------------------------------------------------
1 | <%- if controller_name != 'sessions' %>
2 | <%= link_to "Log in", new_session_path(resource_name) %>
3 | <% end -%>
4 |
5 | <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6 | <%= link_to "Sign up", new_registration_path(resource_name) %>
7 | <% end -%>
8 |
9 | <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10 | <%= link_to "Forgot your password?", new_password_path(resource_name) %>
11 | <% end -%>
12 |
13 | <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14 | <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
15 | <% end -%>
16 |
17 | <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18 | <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
19 | <% end -%>
20 |
21 | <%- if devise_mapping.omniauthable? %>
22 | <%- resource_class.omniauth_providers.each do |provider| %>
23 | <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %>
24 |
25 | <% end -%>
26 | <% end -%>
27 |
--------------------------------------------------------------------------------
/app/views/devise/unlocks/new.html.erb:
--------------------------------------------------------------------------------
1 | Resend unlock instructions
2 |
3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: {method: :post}) do |f| %>
4 | <%= devise_error_messages! %>
5 |
6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true %>
9 |
10 |
11 |
12 | <%= f.submit "Resend unlock instructions" %>
13 |
14 | <% end %>
15 |
16 | <%= render "devise/shared/links" %>
17 |
--------------------------------------------------------------------------------
/app/views/events/show.html.slim:
--------------------------------------------------------------------------------
1 | = content_tag 'div', id: "event_status", data: {status: @msg} do
2 | '
3 |
--------------------------------------------------------------------------------
/app/views/global/error.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.success :false
2 | json.error do
3 | json.code code
4 | json.message message
5 | end
--------------------------------------------------------------------------------
/app/views/homes/index.html.slim:
--------------------------------------------------------------------------------
1 | = button_to(destroy_user_session_path, {:method => :delete, class: 'btn btn-primary'}) do
2 | | LOG OUT
--------------------------------------------------------------------------------
/app/views/layouts/_flash_msg_template.slim:
--------------------------------------------------------------------------------
1 | .bottom-right.notifications
2 | .flash-message
3 | -flash.each do |msg_type, message|
4 | javascript:
5 | $(document).ready(function () {
6 | $('.bottom-right').notify({
7 | message: {text: "#{message}"},
8 | type: "#{bootstrap_class_for(msg_type.to_sym)}"
9 | }).show();
10 | });
--------------------------------------------------------------------------------
/app/views/layouts/admin/_top_bar.slim:
--------------------------------------------------------------------------------
1 | nav.top-menu
2 | .menu-icon-container.hidden-md-up
3 | .animate-menu-button.left-menu-toggle
4 | div
5 | /!
6 | .menu
7 | .menu-user-block
8 | .dropdown.dropdown-avatar
9 | a.dropdown-toggle aria-expanded="false" data-toggle="dropdown" href=("javascript: void(0);")
10 | span.avatar href="javascript:void(0);"
11 | -image=current_user.image.blank? ? "default-user.jpg" : current_user.image.url
12 | = image_tag image, alt: "Image"
13 | .dropdown#user-name-align style="bottom:5px;"
14 | ul.dropdown-menu.dropdown-menu-right aria-labelledby="" role="menu"
15 | .dropdown-item
16 | -if Client.where(:admin_id => current_user.id).exists?
17 | li
18 | =link_to edit_admin_client_path(Client.where(:admin_id => current_user.id).first)
19 | i.dropdown-icon.fa.fa-user
20 | |Profile
21 | .dropdown-divider
22 | -if @current_slave_user
23 | li
24 | = link_to admin_login_as_master_path, data: {confirm: "Are you sure?"}, title: 'Back to Super Admin'
25 | i.dropdown-icon.icmn-enter
26 | |Back to SuperAdmin
27 | .dropdown-divider
28 | li
29 | = link_to destroy_user_session_path, data: {confirm: "Are you sure?"}, title: 'Logout', :method => :delete
30 | i.dropdown-icon.icmn-exit
31 | | Logout
--------------------------------------------------------------------------------
/app/views/layouts/admin/application.html.slim:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title PromoTracks
5 | = favicon_link_tag image_path('icons/favicon-20.ico')
6 | = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
7 | = javascript_include_tag 'application', 'data-turbolinks-track' => true
8 | = csrf_meta_tags
9 | body.theme-default.menu-top.menu-static
10 | -if flash.present?
11 | =render 'layouts/flash_msg_template'
12 | =render partial: 'layouts/admin/side_bar'
13 | /=render partial: 'layouts/admin/top_bar'
14 | section.page-content
15 | section.page-content-inner
16 | = yield
17 | =render partial: 'layouts/superadmin/footer'
18 |
--------------------------------------------------------------------------------
/app/views/layouts/application.html.slim:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title PromoTracks
5 | = favicon_link_tag image_path('icons/favicon-20.ico')
6 | = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
7 | = javascript_include_tag 'application', 'data-turbolinks-track' => true
8 | = csrf_meta_tags
9 | body
10 | -if flash.present?
11 | =render 'layouts/flash_msg_template'
12 | = yield
--------------------------------------------------------------------------------
/app/views/layouts/superadmin/_footer.slim:
--------------------------------------------------------------------------------
1 | .cwt__footer.visible-footer.copyrights
2 | .cwt__footer__top.text-center
3 | span
4 | | © 2017 Promotracks.com | All Rights Reserved
5 | /.cwt__footer.visible-footer
6 | /.cwt__footer__top.text-center
7 | / .copyrights
8 | / span.text
9 | / | © 2017 Promotracks.com | All Rights Reserved
--------------------------------------------------------------------------------
/app/views/layouts/superadmin/_side_bar.slim:
--------------------------------------------------------------------------------
1 | nav.left-menu left-menu=""
2 | .logo-container
3 | a.logo href=superadmin_clients_path
4 | img alt=("Promo Tracks") src=image_url("logo.png") /
5 | .left-menu-inner.scroll-pane
6 | ul.left-menu-list.left-menu-list-root.list-unstyled
7 | /li.left-menu-list class="#{active_class(superadmin_promo_reps_path)}"
8 | / a.left-menu-link href=superadmin_promo_reps_path
9 | / i.left-menu-link-icon.icmn-users
10 | / | Direct Sourced
11 | /li.left-menu-list class="#{active_class(superadmin_groups_path)}"
12 | / a.left-menu-link href=superadmin_groups_path
13 | / i.left-menu-link-icon.icmn-users4
14 | / | Promo Groups
15 | li.left-menu-list class="#{active_class(superadmin_clients_path)}"
16 | a.left-menu-link href=superadmin_clients_path
17 | i.left-menu-link-icon.fa.fa-users
18 | | Clients
19 | li.left-menu-list class="#{active_class(superadmin_event_types_path)}"
20 | a.left-menu-link href=superadmin_event_types_path
21 | i.left-menu-link-icon.fa.fa-sitemap
22 | | Event Types
23 | li.left-menu-list class="#{active_class(superadmin_events_path)}"
24 | a.left-menu-link href=superadmin_events_path
25 | i.left-menu-link-icon.icmn-calendar
26 | | Events
27 | li.left-menu-list
28 | a.left-menu-link href=destroy_user_session_path data= {:confirm => "Are you sure?", :method => :delete} title= 'Logout'
29 | i.left-menu-link-icon.icmn-exit
30 | | Logout
--------------------------------------------------------------------------------
/app/views/layouts/superadmin/_top_bar.slim:
--------------------------------------------------------------------------------
1 | nav.top-menu
2 | .menu-icon-container.hidden-md-up
3 | .animate-menu-button.left-menu-toggle
4 | div
5 | /!
6 | .menu
7 | .menu-user-block
8 | .dropdown.dropdown-avatar
9 | a.dropdown-toggle aria-expanded="false" data-toggle="dropdown" href=("javascript: void(0);")
10 | span.avatar href="javascript:void(0);"
11 | = image_tag "default-user.jpg", alt: "Super Admin"
12 | ul.dropdown-menu.dropdown-menu-right aria-labelledby="" role="menu"
13 | .dropdown-item
14 | = link_to destroy_user_session_path, data: {confirm: "Are you sure?"}, title: 'Logout', :method => :delete, class: 'dropdown-item' do
15 | i.dropdown-icon.icmn-exit
16 | | Logout
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/views/layouts/superadmin/application.html.slim:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title PromoTracks
5 | = favicon_link_tag image_path('icons/favicon-20.ico')
6 | = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
7 | = javascript_include_tag 'application', 'data-turbolinks-track' => true
8 | = csrf_meta_tags
9 | body.theme-default
10 | =render partial: 'layouts/superadmin/side_bar'
11 | =render partial: 'layouts/superadmin/top_bar'
12 | section.page-content
13 | section.page-content-inner
14 | -if flash.present?
15 | =render 'layouts/flash_msg_template'
16 | = yield
17 | =render partial: 'layouts/superadmin/footer'
--------------------------------------------------------------------------------
/app/views/superadmin/clients/edit.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render partial: 'form'
3 |
--------------------------------------------------------------------------------
/app/views/superadmin/clients/index.html.slim:
--------------------------------------------------------------------------------
1 | .panel
2 | .panel-heading
3 | .pull-right
4 | = link_to new_superadmin_client_path, class: "btn btn-info btn-sm", :data => {:turbolinks => "false"} do
5 | i.left-menu-link-icon.fa.fa-user-plus
6 | | Client
7 | h4 Clients
8 | .panel-body
9 | table.table.table-striped
10 | thead
11 | tr
12 | th ID
13 | th Name
14 | th Phone
15 | th Brands
16 | th.text-center Actions
17 | tbody
18 | -@clients.each do |client|
19 | tr
20 | td #{client.id}
21 | td #{client.name}
22 | td #{client.phone}
23 | td #{client.brands&.map(&:name).join(',')}
24 | td.text-center
25 | = link_to superadmin_client_impersonate_path(client_id: client.id, user_id: client.admin_id), class: 'btn-sm btn-icon btn btn-rounded btn-success', :data => {:toggle => 'tooltip', :placement => 'top'}, :title => "impersonate" do
26 | i.icmn-enter
27 | '
28 | = link_to edit_superadmin_client_path(client), class: 'btn-sm btn-icon btn btn-rounded btn-warning', "data-turbolinks" => "false", :data => {:toggle => 'tooltip', :placement => 'top'}, :title => "edit" do
29 | i.icmn-pencil4
30 | '
31 | = link_to superadmin_client_users_path(client), class: 'btn-sm btn-icon btn btn-rounded btn-primary', :data => {:toggle => 'tooltip', :placement => 'top'}, :title => "admins" do
32 | i.icmn-user3
33 | .pull-right
34 | -if @clients.count>0
35 | = paginate @clients
--------------------------------------------------------------------------------
/app/views/superadmin/clients/new.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render partial: 'form'
3 |
--------------------------------------------------------------------------------
/app/views/superadmin/event_types/_form.html.slim:
--------------------------------------------------------------------------------
1 | section.page-content
2 | section.page-content-inner
3 | .col-md-offset-3.col-md-6
4 | = form_for [:superadmin, @event_type] do |f|
5 | .panel
6 | .container#breadcrumb-align
7 | ul.list-unstyled.breadcrumb
8 | li
9 | a href='#{superadmin_event_types_path}' Event Types
10 | li
11 | span #{@event_type.new_record? ? 'New ' : 'Edit '} Event Type
12 | section.panel
13 | .panel-heading
14 | h3 #{@event_type.new_record? ? 'New ' : 'Edit '} Event Type
15 | .panel-body
16 | .form-group.row
17 | .col-md-12
18 | = f.label :name
19 | sup.text-danger *
20 | = f.text_field :name, class: 'name form-control ', required: true
21 |
22 | .panel-footer
23 | .form-group.row
24 | .col-md-9.col-md-offset-3
25 | =f.submit 'Submit', class: 'button btn width-150 btn-primary'
26 | '
27 | a.button.btn.btn-default href="#{superadmin_event_types_path}" Cancel
--------------------------------------------------------------------------------
/app/views/superadmin/event_types/edit.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render partial: 'form'
3 |
--------------------------------------------------------------------------------
/app/views/superadmin/event_types/index.html.slim:
--------------------------------------------------------------------------------
1 | .col-md-offset-2.col-md-7
2 | .panel
3 | .panel-heading
4 | .pull-right
5 | = link_to new_superadmin_event_type_path, class: "btn btn-info btn-sm" do
6 | i.left-menu-link-icon.icmn-plus
7 | | Event Type
8 | h4 Event Types
9 | .panel-body
10 | table.table.table-striped
11 | thead
12 | tr
13 | th ID
14 | th Name
15 | th.text-center Actions
16 |
17 | tbody
18 | -@event_types.each do |event_type|
19 | tr
20 | td #{event_type.id}
21 | td #{event_type.name}
22 | td.text-center
23 | = link_to edit_superadmin_event_type_path(event_type), class: 'btn-sm btn-icon btn btn-rounded btn-warning' do
24 | i.icmn-pencil4
25 | .pull-right
26 | -if @event_types.count>0
27 | = paginate @event_types
--------------------------------------------------------------------------------
/app/views/superadmin/event_types/new.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render partial: 'form'
3 |
--------------------------------------------------------------------------------
/app/views/superadmin/events/index.html.slim:
--------------------------------------------------------------------------------
1 | div
2 | .panel
3 | .panel-heading
4 | h3 Events
5 | .panel-body
6 | =render partial: 'admin/events/events', :locals => {:events => @events}
7 | .row
8 | .col-md-12
9 | small
10 | /.text-inline.text-danger *
11 | .text-inline Times are in the respective location's timezone
12 | .row
13 | .col-md-12
14 | small
15 | /.text-inline.text-danger #
16 | .text-inline Times are in #{Time.zone.to_s} Timezone
17 | .pull-right
18 | =render partial: 'admin/events/footer', :locals => {:events => @events}
19 | .padding-bottom-35
20 |
--------------------------------------------------------------------------------
/app/views/superadmin/groups/_form.html.slim:
--------------------------------------------------------------------------------
1 | .col-md-offset-3.col-md-6
2 | = form_for [:superadmin, @group] do |f|
3 | .panel
4 | #breadcrumb-align
5 | ul.list-unstyled.breadcrumb
6 | li
7 | a href='#{superadmin_groups_path}' Promo Groups
8 | li
9 | span #{@group.new_record? ? 'New ' : 'Edit '} Group
10 | .clearfix
11 | .panel.panel-with-borders
12 | .panel-heading
13 | h4.panel-title #{@group.new_record? ? 'New ' : 'Edit '} Group
14 | .panel-body
15 | .form-group.row
16 | .col-md-12
17 | = f.label :name
18 | sup.text-danger *
19 | = f.text_field :name, class: 'name form-control', :autocomplete => true, required: true
20 | .form-group.row
21 | .col-md-12
22 | = f.label :promo_reps, 'Direct Sourced'
23 | sup.text-danger *
24 | =f.select :user_ids, options_for_select(@promo_reps.collect { |u| [u.full_name, u.id] }, selected_key = @group.user_ids), {}, {:multiple => true, required: true, :class => 'form-control selectpicker show-tick', :"data-live-search" => true }
25 | .help-block.with-errors
26 |
27 | .panel-footer
28 | .form-group.row
29 | .col-md-9.col-md-offset-3
30 | =f.submit 'Submit', class: 'button btn width-150 btn-primary'
31 | '
32 | a.button.btn.btn-default href="#{superadmin_groups_path}" Cancel
33 |
--------------------------------------------------------------------------------
/app/views/superadmin/groups/edit.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/superadmin/groups/index.html.slim:
--------------------------------------------------------------------------------
1 | .col-md-offset-2.col-md-7
2 | .clearfix
3 | .panel
4 | .panel-heading
5 | .pull-right
6 | = link_to new_superadmin_group_path, class: "btn btn-info btn-sm" do
7 | i.left-menu-link-icon.icmn-plus
8 | | Group
9 | /=link_to "Add Group", new_admin_group_path, class: 'btn btn-info btn-sm'
10 | h4 Promo Groups
11 | .panel-body
12 | table.table
13 | thead
14 | tr.active
15 | th Id
16 | th Name
17 | th.text-center Actions
18 |
19 | tbody
20 | -@groups.each do |group|
21 | tr
22 | td #{group.id}
23 | td
24 | -group_users=group.users&.collect { |c| c[:first_name]+c[:last_name] }.reject(&:blank?).flatten.uniq.join('
')
25 | a.group_users [href='javascript:void(0)' data-trigger="hover" data-html="true" data-container="body" data-toggle="popover" data-placement="left" data-content=group_users ] #{group.name}
26 | td.text-center
27 | = link_to edit_superadmin_group_path(group), class: 'btn-sm btn-icon btn btn-rounded btn-warning' do
28 | i.fa.fa-edit
29 | .pull-right
30 | -if @groups.count>0
31 | = paginate @groups
32 | .padding-35
--------------------------------------------------------------------------------
/app/views/superadmin/groups/new.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/superadmin/promo_reps/_form.html.slim:
--------------------------------------------------------------------------------
1 | -url=@promo_rep.new_record? ? superadmin_promo_reps_path(@promo_rep) : superadmin_promo_rep_path(@promo_rep)
2 | .col-md-offset-3.col-md-6
3 | =form_for @promo_rep, url: url, :html => {:"data-toggle" => "validator"} do |f|
4 | .panel
5 | #breadcrumb-align
6 | ul.list-unstyled.breadcrumb
7 | li
8 | a href='#{superadmin_promo_reps_path}' Direct Sourced
9 | li
10 | span #{@promo_rep.new_record? ? 'New ' : 'Edit '} Direct Sourced
11 | .panel.panel-with-borders
12 | .panel-heading
13 | h4.panel-title #{@promo_rep.new_record? ? 'New ' : 'Edit '} Direct Sourced
14 | .panel-body
15 | .form-group.row
16 | .col-md-6
17 | = f.label :first_name
18 | sup.text-danger *
19 | =f.hidden_field :role, :value => :promo_rep
20 | = f.text_field :first_name, class: 'name form-control ', required: true
21 | .col-md-6
22 | = f.label :last_name
23 | sup.text-danger *
24 | = f.text_field :last_name, class: 'name form-control ', required: true
25 | .form-group.row
26 | .col-md-12
27 | = f.label :email
28 | sup.text-danger *
29 | = f.email_field :email, class: 'form-control ', required: true
30 | .form-group.row
31 | .col-md-12
32 | = f.label :phone
33 | sup.text-danger *
34 | = f.text_field :phone, class: 'form-control'
35 | .form-group.row
36 | .col-md-12
37 | = f.label :area, 'City'
38 | sup.text-danger *
39 | = f.text_field :area, class: 'form-control ', required: true
40 |
41 | .panel-footer
42 | .form-group.row
43 | .col-md-9.col-md-offset-3
44 | =f.submit 'Submit', class: 'button btn width-150 btn-primary'
45 | '
46 | a.button.btn.btn-default href="#{superadmin_promo_reps_path}" Cancel
--------------------------------------------------------------------------------
/app/views/superadmin/promo_reps/edit.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/superadmin/promo_reps/index.html.slim:
--------------------------------------------------------------------------------
1 | .col-md-offset-1.col-md-10
2 | .clearfix
3 | .panel
4 | .panel-heading
5 | .pull-right
6 | = link_to new_superadmin_promo_rep_path, class: "btn btn-info btn-sm" do
7 | i.left-menu-link-icon.fa.fa-user-plus
8 | | Direct Sourced
9 | h4 Direct Sourced
10 | .panel-body
11 | table.table
12 | thead
13 | tr.active
14 | th ID
15 | th Name
16 | th Email
17 | th Phone
18 | th City
19 | th.text-center Actions
20 | tbody
21 | -@promo_reps.each do |user|
22 | tr
23 | td #{user.id}
24 | td #{user.full_name}
25 | td #{user.email}
26 | td #{user.phone}
27 | td #{user&.area}
28 | td.text-center
29 | = link_to edit_superadmin_promo_rep_path(user), class: 'btn-sm btn-icon btn btn-rounded btn-warning' do
30 | i.fa.fa-edit
31 | '
32 | = link_to superadmin_promo_rep_resend_path(user), class: 'btn-sm btn-icon btn btn-rounded btn-primary', :data => {:toggle => 'tooltip', :placement => 'top'}, :title => "resend invitation" do
33 | i.icmn-envelop5
34 | .pull-right
35 | -if @promo_reps.count>0
36 | = paginate @promo_reps
37 | .padding-35
--------------------------------------------------------------------------------
/app/views/superadmin/promo_reps/new.html.slim:
--------------------------------------------------------------------------------
1 | .clearfix
2 | =render 'form'
--------------------------------------------------------------------------------
/app/views/superadmin/users/index.html.slim:
--------------------------------------------------------------------------------
1 | .col-md-offset-1.col-md-10
2 | .panel
3 | .container#breadcrumb-align
4 | ul.list-unstyled.breadcrumb
5 | li
6 | a href='#{superadmin_clients_path}' Clients
7 | li
8 | span Admins
9 | .panel
10 | .panel-heading
11 | .pull-right
12 | =link_to "Invite Admin", new_superadmin_client_user_path, class: 'btn btn-info btn-sm'
13 | h4 Admins
14 | .panel-body
15 | table.table.table-striped
16 | thead
17 | tr
18 | th.col-md-2 ID
19 | th.col-md-3 Name
20 | th.col-md-5 Email
21 | th.col-md-2.text-center Action
22 | tbody
23 | -@users.each do |user|
24 | tr
25 | td.col-md-2 #{user.id}
26 | td.col-md-3 #{user.full_name}
27 | td.col-md-5 #{user.email}
28 | td.col-md-2.text-center
29 | -unless @client.admin == user
30 | = link_to superadmin_client_user_resend_invitation_path(@client.id,user.id), class: 'btn-sm btn-icon btn btn-rounded btn-primary' ,:data => {:toggle => 'tooltip', :placement => 'top'}, :title => "resend invitation" do
31 | i.icmn-envelop5
32 | '
33 | = link_to superadmin_client_user_path(@client.id,user.id), :data => {:confirm => 'Are you sure, you want to delete?'}, :title => 'Delete', :method => :delete, class: 'btn btn-sm btn-danger' do
34 | i.glyphicon.glyphicon-trash
--------------------------------------------------------------------------------
/app/views/superadmin/users/new.html.slim:
--------------------------------------------------------------------------------
1 | .col-md-offset-3.col-md-6
2 | = form_for [:superadmin, :client, @user] do |f|
3 | .panel
4 | .container#breadcrumb-align
5 | ul.list-unstyled.breadcrumb
6 | li
7 | a href='#{superadmin_clients_path}' Clients
8 | li
9 | a href='#{superadmin_client_users_path}' Admins
10 | li
11 | span New Admin
12 | .panel.panel-with-borders
13 | .panel-heading
14 | h2.panel-title #{@user.new_record? ? 'New ' : 'Edit '} Admin
15 | .panel-body
16 | .form-group.row
17 | .col-md-6
18 | = f.label :first_name
19 | sup.text-danger *
20 | =f.hidden_field :role, :value => :client_admin
21 | = f.text_field :first_name, class: 'name form-control ', required: true
22 | .col-md-6
23 | = f.label :last_name
24 | sup.text-danger *
25 | = f.text_field :last_name, class: 'name form-control ', required: true
26 | .form-group.row
27 | .col-md-12
28 | = f.label :email
29 | sup.text-danger *
30 | = f.email_field :email, class: 'form-control ', required: true
31 | /.form-group.row
32 | .col-md-6
33 | = f.label :password
34 | sup.text-danger *
35 | = f.password_field :password, class: 'form-control ', required: true
36 | .col-md-6
37 | = f.label :password_confirmation
38 | sup.text-danger *
39 | = f.password_field :password_confirmation, class: 'form-control ', required: true
40 |
41 | .panel-footer
42 | .text-right
43 | =f.submit 'Invite', class: 'btn btn-success'
44 | '
45 | a.btn.btn-danger href="#{superadmin_client_users_path}" Cancel
46 |
--------------------------------------------------------------------------------
/app/views/user_mailer/send_code.html.slim:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title
5 | link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" /
6 | css:
7 | | body {
8 | | font-family : 'Lato', sans-serif;
9 | |
10 | }
11 | body
12 | div style=("background: #eceff4; padding: 50px 20px; color: #514d6a;") width="100%"
13 | div style=("max-width: 700px; margin: 0px auto; font-size: 14px")
14 | table border="0" cellpadding="0" cellspacing="0" style=("width: 100%; margin-bottom: 20px")
15 | tbody
16 | tr
17 | td style=("vertical-align: top;")
18 | a href="#{root_url}" target="_blank"
19 | img border="0" src="https://s3-us-west-2.amazonaws.com/promotracks-stage-asset/logo.png" align = "middle"
20 | td style=("text-align: right; vertical-align: middle;")
21 | span style=("color: #a09bb9;")
22 | div style=("padding: 40px 40px 20px 40px; background: #fff;")
23 | table border="0" cellpadding="0" cellspacing="0" style=("width: 100%;")
24 | tbody
25 | tr
26 | td
27 | h5 style=("margin-bottom: 15px; color: #24222f; font-size: 1.25rem ; font-weight: 600") Hello #{@data[:user][:name]},
28 | p
29 | | Please find below your New Passcode for
30 | strong
31 | | Promo Tracks
32 |
33 | div
34 | h3 #{@data[:user][:passcode]}
35 | p
36 | | Regards,
37 | br
38 | span style="color:#d43f3a;" Promo Tracks
39 | div style=("text-align: center; font-size: 12px; color: #a09bb9; margin-top: 20px")
40 | p
41 | | © 2017 PromoTracks,
42 | br
43 | | All rights reserved.
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path('../config/application', __dir__)
3 | require_relative '../config/boot'
4 | require 'rails/commands'
5 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative '../config/boot'
3 | require 'rake'
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 | require 'fileutils'
4 | include FileUtils
5 |
6 | # path to your application root.
7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8 |
9 | def system!(*args)
10 | system(*args) || abort("\n== Command #{args} failed ==")
11 | end
12 |
13 | chdir APP_ROOT do
14 | # This script is a starting point to setup your application.
15 | # Add necessary setup steps to this file.
16 |
17 | puts '== Installing dependencies =='
18 | system! 'gem install bundler --conservative'
19 | system('bundle check') || system!('bundle install')
20 |
21 | # puts "\n== Copying sample files =="
22 | # unless File.exist?('config/database.yml')
23 | # cp 'config/database.yml.sample', 'config/database.yml'
24 | # end
25 |
26 | puts "\n== Preparing database =="
27 | system! 'bin/rails db:setup'
28 |
29 | puts "\n== Removing old logs and tempfiles =="
30 | system! 'bin/rails log:clear tmp:clear'
31 |
32 | puts "\n== Restarting application server =="
33 | system! 'bin/rails restart'
34 | end
35 |
--------------------------------------------------------------------------------
/bin/update:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 | require 'fileutils'
4 | include FileUtils
5 |
6 | # path to your application root.
7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8 |
9 | def system!(*args)
10 | system(*args) || abort("\n== Command #{args} failed ==")
11 | end
12 |
13 | chdir APP_ROOT do
14 | # This script is a way to update your development environment automatically.
15 | # Add necessary update steps to this file.
16 |
17 | puts '== Installing dependencies =='
18 | system! 'gem install bundler --conservative'
19 | system('bundle check') || system!('bundle install')
20 |
21 | puts "\n== Updating database =="
22 | system! 'bin/rails db:migrate'
23 |
24 | puts "\n== Removing old logs and tempfiles =="
25 | system! 'bin/rails log:clear tmp:clear'
26 |
27 | puts "\n== Restarting application server =="
28 | system! 'bin/rails restart'
29 | end
30 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative 'boot'
2 |
3 | require 'rails/all'
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | module PromoRails
10 | class Application < Rails::Application
11 | # Settings in config/environments/* take precedence over those specified here.
12 | # Application configuration should go into files in config/initializers
13 | # -- all .rb files in that directory are automatically loaded.
14 | ActiveSupport.halt_callback_chains_on_return_false = false
15 | config.active_job.queue_adapter = :sidekiq
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2 |
3 | require 'bundler/setup' # Set up gems listed in the Gemfile.
4 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: async
6 |
7 | production:
8 | adapter: redis
9 | url: redis://localhost:6379/1
10 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | # PostgreSQL. Versions 8.2 and up are supported.
2 | #
3 | # Install the pg driver:
4 | # gem install pg
5 | # On OS X with Homebrew:
6 | # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7 | # On OS X with MacPorts:
8 | # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9 | # On Windows:
10 | # gem install pg
11 | # Choose the win32 build.
12 | # Install PostgreSQL and put its /bin directory on your path.
13 | #
14 | # Configure Using Gemfile
15 | # gem 'pg'
16 | #
17 | default: &default
18 | adapter: postgresql
19 | encoding: unicode
20 | # For details on connection pooling, see rails configuration guide
21 | # http://guides.rubyonrails.org/configuring.html#database-pooling
22 | pool: 5
23 |
24 | development:
25 | <<: *default
26 | database: promo-rails_development
27 | username: postgres
28 | password:
29 |
30 | staging:
31 | <<: *default
32 | user: promo
33 | password: <%= ENV['db_password'] %>
34 | host: localhost
35 | port: 5432
36 | database: promo-rails_staging
37 |
38 | production:
39 | <<: *default
40 | user: promo
41 | password: <%= ENV['db_password'] %>
42 | host: localhost
43 | port: 5432
44 | database: promo-rails
--------------------------------------------------------------------------------
/config/deploy.rb:
--------------------------------------------------------------------------------
1 | # config valid only for current version of Capistrano
2 | lock "3.8.1"
3 |
4 | set :application, 'Promorails'
5 | set :repo_url, 'git@bitbucket.org:bitcot/promotracks-rails.git'
6 | set :deploy_to, '/home/ubuntu/www/promo'
7 | set :rvm_ruby_version, 'ruby-2.3.0@promo'
8 |
9 | # Default value for :format is :airbrussh.
10 | set :format, :pretty
11 |
12 | set :deploy_user, 'ubuntu'
13 | set :ssh_options, {:forward_agent => true}
14 | set :keep_releases, 5
15 | set :user, 'ubuntu'
16 | set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
17 | set :pty, false
18 |
19 | # SSHKit.config.command_map[:sidekiq] = "source ~/.bash_profile && bundle exec sidekiq"
20 | # SSHKit.config.command_map[:sidekiqctl] = "source ~/.bash_profile && bundle exec sidekiqctl"
21 |
22 | after "deploy", "deploy:restart"
23 |
24 | set :slackistrano, {
25 | klass: Slackistrano::SlackistranoMessaging,
26 | channel: %w(#promo-tracks #promotracks),
27 | webhook: 'https://hooks.slack.com/services/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'
28 | }
29 |
30 | namespace :deploy do
31 | after 'deploy:publishing', 'thin:restart'
32 | after :finishing, "deploy:cleanup"
33 | end
--------------------------------------------------------------------------------
/config/deploy/production.rb:
--------------------------------------------------------------------------------
1 | set :branch, :master
2 |
3 | server '34.209.93.89', roles: %w(app db), user: 'ubuntu'
4 |
5 | set :assets_roles, [:app]
6 | set :rails_env, 'production'
7 | set :migrate_env, 'production'
8 |
9 | set :sidekiq_config, "#{release_path}/config/sidekiq.yml"
10 | set :sidekiq_log, "#{release_path}/log/sidekiq.log"
11 |
12 | namespace :deploy do
13 | namespace :assets do
14 |
15 | Rake::Task['deploy:assets:precompile'].clear_actions
16 | desc 'Precompile assets locally and upload to servers'
17 | task :precompile do
18 | run_locally do
19 | with rails_env: fetch(:rails_env) do
20 | execute 'bundle exec rake assets:precompile RAILS_ENV=production'
21 | end
22 | end
23 | on roles(:app) do |host|
24 | puts '---------Host-------'
25 | puts host
26 | run_locally {execute 'mv ./public/assets/.sprockets**.json ./public/assets/manifest.json'}
27 | upload!('./public/assets/manifest.json', "#{shared_path}/public/assets/")
28 | upload!('config/application.yml', "#{release_path}/config/application.yml")
29 | end
30 | run_locally { execute 'rm -rf public/assets' }
31 | end
32 | end
33 | end
--------------------------------------------------------------------------------
/config/deploy/staging.rb:
--------------------------------------------------------------------------------
1 | set :branch, :master
2 |
3 | server '34.208.235.177', roles: %w(app db), user: 'ubuntu'
4 |
5 | set :assets_roles, [:app]
6 | set :rails_env, 'staging'
7 | set :migrate_env, 'staging'
8 |
9 | # set :sidekiq_config, "#{release_path}/config/sidekiq.yml"
10 | # set :sidekiq_log, "#{release_path}/log/sidekiq.log"
11 |
12 | namespace :deploy do
13 | namespace :assets do
14 |
15 | Rake::Task['deploy:assets:precompile'].clear_actions
16 | desc 'Precompile assets locally and upload to servers'
17 | task :precompile do
18 | run_locally do
19 | with rails_env: fetch(:rails_env) do
20 | execute 'bundle exec rake assets:precompile RAILS_ENV=staging'
21 | end
22 | end
23 | on roles(:app) do |host|
24 | puts '---------Host-------'
25 | puts host
26 | run_locally {execute 'mv ./public/assets/.sprockets**.json ./public/assets/manifest.json'}
27 | upload!('./public/assets/manifest.json', "#{shared_path}/public/assets/")
28 | upload!('config/application.yml', "#{release_path}/config/application.yml")
29 | end
30 | run_locally { execute 'rm -rf public/assets' }
31 | end
32 | end
33 | end
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative 'application'
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Do not eager load code on boot. This avoids loading your whole application
11 | # just for the purpose of running a single test. If you are using a tool that
12 | # preloads Rails for running tests, you may have to set it to true.
13 | config.eager_load = false
14 |
15 | # Configure public file server for tests with Cache-Control for performance.
16 | config.public_file_server.enabled = true
17 | config.public_file_server.headers = {
18 | 'Cache-Control' => 'public, max-age=3600'
19 | }
20 |
21 | # Show full error reports and disable caching.
22 | config.consider_all_requests_local = true
23 | config.action_controller.perform_caching = false
24 |
25 | # Raise exceptions instead of rendering exception templates.
26 | config.action_dispatch.show_exceptions = false
27 |
28 | # Disable request forgery protection in test environment.
29 | config.action_controller.allow_forgery_protection = false
30 | config.action_mailer.perform_caching = false
31 |
32 | # Tell Action Mailer not to deliver emails to the real world.
33 | # The :test delivery method accumulates sent emails in the
34 | # ActionMailer::Base.deliveries array.
35 | config.action_mailer.delivery_method = :test
36 |
37 | # Print deprecation notices to the stderr.
38 | config.active_support.deprecation = :stderr
39 |
40 | config.active_support.test_order = :sorted
41 |
42 | # Raises error for missing translations
43 | # config.action_view.raise_on_missing_translations = true
44 | end
45 |
--------------------------------------------------------------------------------
/config/initializers/amazon_ses.rb:
--------------------------------------------------------------------------------
1 | require 'platform/settings'
2 | ActionMailer::Base.add_delivery_method :ses, AWS::SES::Base,
3 | :access_key_id => ENV['aws_access_key_id'],
4 | :secret_access_key => ENV['aws_secret_access_key'],
5 | :server => PromoRails::Settings::SES.host
--------------------------------------------------------------------------------
/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ApplicationController.renderer.defaults.merge!(
4 | # http_host: 'example.org',
5 | # https: false
6 | # )
7 |
--------------------------------------------------------------------------------
/config/initializers/asset_sync.rb:
--------------------------------------------------------------------------------
1 | require 'platform/settings'
2 | if defined?(AssetSync) && PromoRails::Settings::AssetStore.store == 'AWS'
3 | AssetSync.configure do |config|
4 |
5 | config.fog_provider = PromoRails::Settings::AssetStore.store
6 | config.aws_access_key_id = ENV['aws_access_key_id']
7 | config.aws_secret_access_key = ENV['aws_secret_access_key']
8 | # To use AWS reduced redundancy storage.
9 | # config.aws_reduced_redundancy = true
10 | config.fog_directory = PromoRails::Settings::AssetStore.s3_assets_bucket
11 |
12 | # Invalidate a file on a cdn after uploading files
13 | # config.cdn_distribution_id = "12345"
14 | # config.invalidate = ['file1.js']
15 |
16 | # Increase upload performance by configuring your region
17 | config.fog_region = PromoRails::Settings::AssetStore.s3_region
18 | #
19 | # Don't delete files from the store
20 | # config.existing_remote_files = "keep"
21 | #
22 | # Automatically replace files with their equivalent gzip compressed version
23 | config.gzip_compression = true
24 |
25 | #
26 | # Use the Rails generated 'manifest.yml' file to produce the list of files to
27 | # upload instead of searching the assets directory.
28 | # config.manifest = true
29 | #
30 | # Fail silently. Useful for environments such as Heroku
31 | # config.fail_silently = true
32 | end
33 |
34 | end
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = '1.0'
5 |
6 | # Add additional assets to the asset load path
7 | Rails.application.config.assets.paths << "vendor/assets/cleanui-admin-template/js"
8 | # Rails.application.config.assets.paths << Emoji.images_path
9 | Rails.application.config.assets.paths << Rails.root.join('app', 'assets', 'fonts')
10 |
11 | Rails.application.config.assets.paths << "vendor/assets/cleanui-admin-template/stylesheets"
12 | # Precompile additional assets.
13 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
14 | # Rails.application.config.assets.precompile += %w( search.js )
15 | Rails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf)\z/ #fonts
--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/config/initializers/carrier_wave.rb:
--------------------------------------------------------------------------------
1 | # put this in config/initializers/carrierwave.rb
2 | require 'carrierwave/storage/fog'
3 | require 'platform/settings'
4 |
5 | CarrierWave.configure do |config|
6 |
7 | case PromoRails::Settings::AssetStore.store
8 |
9 | when 'AWS'
10 | config.storage = :fog
11 | config.permissions = 0600
12 | config.fog_credentials = {
13 | :provider => PromoRails::Settings::AssetStore.store,
14 | :aws_access_key_id => PromoRails::Settings::AssetStore.s3_access_key_id,
15 | :aws_secret_access_key => PromoRails::Settings::AssetStore.s3_secret_access_key,
16 | :region => PromoRails::Settings::AssetStore.s3_media_region,
17 | :path_style => true
18 | }
19 | config.fog_directory = PromoRails::Settings::AssetStore.s3_media_bucket
20 | config.asset_host = PromoRails::Settings::AssetStore.s3_media_root
21 |
22 | when 'local'
23 | config.storage = :file
24 | config.fog_credentials = {
25 | :provider => 'Local',
26 | :local_root => "#{Rails.root}/public",
27 | }
28 | # config.fog_directory = BlockIt::Settings::AssetStore.store.s3_media_root
29 | # config.storage = :file
30 | end
31 |
32 | config.fog_attributes = {'Cache-Control' => 'max-age=315576000'} # optional, defaults to {}
33 | config.fog_public = true
34 |
35 |
36 | end
--------------------------------------------------------------------------------
/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/config/initializers/new_framework_defaults.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file contains migration options to ease your Rails 5.0 upgrade.
4 | #
5 | # Once upgraded flip defaults one by one to migrate to the new default.
6 | #
7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8 |
9 | # Enable per-form CSRF tokens. Previous versions had false.
10 | Rails.application.config.action_controller.per_form_csrf_tokens = true
11 |
12 | # Enable origin-checking CSRF mitigation. Previous versions had false.
13 | Rails.application.config.action_controller.forgery_protection_origin_check = true
14 |
15 | # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
16 | # Previous versions had false.
17 | ActiveSupport.to_time_preserves_timezone = true
18 |
19 | # Require `belongs_to` associations by default. Previous versions had false.
20 | Rails.application.config.active_record.belongs_to_required_by_default = true
21 |
22 | # Do not halt callback chains when a callback returns false. Previous versions had true.
23 | ActiveSupport.halt_callback_chains_on_return_false = false
24 |
25 | Rails.application.config.ssl_options = {hsts: {subdomains: true}}
26 |
--------------------------------------------------------------------------------
/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.session_store :cookie_store, key: '_promo_rails_session'
4 |
--------------------------------------------------------------------------------
/config/initializers/time_zone.rb:
--------------------------------------------------------------------------------
1 | Timezone::Lookup.config(:google) do |c|
2 | c.api_key = 'AIzaSyCLOn9LMBOrq0QIPxQFEWMKeK7GC6-lBFo'
3 | end
4 |
--------------------------------------------------------------------------------
/config/initializers/to_time_preserves_timezone.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Preserve the timezone of the receiver when calling to `to_time`.
4 | # Ruby 2.4 will change the behavior of `to_time` to preserve the timezone
5 | # when converting to an instance of `Time` instead of the previous behavior
6 | # of converting to the local system timezone.
7 | #
8 | # Rails 5.0 introduced this config option so that apps made with earlier
9 | # versions of Rails are not affected when upgrading.
10 | ActiveSupport.to_time_preserves_timezone = true
11 |
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/config/locales/devise_invitable.en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | devise:
3 | failure:
4 | invited: "You have a pending invitation, accept it to finish creating your account."
5 | invitations:
6 | send_instructions: "An invitation email has been sent to %{email}."
7 | invitation_token_invalid: "The invitation token provided is not valid!"
8 | updated: "Your password was set successfully. You are now signed in."
9 | updated_not_active: "Your password was set successfully."
10 | no_invitations_remaining: "No invitations remaining"
11 | invitation_removed: "Your invitation was removed."
12 | new:
13 | header: "Send invitation"
14 | submit_button: "Send an invitation"
15 | edit:
16 | header: "Set your password"
17 | submit_button: "Set my password"
18 | mailer:
19 | invitation_instructions:
20 | subject: "Invitation instructions"
21 | hello: "Hello %{email}"
22 | someone_invited_you: "Someone has invited you to %{url}, you can accept it through the link below."
23 | accept: "Accept invitation"
24 | accept_until: "This invitation will be due in %{due_date}."
25 | ignore: "If you don't want to accept the invitation, please ignore this email.
\nYour account won't be created until you access the link above and set your password."
26 | time:
27 | formats:
28 | devise:
29 | mailer:
30 | invitation_instructions:
31 | accept_until_format: "%B %d, %Y %I:%M %p"
32 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # To learn more, please read the Rails Internationalization guide
20 | # available at http://guides.rubyonrails.org/i18n.html.
21 |
22 | en:
23 | hello: "Hello world"
24 | errors:
25 | messages:
26 | extension_whitelist_error: "You are not allowed to upload files other than %{allowed_types}"
27 |
--------------------------------------------------------------------------------
/config/newrelic.yml:
--------------------------------------------------------------------------------
1 | #
2 | # This file configures the New Relic Agent. New Relic monitors Ruby, Java,
3 | # .NET, PHP, Python and Node applications with deep visibility and low
4 | # overhead. For more information, visit www.newrelic.com.
5 | #
6 | # Generated April 25, 2017
7 | #
8 | # This configuration file is custom generated for Bitcot Techinologies
9 | #
10 | # For full documentation of agent configuration options, please refer to
11 | # https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration
12 |
13 | common: &default_settings
14 | # Required license key associated with your New Relic account.
15 | license_key: 68a0084457b2134e71cb8862f12cb65132572e07
16 |
17 | # Your application name. Renaming here affects where data displays in New
18 | # Relic. For more details, see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications
19 | app_name: Promotracks
20 |
21 | # To disable the agent regardless of other settings, uncomment the following:
22 | # agent_enabled: false
23 |
24 | # Logging level for log/newrelic_agent.log
25 | log_level: info
26 |
27 |
28 | # Environment-specific settings are in this section.
29 | # RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
30 | # If your application has other named environments, configure them here.
31 |
32 | staging:
33 | <<: *default_settings
34 | app_name: Promotracks (Staging)
35 |
36 | production:
37 | <<: *default_settings
38 |
--------------------------------------------------------------------------------
/config/puma.rb:
--------------------------------------------------------------------------------
1 | # Puma can serve each request in a thread from an internal thread pool.
2 | # The `threads` method setting takes two numbers a minimum and maximum.
3 | # Any libraries that use thread pools should be configured to match
4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum
5 | # and maximum, this matches the default thread size of Active Record.
6 | #
7 | threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
8 | threads threads_count, threads_count
9 |
10 | # Specifies the `port` that Puma will listen on to receive requests, default is 3000.
11 | #
12 | port ENV.fetch("PORT") { 3000 }
13 |
14 | # Specifies the `environment` that Puma will run in.
15 | #
16 | environment ENV.fetch("RAILS_ENV") { "development" }
17 |
18 | # Specifies the number of `workers` to boot in clustered mode.
19 | # Workers are forked webserver processes. If using threads and workers together
20 | # the concurrency of the application would be max `threads` * `workers`.
21 | # Workers do not work on JRuby or Windows (both of which do not support
22 | # processes).
23 | #
24 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
25 |
26 | # Use the `preload_app!` method when specifying a `workers` number.
27 | # This directive tells Puma to first boot the application and load code
28 | # before forking the application. This takes advantage of Copy On Write
29 | # process behavior so workers use less memory. If you use this option
30 | # you need to make sure to reconnect any threads in the `on_worker_boot`
31 | # block.
32 | #
33 | # preload_app!
34 |
35 | # The code in the `on_worker_boot` will be called if you are using
36 | # clustered mode by specifying a number of `workers`. After each worker
37 | # process is booted this block will be run, if you are using `preload_app!`
38 | # option you will want to use this block to reconnect to any threads
39 | # or connections that may have been created at application boot, Ruby
40 | # cannot share connections between processes.
41 | #
42 | # on_worker_boot do
43 | # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
44 | # end
45 |
46 | # Allow puma to be restarted by `rails restart` command.
47 | plugin :tmp_restart
48 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | require 'sidekiq/web'
2 | Rails.application.routes.draw do
3 | mount Sidekiq::Web => '/sidekiq'
4 | devise_for :users, controllers: {registrations: "registrations", sessions: "sessions", invitations: "invitations"}
5 | devise_scope :user do
6 | root to: 'devise/sessions#new'
7 | end
8 | root 'homes#index'
9 | resources :homes
10 | resources :events
11 | namespace :superadmin do
12 | resources :event_types
13 | resources :events ,:only=>[:index ,:destroy]
14 | resources :clients do
15 | delete :remove_brand
16 | get :impersonate
17 | resources :users do
18 | get :resend_invitation
19 | end
20 | end
21 | resources :promo_reps do
22 | get :resend
23 | end
24 | resources :groups
25 | resources :events
26 | resources :brands
27 | end
28 | namespace :admin do
29 | get '/login_as_master' => 'admin_application#login_as_master'
30 | resources :dashboard do
31 | collection do
32 | get "images"
33 | end
34 | end
35 | resources :promo_reps do
36 | get :resend
37 | end
38 | resources :events do
39 | resources :user_events do
40 | delete :delete_image
41 | end
42 | end
43 | resources :groups
44 | resources :clients do
45 | collection do
46 | get :reps_and_groups
47 | end
48 | end
49 | end
50 | namespace :api, defaults: {format: 'json'} do
51 | namespace :v1 do
52 | resources :contacts
53 | resources :events do
54 | collection do
55 | get :active
56 | get :expired
57 | end
58 | end
59 | end
60 | end
61 | end
62 |
--------------------------------------------------------------------------------
/config/secrets.yml:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rails secret` to generate a secure secret key.
9 |
10 | # Make sure the secrets in this file are kept private
11 | # if you're sharing your code publicly.
12 |
13 | development:
14 | secret_key_base: 66c79e0b6a5c9b2f9b709942bb118bad195544f51ab712825a6e21d3a2c8bdad00a7eaf39c108000f024787f3050df01fd99ec45a0cb1341510874e0fc0bc984
15 |
16 | test:
17 | secret_key_base: 5064b214bb8401e68335cb3a49473671297ed7bf1137137e15f9713876aa94cbf0fca908c11ba3eaea7250bae1eeb152e628f9b1a975615b4e4eef2d90905091
18 |
19 | # Do not keep production secrets in the repository,
20 | # instead read values from the environment.
21 | staging:
22 | secret_key_base: <%= ENV["secret_key_base"] %>
23 |
24 | production:
25 | secret_key_base: <%= ENV["secret_key_base"] %>
26 |
--------------------------------------------------------------------------------
/config/settings/asset_store.yml:
--------------------------------------------------------------------------------
1 | development: &development
2 | store: 'Local'
3 | s3_access_key_id: <%= ENV['aws_access_key_id'] %>
4 | s3_secret_access_key: <%= ENV['aws_secret_access_key'] %>
5 | s3_region: us-west-2
6 | s3_media_region: us-west-2
7 | s3_media_root: https://promotracks-stage-media.s3.amazonaws.com
8 | s3_media_bucket: promotracks-stage-media
9 | s3_assets_bucket: promotracks-stage-asset
10 | s3_assets_host: https://promotracks-stage-asset.s3.amazonaws.com
11 |
12 | staging:
13 | store: 'AWS'
14 | s3_access_key_id: <%= ENV['aws_access_key_id'] %>
15 | s3_secret_access_key: <%= ENV['aws_secret_access_key'] %>
16 | s3_region: us-west-2
17 | s3_media_region: us-west-2
18 | s3_media_root: https://promotracks-stage-media.s3.amazonaws.com
19 | s3_media_bucket: promotracks-stage-media
20 | s3_assets_bucket: promotracks-stage-asset
21 | s3_assets_host: https://promotracks-stage-asset.s3.amazonaws.com
22 |
23 | production:
24 | store: 'AWS'
25 | s3_access_key_id: <%= ENV['aws_access_key_id'] %>
26 | s3_secret_access_key: <%= ENV['aws_secret_access_key'] %>
27 | s3_region: us-west-2
28 | s3_media_region: us-west-2
29 | s3_media_root: https://promotracks-media.s3.amazonaws.com
30 | s3_media_bucket: promotracks-media
31 | s3_assets_bucket: promotracks-asset
32 | s3_assets_host: https://promotracks-asset.s3.amazonaws.com
33 |
34 | test:
35 | store: 'Local'
36 | s3_access_key_id: <%= ENV['aws_access_key_id'] %>
37 | s3_secret_access_key: <%= ENV['aws_secret_access_key'] %>
38 | s3_region: us-west-2
39 | s3_media_region: us-west-2
40 | s3_media_root: https://promotracks-stage-media.s3.amazonaws.com
41 | s3_media_bucket: promotracks-stage-media
42 | s3_assets_bucket: promotracks-stage-asset
43 | s3_assets_host: https://promotracks-stage-asset.s3.amazonaws.com
--------------------------------------------------------------------------------
/config/settings/ses.yml:
--------------------------------------------------------------------------------
1 | development: &development
2 | access_key_id: ENV['aws_access_key_id']
3 | secret_access_key: ENV['aws_secret_access_key']
4 | host: email.us-west-2.amazonaws.com
5 |
6 | test:
7 | access_key_id: ENV['aws_access_key_id']
8 | secret_access_key: ENV['aws_secret_access_key']
9 | host: email.us-west-2.amazonaws.com
10 |
11 | staging:
12 | access_key_id: ENV['aws_access_key_id']
13 | secret_access_key: ENV['aws_secret_access_key']
14 | host: email.us-west-2.amazonaws.com
15 |
16 | production:
17 | host: email.us-west-2.amazonaws.com
18 | access_key_id: ENV['aws_access_key_id']
19 | secret_access_key: ENV['aws_secret_access_key']
--------------------------------------------------------------------------------
/config/sidekiq.yml:
--------------------------------------------------------------------------------
1 | ---
2 | :concurrency: 2
3 | staging:
4 | :concurrency: 3
5 | demo:
6 | :concurrency: 3
7 | production:
8 | :concurrency: 20
--------------------------------------------------------------------------------
/config/spring.rb:
--------------------------------------------------------------------------------
1 | %w(
2 | .ruby-version
3 | .rbenv-vars
4 | tmp/restart.txt
5 | tmp/caching-dev.txt
6 | ).each { |path| Spring.watch(path) }
7 |
--------------------------------------------------------------------------------
/config/thin/production.yml:
--------------------------------------------------------------------------------
1 | ---
2 | pid: tmp/pids/thin.pid
3 | address: 0.0.0.0
4 | timeout: 30
5 | wait: 30
6 | port: 3000
7 | log: log/thin.log
8 | max_conns: 1024
9 | require: []
10 | servers: 2
11 | environment: production
12 | max_persistent_conns: 512
13 | daemonize: true
14 | chdir: /home/ubuntu/www/promo/current
--------------------------------------------------------------------------------
/config/thin/staging.yml:
--------------------------------------------------------------------------------
1 | ---
2 | pid: tmp/pids/thin.pid
3 | address: 0.0.0.0
4 | timeout: 30
5 | wait: 30
6 | port: 3000
7 | log: log/thin.log
8 | max_conns: 1024
9 | require: []
10 | servers: 1
11 | environment: staging
12 | max_persistent_conns: 512
13 | daemonize: true
14 | chdir: /home/ubuntu/www/promo/current
--------------------------------------------------------------------------------
/db/migrate/20170415054204_devise_create_users.rb:
--------------------------------------------------------------------------------
1 | class DeviseCreateUsers < ActiveRecord::Migration
2 | def change
3 | create_table :users do |t|
4 | ## Database authenticatable
5 | t.string :email, null: false, default: ""
6 | t.string :encrypted_password, null: false, default: ""
7 |
8 | ## Recoverable
9 | t.string :reset_password_token
10 | t.datetime :reset_password_sent_at
11 |
12 | ## Rememberable
13 | t.datetime :remember_created_at
14 |
15 | ## Trackable
16 | t.integer :sign_in_count, default: 0, null: false
17 | t.datetime :current_sign_in_at
18 | t.datetime :last_sign_in_at
19 | t.inet :current_sign_in_ip
20 | t.inet :last_sign_in_ip
21 |
22 | ## Confirmable
23 | # t.string :confirmation_token
24 | # t.datetime :confirmed_at
25 | # t.datetime :confirmation_sent_at
26 | # t.string :unconfirmed_email # Only if using reconfirmable
27 |
28 | ## Lockable
29 | # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
30 | # t.string :unlock_token # Only if unlock strategy is :email or :both
31 | # t.datetime :locked_at
32 |
33 |
34 | t.timestamps null: false
35 | end
36 |
37 | add_index :users, :email, unique: true
38 | add_index :users, :reset_password_token, unique: true
39 | # add_index :users, :confirmation_token, unique: true
40 | # add_index :users, :unlock_token, unique: true
41 | end
42 | end
43 |
--------------------------------------------------------------------------------
/db/migrate/20170415054953_add_fields_to_user.rb:
--------------------------------------------------------------------------------
1 | class AddFieldsToUser < ActiveRecord::Migration
2 | def change
3 | add_column :users, :first_name, :string
4 | add_column :users, :last_name, :string
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20170415055159_create_brands.rb:
--------------------------------------------------------------------------------
1 | class CreateBrands < ActiveRecord::Migration
2 | def change
3 | create_table :brands do |t|
4 | t.string :name
5 | t.string :description
6 | t.timestamps null: false
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20170415055516_create_events.rb:
--------------------------------------------------------------------------------
1 | class CreateEvents < ActiveRecord::Migration
2 | def change
3 | create_table :events do |t|
4 | t.string :name
5 | t.string :type
6 | t.datetime :start_time
7 | t.datetime :end_time
8 | t.string :area
9 | t.string :attendance
10 | t.integer :sample
11 | t.float :product_cost
12 | t.float :total_expense
13 | t.string :notes
14 | t.text :images, default: [], array: true
15 | t.timestamps null: false
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/db/migrate/20170415061217_create_locations.rb:
--------------------------------------------------------------------------------
1 | class CreateLocations < ActiveRecord::Migration
2 | def change
3 | create_table :locations do |t|
4 | t.string :formatted_address
5 | t.string :address_1
6 | t.string :city
7 | t.string :state
8 | t.string :zip
9 | t.string :country
10 | t.float :latitude
11 | t.float :longitude
12 | t.timestamps null: false
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20170415061724_add_events_to_user.rb:
--------------------------------------------------------------------------------
1 | class AddEventsToUser < ActiveRecord::Migration
2 | def change
3 | add_reference :events, :user, index: true, foreign_key: true
4 | add_reference :brands, :user, index: true, foreign_key: true
5 | add_reference :events, :brand, index: true, foreign_key: true
6 | add_reference :locations, :event, index: true, foreign_key: true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20170415063430_create_groups.rb:
--------------------------------------------------------------------------------
1 | class CreateGroups < ActiveRecord::Migration
2 | def change
3 | create_table :groups do |t|
4 |
5 | t.timestamps null: false
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20170415063802_add_users_to_group.rb:
--------------------------------------------------------------------------------
1 | class AddUsersToGroup < ActiveRecord::Migration
2 | def change
3 | create_table :user_groups do |t|
4 | t.column 'group_id', :integer, index: true, foreign_key: true
5 | t.column 'user_id', :integer, index: true, foreign_key: true
6 | end
7 | add_reference :events, :group, foreign_key: true, index: true
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20170415064932_addcategory_to_group.rb:
--------------------------------------------------------------------------------
1 | class AddcategoryToGroup < ActiveRecord::Migration
2 | def change
3 | add_column :events, :promo_category, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170415071956_add_promo_rep_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddPromoRepToEvents < ActiveRecord::Migration
2 | def change
3 | create_table :user_events do |t|
4 | t.column 'event_id', :integer, index: true, foreign_key: true
5 | t.column 'user_id', :integer, index: true, foreign_key: true
6 | t.column 'token', :string
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20170415140800_add_roles_to_user.rb:
--------------------------------------------------------------------------------
1 | class AddRolesToUser < ActiveRecord::Migration
2 | def change
3 | add_column :users, :role, :integer, :default => 0
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170417074628_add_phone_to_users.rb:
--------------------------------------------------------------------------------
1 | class AddPhoneToUsers < ActiveRecord::Migration
2 | def change
3 | add_column :users, :phone, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170418045017_create_clients.rb:
--------------------------------------------------------------------------------
1 | class CreateClients < ActiveRecord::Migration
2 | def change
3 | create_table :clients do |t|
4 | t.string :name
5 | t.string :phone
6 | t.timestamps null: false
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20170418045914_add_user_to_clients.rb:
--------------------------------------------------------------------------------
1 | class AddUserToClients < ActiveRecord::Migration
2 | def change
3 | add_reference :users, :client, index: true, foreign_key: true
4 | create_table :client_brands, id: false do |t|
5 | t.column 'client_id', :integer, index: true, foreign_key: true
6 | t.column 'brand_id', :integer, index: true, foreign_key: true
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20170418060336_add_authentication_token_to_users.rb:
--------------------------------------------------------------------------------
1 | class AddAuthenticationTokenToUsers < ActiveRecord::Migration
2 | def change
3 | add_column :users, :authentication_token, :string, limit: 30
4 | add_index :users, :authentication_token, unique: true
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20170418102452_add_token_to_user.rb:
--------------------------------------------------------------------------------
1 | class AddTokenToUser < ActiveRecord::Migration
2 | def change
3 | add_column :users, :token, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170419164009_add_name_to_groups.rb:
--------------------------------------------------------------------------------
1 | class AddNameToGroups < ActiveRecord::Migration
2 | def change
3 | add_column :groups, :name, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170419170449_add_references_to_group.rb:
--------------------------------------------------------------------------------
1 | class AddReferencesToGroup < ActiveRecord::Migration
2 | def change
3 | add_reference :groups, :client, index: true, foreign_key: true
4 | add_reference :events, :client, index: true, foreign_key: true
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20170420062354_add_category_to_user_events.rb:
--------------------------------------------------------------------------------
1 | class AddCategoryToUserEvents < ActiveRecord::Migration
2 | def change
3 | add_column :user_events, :category, :integer, default: 0
4 | add_column :user_events, :status, :integer, default: 0
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20170420103813_add_fields_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddFieldsToEvent < ActiveRecord::Migration
2 | def change
3 | add_column :events, :check_in, :datetime
4 | add_column :events, :check_out, :datetime
5 | add_column :events, :max_users, :integer, default: 0
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20170420104431_create_event_types.rb:
--------------------------------------------------------------------------------
1 | class CreateEventTypes < ActiveRecord::Migration
2 | def change
3 | create_table :event_types do |t|
4 | t.string :name
5 | t.timestamps null: false
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20170420105033_add_event_type_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddEventTypeToEvents < ActiveRecord::Migration
2 | def change
3 | add_reference :events, :event_type, index: true, foreign_key: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170420114930_add_follow_up_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddFollowUpToEvents < ActiveRecord::Migration
2 | def change
3 | add_column :events, :follow_up, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170421061347_add_admin_to_clients.rb:
--------------------------------------------------------------------------------
1 | class AddAdminToClients < ActiveRecord::Migration
2 | def change
3 | add_column :clients, :admin_id, :integer
4 | add_index :clients, :admin_id
5 | add_foreign_key :clients, :users, {column: :admin_id}
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20170421163414_add_fields_to_user_event.rb:
--------------------------------------------------------------------------------
1 | class AddFieldsToUserEvent < ActiveRecord::Migration
2 | def change
3 | remove_column :events, :notes, :string
4 | remove_column :events, :total_expense, :float
5 | remove_column :events, :check_in, :datetime
6 | remove_column :events, :check_out, :datetime
7 | remove_column :events, :images, :text, default: [], array: true
8 | remove_column :events, :follow_up, :string
9 | add_column :user_events, :notes, :string
10 | add_column :user_events, :total_expense, :string
11 | add_column :user_events, :recommended, :boolean, :default => false
12 | add_column :user_events, :check_in, :datetime
13 | add_column :user_events, :check_out, :datetime
14 | add_column :user_events, :images, :text, default: [], array: true
15 | add_column :user_events, :follow_up, :string
16 | end
17 |
18 | end
19 |
--------------------------------------------------------------------------------
/db/migrate/20170422142339_add_default_to_promo_category.rb:
--------------------------------------------------------------------------------
1 | class AddDefaultToPromoCategory < ActiveRecord::Migration
2 | def change
3 | change_column :events, :promo_category, :integer, default: 0
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170425062445_add_attendance_to_user_events.rb:
--------------------------------------------------------------------------------
1 | class AddAttendanceToUserEvents < ActiveRecord::Migration[5.0]
2 | def change
3 | remove_column :events, :attendance, :string
4 | remove_column :events, :sample, :string
5 |
6 | add_column :user_events, :attendance, :integer
7 | add_column :user_events, :sample, :integer
8 | add_column :user_events, :deleted, :boolean, :default => false
9 | remove_column :user_events, :total_expense, :string
10 | add_column :user_events, :total_expense, :integer, :default => 0
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20170427165610_devise_invitable_add_to_users.rb:
--------------------------------------------------------------------------------
1 | class DeviseInvitableAddToUsers < ActiveRecord::Migration
2 | def up
3 | change_table :users do |t|
4 | t.string :invitation_token
5 | t.datetime :invitation_created_at
6 | t.datetime :invitation_sent_at
7 | t.datetime :invitation_accepted_at
8 | t.integer :invitation_limit
9 | t.references :invited_by, polymorphic: true
10 | t.integer :invitations_count, default: 0
11 | t.index :invitations_count
12 | t.index :invitation_token, unique: true # for invitable
13 | t.index :invited_by_id
14 | end
15 | end
16 |
17 | def down
18 | change_table :users do |t|
19 | t.remove_references :invited_by, polymorphic: true
20 | t.remove :invitations_count, :invitation_limit, :invitation_sent_at, :invitation_accepted_at, :invitation_token, :invitation_created_at
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/db/migrate/20170501160255_add_deleted_to_brands.rb:
--------------------------------------------------------------------------------
1 | class AddDeletedToBrands < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :brands, :deleted, :boolean, :default => false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170501162339_add_image_to_user.rb:
--------------------------------------------------------------------------------
1 | class AddImageToUser < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :users, :image, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170504075121_remove_client_references.rb:
--------------------------------------------------------------------------------
1 | class RemoveClientReferences < ActiveRecord::Migration[5.0]
2 | def change
3 | remove_reference :users, :client, index: true, foreign_key: true
4 | remove_reference :groups, :client, index: true, foreign_key: true
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20170504075523_create_clients_users.rb:
--------------------------------------------------------------------------------
1 | class CreateClientsUsers < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :clients_users ,:id=>false do |t|
4 | t.integer :client_id
5 | t.integer :user_id
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20170504093050_add_unit_cost_to_brands.rb:
--------------------------------------------------------------------------------
1 | class AddUnitCostToBrands < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :brands ,:unit_cost ,:float ,:default => 0
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170505043501_user_groups_table.rb:
--------------------------------------------------------------------------------
1 | class UserGroupsTable < ActiveRecord::Migration[5.0]
2 | def change
3 | drop_table :user_groups do |t|
4 | t.column 'group_id', :integer, index: true, foreign_key: true
5 | t.column 'user_id', :integer, index: true, foreign_key: true
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20170505044036_add_group_reference.rb:
--------------------------------------------------------------------------------
1 | class AddGroupReference < ActiveRecord::Migration[5.0]
2 | def change
3 | add_reference :users, :group, foreign_key: true, index: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170505062535_create_clients_groups.rb:
--------------------------------------------------------------------------------
1 | class CreateClientsGroups < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :clients_groups, :id => false do |t|
4 | t.integer :client_id
5 | t.integer :group_id
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20170505071921_add_pay_to_eevnt.rb:
--------------------------------------------------------------------------------
1 | class AddPayToEevnt < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :events ,:pay ,:integer ,:default=> 0
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170505122552_add_defaults_to_user_events.rb:
--------------------------------------------------------------------------------
1 | class AddDefaultsToUserEvents < ActiveRecord::Migration[5.0]
2 | def change
3 | change_column :user_events, :attendance, :integer,:default => 0
4 | change_column :user_events, :sample, :integer ,:default => 0
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20170510051846_add_area_to_users.rb:
--------------------------------------------------------------------------------
1 | class AddAreaToUsers < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :users, :area, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170515135632_remove_default_from_recommended.rb:
--------------------------------------------------------------------------------
1 | class RemoveDefaultFromRecommended < ActiveRecord::Migration[5.0]
2 | def up
3 | change_column :user_events, :recommended, :boolean, :default => nil
4 | end
5 |
6 | def down
7 | change_column :user_events, :recommended, :boolean, :default => false
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20170516043713_create_contacts.rb:
--------------------------------------------------------------------------------
1 | class CreateContacts < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :contacts do |t|
4 | t.jsonb "details", default: {}
5 | t.timestamps
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20170519071812_chnage_default_for_total_expense.rb:
--------------------------------------------------------------------------------
1 | class ChnageDefaultForTotalExpense < ActiveRecord::Migration[5.0]
2 | def up
3 | change_column :user_events, :total_expense, :float, :default => 0.0
4 | end
5 |
6 | def down
7 | change_column :user_events, :total_expense, :integer, :default => 0
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20170519124231_change_pay_default.rb:
--------------------------------------------------------------------------------
1 | class ChangePayDefault < ActiveRecord::Migration[5.0]
2 | def up
3 | change_column :events, :pay, :float, :default => 0.0
4 | end
5 |
6 | def down
7 | change_column :events, :pay, :integer, :default => 0
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20170601074454_add_group_members.rb:
--------------------------------------------------------------------------------
1 | class AddGroupMembers < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :group_members do |t|
4 | t.column 'group_id', :integer, index: true, foreign_key: true
5 | t.column 'user_id', :integer, index: true, foreign_key: true
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20170606050036_add_recap_to_user_events.rb:
--------------------------------------------------------------------------------
1 | class AddRecapToUserEvents < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :user_events ,:recap ,:boolean
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170612071213_add_deleted_to_events.rb:
--------------------------------------------------------------------------------
1 | class AddDeletedToEvents < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :events ,:deleted ,:boolean ,:default => false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170615060639_add_time_zone_to_locations.rb:
--------------------------------------------------------------------------------
1 | class AddTimeZoneToLocations < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :locations ,:time_zone ,:string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170630060611_add_payment_to_client.rb:
--------------------------------------------------------------------------------
1 | class AddPaymentToClient < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :clients ,:payment ,:float ,:default => 0.0
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170630070608_add_notes_to_event.rb:
--------------------------------------------------------------------------------
1 | class AddNotesToEvent < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :events ,:notes ,:string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20170702142456_add_deleted_to_users.rb:
--------------------------------------------------------------------------------
1 | class AddDeletedToUsers < ActiveRecord::Migration[5.0]
2 | def change
3 | add_column :users , :deleted ,:boolean ,:default=> false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # User.create(email: 'dev@bitcot.com', password: 'bitcotadmin', password_confirmation: 'bitcotadmin', first_name: 'Dev', last_name: 'Bitcot', role: :super_admin)
2 | User.create(email: 'admin@promotracks.com', password: 'Diego&Promo!445$', password_confirmation: 'Diego&Promo!445$', first_name: 'Promo', last_name: 'user', role: :super_admin)
3 |
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/lib/assets/.keep
--------------------------------------------------------------------------------
/lib/platform/custom_failure_app.rb:
--------------------------------------------------------------------------------
1 | class CustomFailureApp < Devise::FailureApp
2 | def respond
3 | if request.format == :json
4 | json_error_response
5 | else
6 | super
7 | end
8 | end
9 |
10 | def json_error_response
11 | self.status = 200
12 | self.content_type = 'application/json'
13 | self.response_body = {success: :false, error: {code: 401, message: i18n_message}}.to_json
14 | end
15 | end
--------------------------------------------------------------------------------
/lib/platform/email_helper.rb:
--------------------------------------------------------------------------------
1 | module EmailHelper
2 | include ActionView::Helpers::NumberHelper
3 |
4 |
5 | def promo_ref_info(user)
6 | data={}
7 | data[:id]=user.id
8 | data[:name]=user.full_name
9 | data[:email]=user.email
10 | data[:passcode]=user.token
11 | data
12 | end
13 |
14 | def get_event(event, user)
15 | data={}
16 | data[:user]=user&.first_name
17 | data[:id]=event.id
18 | data[:category]=event.promo_category
19 | data[:name]=event&.name
20 | data[:start_time]=((event.start_time).in_time_zone(event.address.time_zone))&.strftime('%m/%d/%Y %I:%M %p')
21 | data[:end_time]=((event.end_time).in_time_zone(event.address.time_zone))&.strftime('%m/%d/%Y %I:%M %p')
22 | data[:brand_name]=event.brand&.name
23 | data[:location]=event.address&.city
24 | data[:notes] = event.notes
25 | data[:event_type]=event.event_type&.name
26 | data[:client_name]= event.client.name
27 | data[:client_email]= event.client.admin.email
28 | data[:client_phone]= event.client.phone
29 | data
30 | end
31 |
32 | def get_contact(contact)
33 | data={}
34 | data[:first_name]=contact.details["first_name"]
35 | data[:last_name]= contact.details["last_name"]
36 | data[:email]= contact.details["email"]
37 | data[:phone] = contact.details["phone"]
38 | data[:city]= contact.details["city"]
39 | data[:comments] = contact.details["comments"]
40 | data
41 | end
42 |
43 |
44 | end
--------------------------------------------------------------------------------
/lib/platform/settings.rb:
--------------------------------------------------------------------------------
1 | module PromoRails
2 | class Settings < Settingslogic
3 | #source "#{Rails.root}/config/application.yml"
4 | namespace Rails.env
5 |
6 | class AssetStore < Settingslogic
7 | source File.join(File.dirname(__FILE__), '../..', 'config', 'settings', 'asset_store.yml')
8 | namespace Rails.env
9 | end
10 |
11 | class SES < Settingslogic
12 | source File.join(File.dirname(__FILE__), "../..", "config", "settings", "ses.yml")
13 | namespace Rails.env
14 | end
15 | end
16 | end
--------------------------------------------------------------------------------
/lib/platform/slackistrano_messaging.rb:
--------------------------------------------------------------------------------
1 | module Slackistrano
2 | class SlackistranoMessaging < Messaging::Base
3 |
4 | # Fancy updated message.
5 | # See https://api.slack.com/docs/message-attachments
6 | def payload_for_updated
7 | {
8 | attachments: [{
9 | color: 'good',
10 | title: 'Application Deployed :+1: :boom::bangbang:',
11 | fields: [{
12 | title: 'Environment',
13 | value: stage,
14 | short: true
15 | }, {
16 | title: 'Branch',
17 | value: branch,
18 | short: true
19 | }, {
20 | title: 'Deployer',
21 | value: deployer,
22 | short: true
23 | }, {
24 | title: 'Time',
25 | value: elapsed_time,
26 | short: true
27 | }],
28 | fallback: super[:text]
29 | }]
30 | }
31 | end
32 |
33 | # Slightly tweaked failed message.
34 | # See https://api.slack.com/docs/message-formatting
35 | def payload_for_failed
36 | payload = super
37 | payload[:text] = "OMG :fire: #{payload[:text]}"
38 | payload
39 | end
40 |
41 | # Override the deployer helper to pull the full name from the password file.
42 | # See https://github.com/phallstrom/slackistrano/blob/master/lib/slackistrano/messaging/helpers.rb
43 | def deployer
44 | Etc.getpwnam(ENV['USER']).gecos
45 | end
46 | end
47 | end
--------------------------------------------------------------------------------
/lib/tasks/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/lib/tasks/.keep
--------------------------------------------------------------------------------
/lib/tasks/locations.rake:
--------------------------------------------------------------------------------
1 | namespace :locations do
2 | task :set_time_zone => :environment do
3 | Location.all.each do |location|
4 | unless location.longitude.blank? and location.latitude.blank?
5 | begin
6 | location.time_zone=Timezone.lookup(location.latitude, location.longitude)
7 | location.save
8 | rescue Exception => e
9 | puts "#{location.id}: #{e.message}"
10 | end
11 | end
12 | end
13 | end
14 | end
--------------------------------------------------------------------------------
/lib/tasks/user_event.rake:
--------------------------------------------------------------------------------
1 | namespace :user_events do
2 | task :set_recap => :environment do
3 | UserEvent.accepted.each do |uv|
4 | if uv.follow_up.blank?
5 | uv.recap = false
6 | else
7 | uv.recap = true
8 | end
9 | uv.save
10 | end
11 | end
12 | end
--------------------------------------------------------------------------------
/log/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/log/.keep
--------------------------------------------------------------------------------
/public/422.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The change you wanted was rejected (422)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The change you wanted was rejected.
62 |
63 |
Maybe you tried to change something you didn't have access to.
64 |
65 |
If you are the application owner check the logs for more information.
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/public/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | We're sorry, but something went wrong (500)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
We're sorry, but something went wrong.
62 |
63 |
If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/public/favicon.ico
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/test/controllers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/test/controllers/.keep
--------------------------------------------------------------------------------
/test/fixtures/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/test/fixtures/.keep
--------------------------------------------------------------------------------
/test/fixtures/brands.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/clients.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/event_types.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/events.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/groups.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/locations.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/users.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/helpers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/test/helpers/.keep
--------------------------------------------------------------------------------
/test/integration/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/test/integration/.keep
--------------------------------------------------------------------------------
/test/mailers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/test/mailers/.keep
--------------------------------------------------------------------------------
/test/models/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/test/models/.keep
--------------------------------------------------------------------------------
/test/models/brand_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BrandTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/client_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class ClientTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/event_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class EventTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/event_type_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class EventTypeTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/group_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class GroupTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/location_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class LocationTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/user_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class UserTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV['RAILS_ENV'] ||= 'test'
2 | require File.expand_path('../../config/environment', __FILE__)
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7 | fixtures :all
8 |
9 | # Add more helper methods to be used by all tests here...
10 | end
11 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/vendor/assets/javascripts/.keep
--------------------------------------------------------------------------------
/vendor/assets/javascripts/bootstrap-notify.min.js:
--------------------------------------------------------------------------------
1 | !function (a) {
2 | var b = function (b, d) {
3 | if (this.$element = a(b), this.$note = a(''), this.options = a.extend(!0, {}, a.fn.notify.defaults, d), this.options.transition ? "fade" == this.options.transition ? this.$note.addClass("in").addClass(this.options.transition) : this.$note.addClass(this.options.transition) : this.$note.addClass("fade").addClass("in"), this.options.type ? this.$note.addClass("alert-" + this.options.type) : this.$note.addClass("alert-success"), this.options.message || "" === this.$element.data("message") ? "object" == typeof this.options.message ? this.options.message.html ? this.$note.html(this.options.message.html) : this.options.message.text && this.$note.text(this.options.message.text) : this.$note.html(this.options.message) : this.$note.html(this.$element.data("message")), this.options.closable) {
4 | var e = a('×');
5 | a(e).on("click", a.proxy(c, this)), this.$note.prepend(e)
6 | }
7 | return this
8 | }, c = function () {
9 | return this.options.onClose(), a(this.$note).remove(), this.options.onClosed(), !1
10 | };
11 | b.prototype.show = function () {
12 | this.options.fadeOut.enabled && this.$note.delay(this.options.fadeOut.delay || 3e3).fadeOut("slow", a.proxy(c, this)), this.$element.append(this.$note), this.$note.alert()
13 | }, b.prototype.hide = function () {
14 | this.options.fadeOut.enabled ? this.$note.delay(this.options.fadeOut.delay || 3e3).fadeOut("slow", a.proxy(c, this)) : c.call(this)
15 | }, a.fn.notify = function (a) {
16 | return new b(this, a)
17 | }, a.fn.notify.defaults = {
18 | type: "success",
19 | closable: !0,
20 | transition: "fade",
21 | fadeOut: {enabled: !0, delay: 3e3},
22 | message: null,
23 | onClose: function () {
24 | },
25 | onClosed: function () {
26 | }
27 | }
28 | }(window.jQuery);
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsguru-git/rails-promotracks/bd97a51c81c6ff13869d1ff03f527840d678042f/vendor/assets/stylesheets/.keep
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/bootstrap-notify.min.css:
--------------------------------------------------------------------------------
1 | .notifications {
2 | position: fixed;
3 | z-index: 9999
4 | }
5 |
6 | .notifications.top-right {
7 | right: 10px;
8 | top: 25px
9 | }
10 |
11 | .notifications.top-left {
12 | left: 10px;
13 | top: 25px
14 | }
15 |
16 | .notifications.bottom-left {
17 | left: 10px;
18 | bottom: 25px
19 | }
20 |
21 | .notifications.bottom-right {
22 | right: 10px;
23 | bottom: 25px
24 | }
25 |
26 | .notifications > div {
27 | position: relative;
28 | margin: 5px 0
29 | }
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/jquery.jscrollpane.css:
--------------------------------------------------------------------------------
1 | /*
2 | * CSS Styles that are needed by jScrollPane for it to operate correctly.
3 | *
4 | * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane
5 | * may not operate correctly without them.
6 | */
7 |
8 | .jspContainer {
9 | overflow: hidden;
10 | position: relative;
11 | }
12 |
13 | .jspPane {
14 | position: absolute;
15 | }
16 |
17 | .jspVerticalBar {
18 | position: absolute;
19 | top: 0;
20 | right: 0;
21 | width: 16px;
22 | height: 100%;
23 | background: red;
24 | }
25 |
26 | .jspHorizontalBar {
27 | position: absolute;
28 | bottom: 0;
29 | left: 0;
30 | width: 100%;
31 | height: 16px;
32 | background: red;
33 | }
34 |
35 | .jspCap {
36 | display: none;
37 | }
38 |
39 | .jspHorizontalBar .jspCap {
40 | float: left;
41 | }
42 |
43 | .jspTrack {
44 | background: #dde;
45 | position: relative;
46 | }
47 |
48 | .jspDrag {
49 | background: #bbd;
50 | position: relative;
51 | top: 0;
52 | left: 0;
53 | cursor: pointer;
54 | }
55 |
56 | .jspHorizontalBar .jspTrack,
57 | .jspHorizontalBar .jspDrag {
58 | float: left;
59 | height: 100%;
60 | }
61 |
62 | .jspArrow {
63 | background: #50506d;
64 | text-indent: -20000px;
65 | display: block;
66 | cursor: pointer;
67 | padding: 0;
68 | margin: 0;
69 | }
70 |
71 | .jspArrow.jspDisabled {
72 | cursor: default;
73 | background: #80808d;
74 | }
75 |
76 | .jspVerticalBar .jspArrow {
77 | height: 16px;
78 | }
79 |
80 | .jspHorizontalBar .jspArrow {
81 | width: 16px;
82 | float: left;
83 | height: 100%;
84 | }
85 |
86 | .jspVerticalBar .jspArrow:focus {
87 | outline: none;
88 | }
89 |
90 | .jspCorner {
91 | background: #eeeef4;
92 | float: left;
93 | height: 100%;
94 | }
95 |
96 | /* Yuk! CSS Hack for IE6 3 pixel bug :( */
97 | * html .jspCorner {
98 | margin: 0 -3px 0 0;
99 | }
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/jquery.ui.rotatable.css:
--------------------------------------------------------------------------------
1 | .ui-rotatable-handle {
2 | height: 16px;
3 | width: 16px;
4 | cursor: pointer;
5 | background-image: url(rotate.png);
6 | background-size: 100%;
7 | left: 2px;
8 | bottom: 2px;
9 | }
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/nprogress.css:
--------------------------------------------------------------------------------
1 | /* Make clicks pass-through */
2 | #nprogress {
3 | pointer-events: none;
4 | }
5 |
6 | #nprogress .bar {
7 | background: #29d;
8 |
9 | position: fixed;
10 | z-index: 1031;
11 | top: 0;
12 | left: 0;
13 |
14 | width: 100%;
15 | height: 2px;
16 | }
17 |
18 | /* Fancy blur effect */
19 | #nprogress .peg {
20 | display: block;
21 | position: absolute;
22 | right: 0px;
23 | width: 100px;
24 | height: 100%;
25 | box-shadow: 0 0 10px #29d, 0 0 5px #29d;
26 | opacity: 1.0;
27 |
28 | -webkit-transform: rotate(3deg) translate(0px, -4px);
29 | -ms-transform: rotate(3deg) translate(0px, -4px);
30 | transform: rotate(3deg) translate(0px, -4px);
31 | }
32 |
33 | /* Remove these to get rid of the spinner */
34 | #nprogress .spinner {
35 | display: block;
36 | position: fixed;
37 | z-index: 1031;
38 | top: 15px;
39 | right: 15px;
40 | }
41 |
42 | #nprogress .spinner-icon {
43 | width: 18px;
44 | height: 18px;
45 | box-sizing: border-box;
46 |
47 | border: solid 2px transparent;
48 | border-top-color: #29d;
49 | border-left-color: #29d;
50 | border-radius: 50%;
51 |
52 | -webkit-animation: nprogress-spinner 400ms linear infinite;
53 | animation: nprogress-spinner 400ms linear infinite;
54 | }
55 |
56 | .nprogress-custom-parent {
57 | overflow: hidden;
58 | position: relative;
59 | }
60 |
61 | .nprogress-custom-parent #nprogress .spinner,
62 | .nprogress-custom-parent #nprogress .bar {
63 | position: absolute;
64 | }
65 |
66 | @-webkit-keyframes nprogress-spinner {
67 | 0% {
68 | -webkit-transform: rotate(0deg);
69 | }
70 | 100% {
71 | -webkit-transform: rotate(360deg);
72 | }
73 | }
74 |
75 | @keyframes nprogress-spinner {
76 | 0% {
77 | transform: rotate(0deg);
78 | }
79 | 100% {
80 | transform: rotate(360deg);
81 | }
82 | }
83 |
84 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/apps/calendar.css:
--------------------------------------------------------------------------------
1 | /*
2 | * CALENDAR
3 | */
4 | .app-calendar {
5 | margin: -25px -25px -26px -26px;
6 | }
7 |
8 | .app-calendar .fc-toolbar {
9 | padding: 20px 20px 0px;
10 | }
11 |
12 | @media (max-width: 991px) {
13 | .app-calendar {
14 | margin: -25px -26px -26px -26px;
15 | }
16 | }
17 |
18 | @media (max-width: 543px) {
19 | .app-calendar {
20 | margin: -25px -21px -21px -21px;
21 | }
22 | }
23 |
24 | .app-calendar-list .checkbox {
25 | margin-bottom: 0px;
26 | }
27 |
28 | .app-calendar-list li {
29 | margin-bottom: 10px;
30 | }
31 |
32 | @media (max-width: 991px) {
33 | .app-calendar-list li {
34 | display: inline-block;
35 | margin-right: 20px;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/apps/gallery.css:
--------------------------------------------------------------------------------
1 | /*
2 | * GALLERY
3 | */
4 | .app-gallery .app-gallery-item {
5 | float: left;
6 | width: 200px;
7 | height: 160px;
8 | overflow: hidden;
9 | position: relative;
10 | z-index: 1;
11 | background-position: center;
12 | background-size: cover;
13 | -webkit-transition: all 0.05s ease-in-out;
14 | -o-transition: all 0.05s ease-in-out;
15 | transition: all 0.05s ease-in-out;
16 | }
17 |
18 | @media (max-width: 767px) {
19 | .app-gallery .app-gallery-item {
20 | width: 100%;
21 | height: 270px;
22 | }
23 | }
24 |
25 | .app-gallery .app-gallery-item:hover {
26 | -webkit-transform: scale(1.1);
27 | -ms-transform: scale(1.1);
28 | -o-transform: scale(1.1);
29 | transform: scale(1.1);
30 | z-index: 2;
31 | }
32 |
33 | .app-gallery .app-gallery-item:hover .app-gallery-item-hover {
34 | display: block;
35 | position: absolute;
36 | top: 0px;
37 | left: 0px;
38 | width: 100%;
39 | height: 100%;
40 | text-align: center;
41 | padding-top: 62px;
42 | background: rgba(36, 34, 47, 0.8);
43 | }
44 |
45 | .app-gallery .app-gallery-item .app-gallery-item-hover {
46 | display: none;
47 | }
48 |
49 | .app-gallery .app-gallery-item.edit:before {
50 | position: absolute;
51 | top: -15px;
52 | right: -15px;
53 | width: 0px;
54 | height: 0px;
55 | content: '';
56 | z-index: 3;
57 | border: 15px solid transparent;
58 | border-bottom-color: #01a8fe;
59 | -webkit-transform: rotate(45deg);
60 | -ms-transform: rotate(45deg);
61 | -o-transform: rotate(45deg);
62 | transform: rotate(45deg);
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/apps/mail.css:
--------------------------------------------------------------------------------
1 | /*
2 | * MAIL
3 | */
4 | .mail .panel-heading {
5 | height: 66px;
6 | padding: 13px 25px 10px !important;
7 | }
8 |
9 | .mail .panel-heading .mail-heading {
10 | float: left;
11 | margin-top: 2px;
12 | }
13 |
14 | .mail .panel-heading .mail-heading .nav-link {
15 | padding-top: 8px;
16 | padding-bottom: 20px;
17 | }
18 |
19 | .mail .messaging-list-item .s2 {
20 | margin-left: 0px;
21 | }
22 |
23 | .mail .note-editor {
24 | margin-bottom: 0px;
25 | }
26 |
27 | .compose-message .note-editor {
28 | margin-bottom: 0px;
29 | }
30 |
31 | @media (max-width: 1199px) {
32 | .mail.panel {
33 | margin-bottom: 15px;
34 | }
35 |
36 | .mail.panel.panel-with-sidebar:before {
37 | display: none;
38 | }
39 |
40 | .mail.panel.panel-with-sidebar .panel-heading, .mail.panel.panel-with-sidebar .panel-body, .mail.panel.panel-with-sidebar .panel-footer {
41 | margin-left: 0px !important;
42 | margin-right: 0px !important;
43 | }
44 |
45 | .mail.panel.panel-with-sidebar .panel-sidebar {
46 | float: none !important;
47 | width: auto;
48 | border-bottom: 1px solid #dfe4ed;
49 | margin-bottom: 0px !important;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/apps/profile.css:
--------------------------------------------------------------------------------
1 | /*
2 | * PROFILE
3 | */
4 | .profile-header {
5 | background: #ffffff;
6 | height: 145px;
7 | margin: -25px;
8 | padding: 25px;
9 | background-size: cover;
10 | position: relative;
11 | }
12 |
13 | .profile-header .profile-header-info {
14 | padding: 25px;
15 | position: absolute;
16 | bottom: 0px;
17 | left: 0px;
18 | width: 100%;
19 | }
20 |
21 | .profile-user {
22 | background: #acb7bf;
23 | margin-top: -145px;
24 | color: #ffffff;
25 | background-size: cover;
26 | }
27 |
28 | .profile-user .profile-user-title .avatar {
29 | width: 120px;
30 | height: 120px;
31 | margin-bottom: 20px;
32 | padding: 5px;
33 | background: #ffffff;
34 | }
35 |
36 | .profile-user .profile-user-title .avatar img {
37 | -webkit-border-radius: 100%;
38 | border-radius: 100%;
39 | }
40 |
41 | .profile-header-title {
42 | padding-left: 25px;
43 | }
44 |
45 | .profile-user-skills progress {
46 | height: 6px;
47 | margin-top: 4px;
48 | }
49 |
50 | .mode-superclean .profile-header-title {
51 | padding-left: 15px;
52 | }
53 |
54 | @media (max-width: 1200px) {
55 | .profile-header-title {
56 | padding-left: 0px !important;
57 | }
58 |
59 | .profile-user {
60 | margin-top: 0px;
61 | }
62 | }
63 |
64 | @media (max-width: 1600px) {
65 | .user-profile-dl dt {
66 | float: none;
67 | text-align: left;
68 | }
69 |
70 | .user-profile-dl dd {
71 | margin-left: 0px;
72 | margin-bottom: 10px;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/components/badges-labels.css:
--------------------------------------------------------------------------------
1 | /*
2 | * BADGES & LABELS
3 | */
4 | .label {
5 | font-weight: normal;
6 | background: #ffffff;
7 | color: #6a7a84;
8 | font-size: 100%;
9 | }
10 |
11 | .label.label-default {
12 | background: #acb7bf;
13 | color: #ffffff;
14 | }
15 |
16 | .label.label-primary {
17 | background: #01a8fe;
18 | color: #ffffff;
19 | }
20 |
21 | .label.label-secondary {
22 | background: #6a7a84;
23 | color: #ffffff;
24 | }
25 |
26 | .label.label-success {
27 | background: #46be8a;
28 | color: #ffffff;
29 | }
30 |
31 | .label.label-info {
32 | background: #0190da;
33 | color: #ffffff;
34 | }
35 |
36 | .label.label-danger {
37 | background: #fb434a;
38 | color: #ffffff;
39 | }
40 |
41 | .label.label-warning {
42 | background: #f39834;
43 | color: #ffffff;
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/components/carousel.css:
--------------------------------------------------------------------------------
1 | /*
2 | * CAROUSEL
3 | */
4 | .carousel .fa {
5 | font-family: FontAwesome !important;
6 | font-size: 24px;
7 | }
8 |
9 | .carousel .fa.icon-prev:before {
10 | content: "\f060";
11 | }
12 |
13 | .carousel .fa.icon-next:before {
14 | content: "\f061";
15 | }
16 |
17 | .carousel .carousel-indicators {
18 | bottom: 10px;
19 | }
20 |
21 | .carousel .carousel-indicators li {
22 | width: 12px;
23 | height: 12px;
24 | margin: 1px 3px;
25 | }
26 |
27 | .carousel .carousel-caption {
28 | bottom: 40px;
29 | text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
30 | }
31 |
32 | .carousel .carousel-caption h1, .carousel .carousel-caption h2, .carousel .carousel-caption h3, .carousel .carousel-caption h4, .carousel .carousel-caption h5, .carousel .carousel-caption h6 {
33 | color: #ffffff;
34 | }
35 |
36 | .owl-demo .item {
37 | height: 140px;
38 | background: #acb7bf;
39 | padding: 1rem;
40 | }
41 |
42 | .owl-demo .item * {
43 | color: #ffffff;
44 | }
45 |
46 | .owl-demo-img .owl-item img {
47 | height: 132px;
48 | }
49 |
50 | .owl-demo-video .item-video {
51 | height: 300px;
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/components/collapse.css:
--------------------------------------------------------------------------------
1 | /*
2 | * COLLAPSE
3 | */
4 | .accordion .panel {
5 | -webkit-border-radius: 0;
6 | border-radius: 0;
7 | margin-bottom: 0px;
8 | border-bottom-width: 0px;
9 | }
10 |
11 | .accordion .panel:first-child {
12 | -webkit-border-radius: 5px 5px 0 0;
13 | border-radius: 5px 5px 0 0;
14 | }
15 |
16 | .accordion .panel:last-child {
17 | -webkit-border-radius: 0 0 5px 5px;
18 | border-radius: 0 0 5px 5px;
19 | border-bottom-width: 1px;
20 | }
21 |
22 | .accordion .panel .panel-heading {
23 | padding: 10px 20px;
24 | cursor: pointer;
25 | }
26 |
27 | .accordion .panel .panel-body {
28 | padding: 0px 20px 10px 20px;
29 | }
30 |
31 | .accordion.accordion-margin-bottom .panel {
32 | -webkit-border-radius: 5px;
33 | border-radius: 5px;
34 | margin-bottom: 10px;
35 | border-bottom-width: 1px;
36 | }
37 |
38 | .accordion .accordion-indicator {
39 | padding-top: 1px;
40 | color: #dfe4ed;
41 | }
42 |
43 | .accordion .accordion-indicator .plus {
44 | display: none;
45 | }
46 |
47 | .accordion .accordion-indicator .minus {
48 | display: inline;
49 | }
50 |
51 | .accordion .collapsed .accordion-indicator .plus {
52 | display: inline;
53 | }
54 |
55 | .accordion .collapsed .accordion-indicator .minus {
56 | display: none;
57 | }
58 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/components/modal.css:
--------------------------------------------------------------------------------
1 | /*
2 | * MODAL
3 | */
4 | .modal .modal-content {
5 | border: none;
6 | }
7 |
8 | .modal .modal-header .close {
9 | outline: none !important;
10 | width: 30px;
11 | height: 30px;
12 | display: inline-block;
13 | line-height: 30px;
14 | text-align: center;
15 | }
16 |
17 | .modal .modal-header .close span {
18 | position: relative;
19 | top: 3px;
20 | }
21 |
22 | .modal.modal-size-small {
23 | padding-left: 10px;
24 | padding-right: 10px;
25 | }
26 |
27 | .modal.modal-size-small .modal-dialog {
28 | max-width: 300px;
29 | width: auto;
30 | }
31 |
32 | @media (max-width: 543px) {
33 | .modal.modal-size-small .modal-dialog {
34 | max-width: none;
35 | }
36 | }
37 |
38 | .modal.modal-size-large {
39 | padding-left: 10px;
40 | padding-right: 10px;
41 | }
42 |
43 | .modal.modal-size-large .modal-dialog {
44 | max-width: 980px;
45 | width: auto;
46 | }
47 |
48 | .modal-backdrop {
49 | background: #24222f;
50 | }
51 |
52 | .modal-backdrop.in {
53 | opacity: .3;
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/components/pagination.css:
--------------------------------------------------------------------------------
1 | /*
2 | * PAGINATION
3 | */
4 | .pagination .page-link {
5 | border-color: #dfe4ed;
6 | color: #827ca1;
7 | outline: none;
8 | margin-bottom: 10px;
9 | }
10 |
11 | .pagination .page-link:hover, .pagination .page-link:focus {
12 | background: #acb7bf;
13 | color: #ffffff;
14 | border-color: #acb7bf;
15 | }
16 |
17 | .pagination .page-item.disabled .page-link {
18 | background: #eceff4;
19 | }
20 |
21 | .pagination .page-item.active .page-link {
22 | background: #01a8fe;
23 | border-color: #01a8fe;
24 | }
25 |
26 | .pager li > a {
27 | border-color: #dfe4ed;
28 | color: #827ca1;
29 | outline: none;
30 | -webkit-border-radius: 3px;
31 | border-radius: 3px;
32 | }
33 |
34 | .pager li > a:hover, .pager li > a:focus {
35 | background: #acb7bf;
36 | color: #ffffff;
37 | border-color: #acb7bf;
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/components/progress-bars.css:
--------------------------------------------------------------------------------
1 | /*
2 | * PROGRESS BARS
3 | */
4 | .progress {
5 | height: 18px;
6 | }
7 |
8 | .progress:last-child {
9 | margin-bottom: 0px;
10 | }
11 |
12 | .progress-animation {
13 | -webkit-transition: all 0.1s !important;
14 | -o-transition: all 0.1s !important;
15 | transition: all 0.1s !important;
16 | }
17 |
18 | .progress-primary[value]::-webkit-progress-value, .progress[value]::-webkit-progress-value {
19 | background-color: #01a8fe;
20 | }
21 |
22 | .progress-primary[value]::-moz-progress-bar, .progress[value]::-moz-progress-bar {
23 | background-color: #01a8fe;
24 | }
25 |
26 | .progress-default[value]::-webkit-progress-value {
27 | background-color: #acb7bf;
28 | }
29 |
30 | .progress-default[value]::-moz-progress-bar {
31 | background-color: #acb7bf;
32 | }
33 |
34 | .progress-secondary[value]::-webkit-progress-value {
35 | background-color: #6a7a84;
36 | }
37 |
38 | .progress-secondary[value]::-moz-progress-bar {
39 | background-color: #6a7a84;
40 | }
41 |
42 | .progress-success[value]::-webkit-progress-value {
43 | background-color: #46be8a;
44 | }
45 |
46 | .progress-success[value]::-moz-progress-bar {
47 | background-color: #46be8a;
48 | }
49 |
50 | .progress-danger[value]::-webkit-progress-value {
51 | background-color: #fb434a;
52 | }
53 |
54 | .progress-danger[value]::-moz-progress-bar {
55 | background-color: #fb434a;
56 | }
57 |
58 | .progress-warning[value]::-webkit-progress-value {
59 | background-color: #f39834;
60 | }
61 |
62 | .progress-warning[value]::-moz-progress-bar {
63 | background-color: #f39834;
64 | }
65 |
66 | .progress-info[value]::-webkit-progress-value {
67 | background-color: #0190da;
68 | }
69 |
70 | .progress-info[value]::-moz-progress-bar {
71 | background-color: #0190da;
72 | }
73 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/components/tables.css:
--------------------------------------------------------------------------------
1 | /*
2 | * BASIC TABLES
3 | */
4 | .table thead th {
5 | border-bottom: 1px solid #eceff4;
6 | outline: none !important;
7 | }
8 |
9 | .table thead th:focus {
10 | background: #f2f4f8;
11 | }
12 |
13 | .table td, .table th {
14 | border-color: #eceff4;
15 | }
16 |
17 | .table td:focus, .table th:focus {
18 | background-color: #eceff4;
19 | }
20 |
21 | .table tbody tr:first-child td {
22 | border-top: none;
23 | }
24 |
25 | .table.table-hover tbody tr:hover {
26 | background: #f2f4f8;
27 | }
28 |
29 | .table tr.active, .table th.active {
30 | background: #f2f4f8;
31 | }
32 |
33 | .table .thead-inverse th {
34 | background: #38354a;
35 | }
36 |
37 | .table .thead-default th {
38 | background: #eceff4;
39 | }
40 |
41 | .table.table-striped tbody tr:nth-of-type(odd) {
42 | background: #f2f4f8;
43 | }
44 |
45 | .table-inverse thead th {
46 | border-bottom-color: #514d6a;
47 | }
48 |
49 | .table-inverse th, .table-inverse td {
50 | border-top-color: #514d6a;
51 | }
52 |
53 | .table-inverse th, .table-inverse td, .table-inverse thead th {
54 | background: #38354a;
55 | }
56 |
57 | .table-inverse th:focus, .table-inverse td:focus, .table-inverse thead th:focus {
58 | background: #2b2838;
59 | }
60 |
61 | .table-inverse tr.active, .table-inverse th.active {
62 | background: #f2f4f8;
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/components/tabs.css:
--------------------------------------------------------------------------------
1 | /*
2 | * TABS
3 | */
4 | .nav-tabs .nav-link:focus, .nav-tabs .nav-link:hover {
5 | border-color: transparent;
6 | }
7 |
8 | .nav-tabs-horizontal .nav-tabs {
9 | border-bottom: 1px solid #dfe4ed;
10 | }
11 |
12 | .nav-tabs-horizontal .nav-tabs .nav-item {
13 | margin-bottom: -2px;
14 | cursor: pointer;
15 | }
16 |
17 | .nav-tabs-horizontal .nav-tabs .nav-item .nav-link {
18 | border: none;
19 | border-bottom: 3px solid transparent;
20 | }
21 |
22 | .nav-tabs-horizontal .nav-tabs .nav-item .nav-link.active, .nav-tabs-horizontal .nav-tabs .nav-item .nav-link:focus {
23 | border-bottom-color: #01a8fe !important;
24 | }
25 |
26 | .nav-tabs-horizontal .nav-tabs .nav-item .nav-link:hover {
27 | border-bottom-color: #dfe4ed;
28 | }
29 |
30 | .nav-tabs-vertical .nav-tabs {
31 | border-bottom: none;
32 | border-right: 1px solid #dfe4ed;
33 | float: left;
34 | margin-right: 30px;
35 | }
36 |
37 | .nav-tabs-vertical .nav-tabs .nav-item {
38 | margin: 0px -2px 1px 0px;
39 | float: none;
40 | cursor: pointer;
41 | }
42 |
43 | .nav-tabs-vertical .nav-tabs .nav-item .nav-link {
44 | border: none;
45 | border-right: 3px solid transparent;
46 | padding-left: 0px;
47 | -webkit-border-radius: 0px;
48 | border-radius: 0px;
49 | }
50 |
51 | .nav-tabs-vertical .nav-tabs .nav-item .nav-link.active, .nav-tabs-vertical .nav-tabs .nav-item .nav-link:focus {
52 | border-right-color: #01a8fe !important;
53 | }
54 |
55 | .nav-tabs-vertical .nav-tabs .nav-item .nav-link:hover {
56 | border-right-color: #dfe4ed;
57 | }
58 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/forms/autocomplete.css:
--------------------------------------------------------------------------------
1 | /*
2 | * AUTOCOMPLETE
3 | */
4 | .typeahead__container {
5 | position: relative;
6 | }
7 |
8 | .typeahead__container .typeahead__field {
9 | position: relative;
10 | z-index: 1;
11 | }
12 |
13 | .typeahead__container .typeahead__result {
14 | display: none;
15 | position: absolute;
16 | z-index: 2;
17 | top: 100%;
18 | width: 100%;
19 | margin-top: -2px;
20 | }
21 |
22 | .typeahead__container .typeahead__result .typeahead__list {
23 | background: #ffffff;
24 | margin: 0px;
25 | list-style: none;
26 | padding: 0px;
27 | border: 1px solid #01a8fe;
28 | -webkit-border-radius: 0px 0px 3px 3px;
29 | border-radius: 0px 0px 3px 3px;
30 | border-top: 1px solid #dfe4ed;
31 | }
32 |
33 | .typeahead__container .typeahead__result .typeahead__list .typeahead__item a {
34 | display: block;
35 | padding: 6px 16px;
36 | color: #514d6a;
37 | }
38 |
39 | .typeahead__container .typeahead__result .typeahead__list .typeahead__item.active a {
40 | background: #f2f4f8;
41 | }
42 |
43 | .typeahead__container .typeahead__result .typeahead__list .typeahead__item:hover a {
44 | background: #dfe4ed;
45 | }
46 |
47 | .typeahead__container .typeahead__result .typeahead__list .typeahead__item strong {
48 | font-weight: 600;
49 | }
50 |
51 | .typeahead__container.result .typeahead__result {
52 | display: block;
53 | }
54 |
55 | .typeahead__container.result input.form-control {
56 | border-right-color: transparent;
57 | }
58 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/forms/checkboxes-radio.css:
--------------------------------------------------------------------------------
1 | /*
2 | * CHECKBOXES & RADIOS
3 | */
4 | .radio, .checkbox {
5 | display: inline-block;
6 | }
7 |
8 | .radio label input[type=radio], .radio label input[type=checkbox], .checkbox label input[type=radio], .checkbox label input[type=checkbox] {
9 | margin-right: 5px;
10 | display: -webkit-inline-box;
11 | display: -webkit-inline-flex;
12 | display: -moz-inline-box;
13 | display: -ms-inline-flexbox;
14 | display: inline-flex;
15 | }
16 |
17 | label[disabled] {
18 | cursor: not-allowed;
19 | color: #bbb8cb;
20 | }
21 |
22 | label[disabled].btn {
23 | opacity: .6;
24 | cursor: not-allowed;
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/forms/form-validation.css:
--------------------------------------------------------------------------------
1 | /*
2 | * FORM VALIDATION
3 | */
4 | .form-group {
5 | position: relative;
6 | }
7 |
8 | .form-control-error {
9 | background: #fb434a;
10 | padding: 5px 8px;
11 | -webkit-border-radius: 3px;
12 | border-radius: 3px;
13 | position: absolute;
14 | right: 0;
15 | bottom: 37px;
16 | margin-bottom: 8px;
17 | max-width: 230px;
18 | font-size: 80%;
19 | z-index: 1;
20 | }
21 |
22 | .form-control-error:after {
23 | width: 0px;
24 | height: 0px;
25 | content: '';
26 | display: block;
27 | border-style: solid;
28 | border-width: 5px 5px 0;
29 | border-color: #fb434a transparent transparent;
30 | position: absolute;
31 | right: 20px;
32 | bottom: -4px;
33 | margin-left: -5px;
34 | }
35 |
36 | .form-control-error ul {
37 | list-style: none;
38 | color: #ffffff;
39 | padding: 0px;
40 | margin: 0px;
41 | }
42 |
43 | .form-control-error-list ul {
44 | list-style: none;
45 | color: #fb434a;
46 | padding: 0px;
47 | margin: 5px 0px 0px 0px;
48 | font-size: 80%;
49 | font-weight: 400;
50 | }
51 |
52 | .has-danger .select2-selection--single, .has-danger .select2-selection--multiple {
53 | border-color: #fb434a !important;
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/forms/selectboxes.css:
--------------------------------------------------------------------------------
1 | /*
2 | * SELECTBOXES
3 | */
4 | select {
5 | -webkit-appearance: none;
6 | -moz-appearance: none;
7 | appearance: none;
8 | }
9 |
10 | select.form-control {
11 | background: #fff center right no-repeat url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAFCAYAAABB9hwOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA25pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpiNWZkMzNlMC0zNTcxLTI4NDgtYjA3NC01ZTRhN2RjMWVmNjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODZDNDdFRTkxRTJBMTFFNjg0MUM5MTMwMjYwRDYwRDkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODZDNDdFRTgxRTJBMTFFNjg0MUM5MTMwMjYwRDYwRDkiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RTUxRUI3MDZEQjk4MTFFNUI1NDA5QTcyNTlFQzRERTYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RTUxRUI3MDdEQjk4MTFFNUI1NDA5QTcyNTlFQzRERTYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz69wtu7AAAAe0lEQVR42mLce+zSOVFhYUMGNHDv4cOd/q6WHgxkAqbvP77H/P339zey4Nfv3z7ceXA/hoECwCQnLXPtw8eP05EFHz15WuRm7/CGIoNBhLCgUPnPX79egdgv37w+qKmqOp+BQsAEpX8wMTFm/fnz5/P/f//DGagAAAIMAKIuMR+q/rU9AAAAAElFTkSuQmCC");
12 | }
13 |
14 | select.form-control[multiple] {
15 | background: #fff;
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/helpers/rtl.version.css:
--------------------------------------------------------------------------------
1 | /*
2 | * RTL VERSION
3 | */
4 | html[dir=rtl] .widget-seven .counter-count {
5 | right: auto;
6 | left: 10px;
7 | }
8 |
9 | html[dir=rtl] .pull-right {
10 | float: left;
11 | }
12 |
13 | html[dir=rtl] .pull-left {
14 | float: right;
15 | }
16 |
17 | html[dir=rtl] .single-page-block-header-menu {
18 | text-align: left;
19 | }
20 |
21 | html[dir=rtl] .single-page-block .single-page-block-inner h3 {
22 | text-align: right;
23 | }
24 |
25 | html[dir=rtl] .mail .panel-heading .mail-heading {
26 | float: right;
27 | }
28 |
29 | html[dir=rtl] div.dataTables_wrapper div.dataTables_paginate {
30 | text-align: left;
31 | }
32 |
33 | html[dir=rtl] .radio label, html[dir=rtl] .checkbox label {
34 | padding-right: 0px;
35 | padding-left: 20px;
36 | }
37 |
38 | html[dir=rtl] .app-gallery .app-gallery-item {
39 | float: right;
40 | }
41 |
42 | html[dir=rtl] nav.left-menu .left-menu-list li.left-menu-list-submenu > .left-menu-link:after {
43 | right: auto;
44 | left: 15px;
45 | }
46 |
47 | html[dir=rtl] nav.top-menu .menu .menu-user-block {
48 | float: left;
49 | }
50 |
51 | html[dir=rtl] .menu-info-block {
52 | margin-right: 0px !important;
53 | margin-left: 80px;
54 | }
55 |
56 | html[dir=rtl] .menu-info-block .left {
57 | float: right !important;
58 | }
59 |
60 | html[dir=rtl] .menu-info-block .right {
61 | float: left !important;
62 | }
63 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/helpers/typography.css:
--------------------------------------------------------------------------------
1 | /*
2 | * TYPOGRAPHY
3 | */
4 | .h1, .h2, .h3, .h4, .h5, .h6,
5 | h1, h2, h3, h4, h5, h6 {
6 | margin-bottom: 20px;
7 | font-weight: 600;
8 | color: #24222f;
9 | }
10 |
11 | .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small,
12 | h1 small, h2 small, h3 small, h4 small, h5 small, h6 small,
13 | .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small,
14 | h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small {
15 | color: #827ca1;
16 | }
17 |
18 | .h1 .icon-heading, .h2 .icon-heading, .h3 .icon-heading, .h4 .icon-heading, .h5 .icon-heading, .h6 .icon-heading,
19 | h1 .icon-heading, h2 .icon-heading, h3 .icon-heading, h4 .icon-heading, h5 .icon-heading, h6 .icon-heading {
20 | margin-right: 10px;
21 | }
22 |
23 | .h1 .label, .h2 .label, .h3 .label, .h4 .label, .h5 .label, .h6 .label,
24 | h1 .label, h2 .label, h3 .label, h4 .label, h5 .label, h6 .label {
25 | font-size: 75% !important;
26 | }
27 |
28 | code {
29 | color: #827ca1;
30 | background: #f2f4f8;
31 | }
32 |
33 | .float-right {
34 | float: right;
35 | }
36 |
37 | .float-left {
38 | float: left;
39 | }
40 |
41 | mark {
42 | background: #f2a654;
43 | color: #ffffff;
44 | }
45 |
46 | .drop-cap {
47 | float: left;
48 | padding: 5px;
49 | margin-right: 5px;
50 | font-family: serif;
51 | font-size: 60px;
52 | line-height: 50px;
53 | color: #24222f;
54 | }
55 |
56 | .drop-cap.drop-cap-reversed {
57 | color: #ffffff;
58 | background: #24222f;
59 | }
60 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/main.scss:
--------------------------------------------------------------------------------
1 | @import "helpers/typography";
2 | @import "helpers/base.default";
3 | @import "helpers/base.responsive";
4 | @import "helpers/rtl.version";
5 | @import "forms/basic-form-elements";
6 | @import "forms/buttons";
7 | @import "forms/dropdowns";
8 | @import "forms/checkboxes-radio";
9 | @import "forms/form-validation";
10 | @import "forms/selectboxes";
11 | @import "forms/autocomplete";
12 | @import "components/utilities";
13 | @import "components/tables";
14 | @import "components/steps";
15 | @import "components/tooltips-popovers";
16 | @import "components/modal";
17 | @import "components/progress-bars";
18 | @import "components/badges-labels";
19 | @import "components/pagination";
20 | @import "components/collapse";
21 | @import "components/tabs";
22 | @import "components/notifications-alerts";
23 | @import "components/carousel";
24 | @import "components/widgets";
25 | @import "components/breadcrumbs";
26 | @import "apps/calendar";
27 | @import "apps/gallery";
28 | @import "apps/mail";
29 | @import "apps/messaging";
30 | @import "apps/profile";
31 | @import "overrides/overrides";
32 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/overrides/dropify.css:
--------------------------------------------------------------------------------
1 | /*
2 | * DROPIFY
3 | */
4 | .dropify-wrapper {
5 | border: 1px solid #d2d9e5;
6 | -webkit-border-radius: 5px;
7 | border-radius: 5px;
8 | }
9 |
10 | .dropify-wrapper.disabled {
11 | opacity: .5;
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/overrides/nprogress.css:
--------------------------------------------------------------------------------
1 | /*
2 | * NPROGRESS
3 | */
4 | #nprogress .bar {
5 | height: 3px;
6 | background: #01a8fe;
7 | }
8 |
9 | #nprogress .spinner {
10 | width: 140px;
11 | padding: 8px 15px;
12 | background: #ffffff;
13 | -webkit-border-radius: 4px;
14 | border-radius: 4px;
15 | border: 1px solid #dfe4ed;
16 | right: auto;
17 | left: 50%;
18 | top: 20px;
19 | margin-left: -73px;
20 | }
21 |
22 | #nprogress .spinner:after {
23 | content: "Loading...";
24 | display: inline-block;
25 | position: absolute;
26 | top: 7px;
27 | left: 48px;
28 | }
29 |
30 | #nprogress .spinner-icon {
31 | border-top-color: #01a8fe;
32 | border-left-color: #01a8fe;
33 | }
34 |
35 | body.menu-top #nprogress .bar {
36 | height: 4px;
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/theme/overrides/overrides.scss:
--------------------------------------------------------------------------------
1 | @import "eonasdan-bootstrap-datetimepicker";
2 | @import "nprogress";
3 | @import "jquery-steps";
4 | @import "bootstrap-select";
5 | @import "dropify";
6 | @import "fullcalendar";
--------------------------------------------------------------------------------