mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
disable a plan
This commit is contained in:
parent
25eb24e516
commit
26d79e5b12
@ -477,6 +477,14 @@ Application.Controllers.controller "EditMemberController", ["$scope", "$state",
|
||||
|
||||
|
||||
|
||||
##
|
||||
# To use as callback in Array.prototype.filter to get only enabled plans
|
||||
##
|
||||
$scope.filterDisabledPlans = (plan) ->
|
||||
!plan.disabled
|
||||
|
||||
|
||||
|
||||
### PRIVATE SCOPE ###
|
||||
|
||||
|
||||
|
@ -175,6 +175,7 @@ Application.Controllers.controller 'EditPlanController', ['$scope', 'groups', 'p
|
||||
## edited plan data
|
||||
$scope.plan = planPromise
|
||||
$scope.plan.type = "Plan" if $scope.plan.type == null
|
||||
$scope.plan.disabled = 'true' if $scope.plan.disabled
|
||||
|
||||
## API URL where the form will be posted
|
||||
$scope.actionUrl = "/api/plans/" + $stateParams.id
|
||||
|
@ -527,6 +527,14 @@ Application.Controllers.controller "ReserveMachineController", ["$scope", '$stat
|
||||
|
||||
|
||||
|
||||
##
|
||||
# To use as callback in Array.prototype.filter to get only enabled plans
|
||||
##
|
||||
$scope.filterDisabledPlans = (plan) ->
|
||||
!plan.disabled
|
||||
|
||||
|
||||
|
||||
### PRIVATE SCOPE ###
|
||||
|
||||
##
|
||||
|
@ -148,6 +148,14 @@ Application.Controllers.controller "PlansIndexController", ["$scope", "$rootScop
|
||||
|
||||
|
||||
|
||||
##
|
||||
# To use as callback in Array.prototype.filter to get only enabled plans
|
||||
##
|
||||
$scope.filterDisabledPlans = (plan) ->
|
||||
!plan.disabled
|
||||
|
||||
|
||||
|
||||
### PRIVATE SCOPE ###
|
||||
|
||||
##
|
||||
|
@ -438,6 +438,14 @@ Application.Controllers.controller "ReserveSpaceController", ["$scope", '$stateP
|
||||
|
||||
|
||||
|
||||
##
|
||||
# To use as callback in Array.prototype.filter to get only enabled plans
|
||||
##
|
||||
$scope.filterDisabledPlans = (plan) ->
|
||||
!plan.disabled
|
||||
|
||||
|
||||
|
||||
### PRIVATE SCOPE ###
|
||||
|
||||
##
|
||||
|
@ -338,6 +338,14 @@ Application.Controllers.controller "ReserveTrainingController", ["$scope", '$sta
|
||||
|
||||
|
||||
|
||||
##
|
||||
# To use as callback in Array.prototype.filter to get only enabled plans
|
||||
##
|
||||
$scope.filterDisabledPlans = (plan) ->
|
||||
!plan.disabled
|
||||
|
||||
|
||||
|
||||
### PRIVATE SCOPE ###
|
||||
|
||||
##
|
||||
|
@ -625,3 +625,15 @@ body.container{
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.disabled-line {
|
||||
color: $gray;
|
||||
background-color: $gray-lighter;
|
||||
|
||||
& td:first-child:before {
|
||||
font-family: 'fontawesome' !important;
|
||||
content: '\f023';
|
||||
position: absolute;
|
||||
left: -4px;
|
||||
}
|
||||
}
|
@ -85,7 +85,7 @@
|
||||
<p translate>
|
||||
{{ 'user_has_no_current_subscription' }}
|
||||
</p>
|
||||
<button class="btn btn-default" ng-click="createSubscriptionModal(user, plans)" translate>{{ 'subscribe_to_a_plan' }}</button>
|
||||
<button class="btn btn-default" ng-click="createSubscriptionModal(user, plans.filter(filterDisabledPlans))" translate>{{ 'subscribe_to_a_plan' }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -30,6 +30,21 @@
|
||||
|
||||
<ng-include src="'<%= asset_path 'admin/plans/_form.html' %>'"></ng-include>
|
||||
|
||||
<div class="input-group m-t-md">
|
||||
<label for="plan[disabled]" class="control-label m-r-md">{{ 'plan_form.disabled' | translate }}</label>
|
||||
<input bs-switch
|
||||
ng-model="plan.disabled"
|
||||
id="plan[disabled]"
|
||||
type="checkbox"
|
||||
class="form-control"
|
||||
switch-on-text="{{ 'yes' | translate }}"
|
||||
switch-off-text="{{ 'no' | translate }}"
|
||||
switch-animate="true"
|
||||
ng-true-value="'true'"
|
||||
ng-false-value="'false'"/>
|
||||
<input type="hidden" name="plan[disabled]" value="{{plan.disabled}}"/>
|
||||
</div>
|
||||
|
||||
<h2 class="m-t-xl" translate>{{ 'edit_plan.prices' }}</h2>
|
||||
<div class="form-group col-md-6 col-lg-offset-6">
|
||||
<input type="hidden" ng-model="plan.parent" name="plan[parent_id]" ng-value="plan.parent"/>
|
||||
|
@ -20,7 +20,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="plan in plans | orderBy:orderPlans">
|
||||
<tr ng-repeat="plan in plans | orderBy:orderPlans" ng-class="{'disabled-line' : plan.disabled}">
|
||||
<td>{{getPlanType(plan.type)}}</td>
|
||||
<td>{{plan.base_name}}</td>
|
||||
<td>{{ plan.interval | planIntervalFilter:plan.interval_count }}</td>
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
<!-- ng-class directive center the last item if the list length is odd -->
|
||||
<div class="pricing-panel col-xs-6 col-md-6 col-lg-6 text-center"
|
||||
ng-class="{'col-md-12 col-lg-12':(plansGroup.plans.length % 2 == 1 && key == plansGroup.plans.length-1)}"
|
||||
ng-repeat="(key, plan) in plansGroup.plans | orderBy:'interval'">
|
||||
ng-class="{'col-md-12 col-lg-12':(plansGroup.plans.filter(filterDisabledPlans).length % 2 == 1 && key == plansGroup.plans.filter(filterDisabledPlans).length-1)}"
|
||||
ng-repeat="(key, plan) in plansGroup.plans.filter(filterDisabledPlans) | orderBy:'interval'">
|
||||
|
||||
<h3 class="title">{{ plan.base_name }}</h3>
|
||||
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
<!-- ng-class directive center the last item if the list length is odd -->
|
||||
<div class="pricing-panel col-xs-12 col-md-6 col-lg-6 text-center"
|
||||
ng-class="{'col-md-12 col-lg-12 b-r':(plansGroup.plans.length % 2 == 1 && key == plansGroup.plans.length-1)}"
|
||||
ng-repeat="(key, plan) in plansGroup.plans | orderBy: '-ui_weight'">
|
||||
ng-class="{'col-md-12 col-lg-12 b-r':(plansGroup.plans.filter(filterDisabledPlans).length % 2 == 1 && key == plansGroup.plans.filter(filterDisabledPlans).length-1)}"
|
||||
ng-repeat="(key, plan) in plansGroup.plans.filter(filterDisabledPlans) | orderBy: '-ui_weight'">
|
||||
|
||||
<h3 class="title">{{ plan.base_name }}</h3>
|
||||
|
||||
|
@ -87,8 +87,7 @@
|
||||
end if @parameters[:plan][:prices_attributes]
|
||||
|
||||
@parameters = @parameters.require(:plan).permit(:base_name, :type, :group_id, :amount, :interval, :interval_count, :is_rolling,
|
||||
:training_credit_nb,
|
||||
:ui_weight,
|
||||
:training_credit_nb, :ui_weight, :disabled,
|
||||
plan_file_attributes: [:id, :attachment, :_destroy],
|
||||
prices_attributes: [:id, :amount]
|
||||
)
|
||||
|
@ -1,4 +1,4 @@
|
||||
json.extract! plan, :id, :base_name, :name, :interval, :interval_count, :group_id, :training_credit_nb, :is_rolling, :description, :type, :ui_weight
|
||||
json.extract! plan, :id, :base_name, :name, :interval, :interval_count, :group_id, :training_credit_nb, :is_rolling, :description, :type, :ui_weight, :disabled
|
||||
json.amount (plan.amount / 100.00)
|
||||
json.prices plan.prices, partial: 'api/prices/price', as: :price
|
||||
json.plan_file_attributes do
|
||||
|
@ -1,5 +1,5 @@
|
||||
json.array!(@plans) do |plan|
|
||||
json.extract! plan, :id, :base_name, :name, :interval, :interval_count, :group_id, :training_credit_nb, :description, :type, :ui_weight
|
||||
json.extract! plan, :id, :base_name, :name, :interval, :interval_count, :group_id, :training_credit_nb, :description, :type, :ui_weight, :disabled
|
||||
json.amount (plan.amount / 100.00)
|
||||
json.plan_file_url plan.plan_file.attachment_url if plan.plan_file
|
||||
end
|
||||
|
@ -7,5 +7,6 @@ json.array!(@plans) do |plan|
|
||||
json.interval plan.interval
|
||||
json.interval_count plan.interval_count
|
||||
json.type plan.type
|
||||
json.disabled plan.disabled
|
||||
json.plan_file_url plan.plan_file.attachment_url if plan.plan_file
|
||||
end
|
||||
|
@ -230,6 +230,7 @@ en:
|
||||
as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user: "As part of a partner subscription, some notifications may be sent to this user."
|
||||
new_partner: "New partner"
|
||||
email_address_is_required: "Email address is required."
|
||||
disabled: "Disable subscription"
|
||||
|
||||
trainings:
|
||||
# training edition form
|
||||
|
@ -230,6 +230,7 @@ fr:
|
||||
as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user: "Dans le cadre d'un abonnement partenaire, certaines notifications pourront être adressées à cet utilisateur."
|
||||
new_partner: "Nouveau partenaire"
|
||||
email_address_is_required: "L'adresse e-mail est requise."
|
||||
disabled: "Désactiver l'abonnement"
|
||||
|
||||
trainings:
|
||||
# formulaire d'édition d'une formation
|
||||
|
@ -230,6 +230,7 @@ pt:
|
||||
as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user: "Como parte da inscrição do parceiro, algumas notificações podem ser enviadas para este usuário."
|
||||
new_partner: "Novo parceiro"
|
||||
email_address_is_required: "Email é obrigatório."
|
||||
disabled: "Disable subscrição"
|
||||
|
||||
trainings:
|
||||
# training edition form
|
||||
|
5
db/migrate/20171004135605_add_disabled_to_plan.rb
Normal file
5
db/migrate/20171004135605_add_disabled_to_plan.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class AddDisabledToPlan < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :plans, :disabled, :boolean
|
||||
end
|
||||
end
|
147
db/schema.rb
147
db/schema.rb
@ -11,12 +11,12 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
ActiveRecord::Schema.define(version: 20171004135605) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
enable_extension "unaccent"
|
||||
enable_extension "pg_trgm"
|
||||
enable_extension "unaccent"
|
||||
|
||||
create_table "abuses", force: :cascade do |t|
|
||||
t.integer "signaled_id"
|
||||
@ -32,14 +32,14 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "abuses", ["signaled_type", "signaled_id"], name: "index_abuses_on_signaled_type_and_signaled_id", using: :btree
|
||||
|
||||
create_table "addresses", force: :cascade do |t|
|
||||
t.string "address"
|
||||
t.string "street_number"
|
||||
t.string "route"
|
||||
t.string "locality"
|
||||
t.string "country"
|
||||
t.string "postal_code"
|
||||
t.string "address", limit: 255
|
||||
t.string "street_number", limit: 255
|
||||
t.string "route", limit: 255
|
||||
t.string "locality", limit: 255
|
||||
t.string "country", limit: 255
|
||||
t.string "postal_code", limit: 255
|
||||
t.integer "placeable_id"
|
||||
t.string "placeable_type"
|
||||
t.string "placeable_type", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
@ -55,9 +55,9 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
|
||||
create_table "assets", force: :cascade do |t|
|
||||
t.integer "viewable_id"
|
||||
t.string "viewable_type"
|
||||
t.string "attachment"
|
||||
t.string "type"
|
||||
t.string "viewable_type", limit: 255
|
||||
t.string "attachment", limit: 255
|
||||
t.string "type", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
@ -74,7 +74,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
create_table "availabilities", force: :cascade do |t|
|
||||
t.datetime "start_at"
|
||||
t.datetime "end_at"
|
||||
t.string "available_type"
|
||||
t.string "available_type", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "nb_total_places"
|
||||
@ -93,7 +93,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "availability_tags", ["tag_id"], name: "index_availability_tags_on_tag_id", using: :btree
|
||||
|
||||
create_table "categories", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "slug"
|
||||
@ -102,7 +102,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "categories", ["slug"], name: "index_categories_on_slug", unique: true, using: :btree
|
||||
|
||||
create_table "components", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "name", limit: 255, null: false
|
||||
end
|
||||
|
||||
create_table "coupons", force: :cascade do |t|
|
||||
@ -120,7 +120,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
|
||||
create_table "credits", force: :cascade do |t|
|
||||
t.integer "creditable_id"
|
||||
t.string "creditable_type"
|
||||
t.string "creditable_type", limit: 255
|
||||
t.integer "plan_id"
|
||||
t.integer "hours"
|
||||
t.datetime "created_at"
|
||||
@ -161,7 +161,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "event_themes", ["slug"], name: "index_event_themes_on_slug", unique: true, using: :btree
|
||||
|
||||
create_table "events", force: :cascade do |t|
|
||||
t.string "title"
|
||||
t.string "title", limit: 255
|
||||
t.text "description"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
@ -199,10 +199,10 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "exports", ["user_id"], name: "index_exports_on_user_id", using: :btree
|
||||
|
||||
create_table "friendly_id_slugs", force: :cascade do |t|
|
||||
t.string "slug", null: false
|
||||
t.string "slug", limit: 255, null: false
|
||||
t.integer "sluggable_id", null: false
|
||||
t.string "sluggable_type", limit: 50
|
||||
t.string "scope"
|
||||
t.string "scope", limit: 255
|
||||
t.datetime "created_at"
|
||||
end
|
||||
|
||||
@ -212,17 +212,17 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type", using: :btree
|
||||
|
||||
create_table "groups", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "slug"
|
||||
t.string "slug", limit: 255
|
||||
end
|
||||
|
||||
add_index "groups", ["slug"], name: "index_groups_on_slug", unique: true, using: :btree
|
||||
|
||||
create_table "invoice_items", force: :cascade do |t|
|
||||
t.integer "invoice_id"
|
||||
t.string "stp_invoice_item_id"
|
||||
t.string "stp_invoice_item_id", limit: 255
|
||||
t.integer "amount"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
@ -235,17 +235,17 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
|
||||
create_table "invoices", force: :cascade do |t|
|
||||
t.integer "invoiced_id"
|
||||
t.string "invoiced_type"
|
||||
t.string "stp_invoice_id"
|
||||
t.string "invoiced_type", limit: 255
|
||||
t.string "stp_invoice_id", limit: 255
|
||||
t.integer "total"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "user_id"
|
||||
t.string "reference"
|
||||
t.string "avoir_mode"
|
||||
t.string "reference", limit: 255
|
||||
t.string "avoir_mode", limit: 255
|
||||
t.datetime "avoir_date"
|
||||
t.integer "invoice_id"
|
||||
t.string "type"
|
||||
t.string "type", limit: 255
|
||||
t.boolean "subscription_to_expire"
|
||||
t.text "description"
|
||||
t.integer "wallet_amount"
|
||||
@ -259,17 +259,17 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "invoices", ["wallet_transaction_id"], name: "index_invoices_on_wallet_transaction_id", using: :btree
|
||||
|
||||
create_table "licences", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "name", limit: 255, null: false
|
||||
t.text "description"
|
||||
end
|
||||
|
||||
create_table "machines", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "name", limit: 255, null: false
|
||||
t.text "description"
|
||||
t.text "spec"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "slug"
|
||||
t.string "slug", limit: 255
|
||||
end
|
||||
|
||||
add_index "machines", ["slug"], name: "index_machines_on_slug", unique: true, using: :btree
|
||||
@ -285,7 +285,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
create_table "notifications", force: :cascade do |t|
|
||||
t.integer "receiver_id"
|
||||
t.integer "attached_object_id"
|
||||
t.string "attached_object_type"
|
||||
t.string "attached_object_type", limit: 255
|
||||
t.integer "notification_type_id"
|
||||
t.boolean "is_read", default: false
|
||||
t.datetime "created_at"
|
||||
@ -361,11 +361,11 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "organizations", ["profile_id"], name: "index_organizations_on_profile_id", using: :btree
|
||||
|
||||
create_table "plans", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.integer "amount"
|
||||
t.string "interval"
|
||||
t.string "interval", limit: 255
|
||||
t.integer "group_id"
|
||||
t.string "stp_plan_id"
|
||||
t.string "stp_plan_id", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "training_credit_nb", default: 0
|
||||
@ -376,6 +376,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
t.integer "ui_weight", default: 0
|
||||
t.integer "interval_count", default: 1
|
||||
t.string "slug"
|
||||
t.boolean "disabled"
|
||||
end
|
||||
|
||||
add_index "plans", ["group_id"], name: "index_plans_on_group_id", using: :btree
|
||||
@ -403,11 +404,11 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
|
||||
create_table "profiles", force: :cascade do |t|
|
||||
t.integer "user_id"
|
||||
t.string "first_name"
|
||||
t.string "last_name"
|
||||
t.string "first_name", limit: 255
|
||||
t.string "last_name", limit: 255
|
||||
t.boolean "gender"
|
||||
t.date "birthday"
|
||||
t.string "phone"
|
||||
t.string "phone", limit: 255
|
||||
t.text "interest"
|
||||
t.text "software_mastered"
|
||||
t.datetime "created_at"
|
||||
@ -437,7 +438,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
t.integer "project_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "title"
|
||||
t.string "title", limit: 255
|
||||
t.integer "step_nb"
|
||||
end
|
||||
|
||||
@ -449,26 +450,26 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "is_valid", default: false
|
||||
t.string "valid_token"
|
||||
t.string "valid_token", limit: 255
|
||||
end
|
||||
|
||||
add_index "project_users", ["project_id"], name: "index_project_users_on_project_id", using: :btree
|
||||
add_index "project_users", ["user_id"], name: "index_project_users_on_user_id", using: :btree
|
||||
|
||||
create_table "projects", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.text "description"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "author_id"
|
||||
t.text "tags"
|
||||
t.integer "licence_id"
|
||||
t.string "state"
|
||||
t.string "slug"
|
||||
t.string "state", limit: 255
|
||||
t.string "slug", limit: 255
|
||||
t.datetime "published_at"
|
||||
end
|
||||
|
||||
add_index "projects", ["slug"], name: "index_projects_on_slug", unique: true, using: :btree
|
||||
add_index "projects", ["slug"], name: "index_projects_on_slug", using: :btree
|
||||
|
||||
create_table "projects_components", force: :cascade do |t|
|
||||
t.integer "project_id"
|
||||
@ -508,19 +509,19 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "reservable_id"
|
||||
t.string "reservable_type"
|
||||
t.string "stp_invoice_id"
|
||||
t.string "reservable_type", limit: 255
|
||||
t.string "stp_invoice_id", limit: 255
|
||||
t.integer "nb_reserve_places"
|
||||
end
|
||||
|
||||
add_index "reservations", ["reservable_type", "reservable_id"], name: "index_reservations_on_reservable_type_and_reservable_id", using: :btree
|
||||
add_index "reservations", ["reservable_id", "reservable_type"], name: "index_reservations_on_reservable_id_and_reservable_type", using: :btree
|
||||
add_index "reservations", ["stp_invoice_id"], name: "index_reservations_on_stp_invoice_id", using: :btree
|
||||
add_index "reservations", ["user_id"], name: "index_reservations_on_user_id", using: :btree
|
||||
|
||||
create_table "roles", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.integer "resource_id"
|
||||
t.string "resource_type"
|
||||
t.string "resource_type", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
@ -594,18 +595,18 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
|
||||
create_table "statistic_fields", force: :cascade do |t|
|
||||
t.integer "statistic_index_id"
|
||||
t.string "key"
|
||||
t.string "label"
|
||||
t.string "key", limit: 255
|
||||
t.string "label", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "data_type"
|
||||
t.string "data_type", limit: 255
|
||||
end
|
||||
|
||||
add_index "statistic_fields", ["statistic_index_id"], name: "index_statistic_fields_on_statistic_index_id", using: :btree
|
||||
|
||||
create_table "statistic_graphs", force: :cascade do |t|
|
||||
t.integer "statistic_index_id"
|
||||
t.string "chart_type"
|
||||
t.string "chart_type", limit: 255
|
||||
t.integer "limit"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
@ -614,8 +615,8 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "statistic_graphs", ["statistic_index_id"], name: "index_statistic_graphs_on_statistic_index_id", using: :btree
|
||||
|
||||
create_table "statistic_indices", force: :cascade do |t|
|
||||
t.string "es_type_key"
|
||||
t.string "label"
|
||||
t.string "es_type_key", limit: 255
|
||||
t.string "label", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "table", default: true
|
||||
@ -623,8 +624,8 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
end
|
||||
|
||||
create_table "statistic_sub_types", force: :cascade do |t|
|
||||
t.string "key"
|
||||
t.string "label"
|
||||
t.string "key", limit: 255
|
||||
t.string "label", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
@ -641,8 +642,8 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
|
||||
create_table "statistic_types", force: :cascade do |t|
|
||||
t.integer "statistic_index_id"
|
||||
t.string "key"
|
||||
t.string "label"
|
||||
t.string "key", limit: 255
|
||||
t.string "label", limit: 255
|
||||
t.boolean "graph"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
@ -660,7 +661,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
create_table "subscriptions", force: :cascade do |t|
|
||||
t.integer "plan_id"
|
||||
t.integer "user_id"
|
||||
t.string "stp_subscription_id"
|
||||
t.string "stp_subscription_id", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.datetime "expired_at"
|
||||
@ -679,7 +680,7 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
|
||||
|
||||
create_table "themes", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "name", limit: 255, null: false
|
||||
end
|
||||
|
||||
create_table "tickets", force: :cascade do |t|
|
||||
@ -694,11 +695,11 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "tickets", ["reservation_id"], name: "index_tickets_on_reservation_id", using: :btree
|
||||
|
||||
create_table "trainings", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "name", limit: 255
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "nb_total_places"
|
||||
t.string "slug"
|
||||
t.string "slug", limit: 255
|
||||
t.text "description"
|
||||
t.boolean "public_page", default: true
|
||||
end
|
||||
@ -755,30 +756,30 @@ ActiveRecord::Schema.define(version: 20170906100906) do
|
||||
add_index "user_trainings", ["user_id"], name: "index_user_trainings_on_user_id", using: :btree
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.string "email", default: "", null: false
|
||||
t.string "encrypted_password", default: "", null: false
|
||||
t.string "reset_password_token"
|
||||
t.string "email", limit: 255, default: "", null: false
|
||||
t.string "encrypted_password", limit: 255, default: "", null: false
|
||||
t.string "reset_password_token", limit: 255
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.datetime "remember_created_at"
|
||||
t.integer "sign_in_count", default: 0, null: false
|
||||
t.datetime "current_sign_in_at"
|
||||
t.datetime "last_sign_in_at"
|
||||
t.string "current_sign_in_ip"
|
||||
t.string "last_sign_in_ip"
|
||||
t.string "confirmation_token"
|
||||
t.string "current_sign_in_ip", limit: 255
|
||||
t.string "last_sign_in_ip", limit: 255
|
||||
t.string "confirmation_token", limit: 255
|
||||
t.datetime "confirmed_at"
|
||||
t.datetime "confirmation_sent_at"
|
||||
t.string "unconfirmed_email"
|
||||
t.string "unconfirmed_email", limit: 255
|
||||
t.integer "failed_attempts", default: 0, null: false
|
||||
t.string "unlock_token"
|
||||
t.string "unlock_token", limit: 255
|
||||
t.datetime "locked_at"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "is_allow_contact", default: true
|
||||
t.integer "group_id"
|
||||
t.string "stp_customer_id"
|
||||
t.string "username"
|
||||
t.string "slug"
|
||||
t.string "stp_customer_id", limit: 255
|
||||
t.string "username", limit: 255
|
||||
t.string "slug", limit: 255
|
||||
t.boolean "is_active", default: true
|
||||
t.boolean "invoicing_disabled", default: false
|
||||
t.string "provider"
|
||||
|
Loading…
x
Reference in New Issue
Block a user