mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
Merge branch 'slot_is_only_subscriptions' of git.sleede.com:projets/fab-manager into slot_is_only_subscriptions
This commit is contained in:
commit
870a092a81
@ -1,6 +1,6 @@
|
||||
# Changelog Fab Manager
|
||||
|
||||
- Ability to configure reservation slot restrict for plans
|
||||
- Ability to configure reservation slot restricted for plan subscribers
|
||||
- Ability to create and delete periodic calendar availabilities (recurrence)
|
||||
- Ability to fully customize the home page
|
||||
- Automated setup assistant
|
||||
|
@ -137,9 +137,9 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
|
||||
// first, we check that a user was selected
|
||||
if (Object.keys($scope.user).length > 0) {
|
||||
|
||||
// check user was selected a plan if slot is restricted for subcriptions
|
||||
// check user was selected a plan if slot is restricted for subscriptions
|
||||
const slotHasPlan = [];
|
||||
$scope.events.reserved.forEach(slot => {
|
||||
$scope.events.reserved.forEach(function (slot) {
|
||||
if (slot.plan_ids.length > 0) {
|
||||
if (
|
||||
($scope.selectedPlan && _.include(slot.plan_ids, $scope.selectedPlan.id)) ||
|
||||
@ -151,9 +151,9 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
|
||||
}
|
||||
}
|
||||
});
|
||||
const hasPlanForSlot = slotHasPlan.every(a => a);
|
||||
const hasPlanForSlot = slotHasPlan.every(function (a) { return a });
|
||||
if (!hasPlanForSlot) {
|
||||
return growl.error(_t('app.shared.cart.slot_restrict_subcriptions_must_select_plan'));
|
||||
return growl.error(_t('app.shared.cart.slot_restrict_subscriptions_must_select_plan'));
|
||||
}
|
||||
|
||||
|
||||
@ -285,9 +285,9 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
|
||||
*/
|
||||
var slotSelectionChanged = function () {
|
||||
if ($scope.slot) {
|
||||
// build a list of plans if this slot is restricted for subcriptions
|
||||
// build a list of plans if this slot is restricted for subscriptions
|
||||
if ($scope.slot.plan_ids.length > 0) {
|
||||
const _plans = _.filter($scope.plans, p => _.include($scope.slot.plan_ids, p.id));
|
||||
const _plans = _.filter($scope.plans, function (p) { return _.include($scope.slot.plan_ids, p.id) });
|
||||
$scope.slot.plansGrouped = [];
|
||||
for (let group of Array.from($scope.groups)) {
|
||||
const groupObj = { id: group.id, name: group.name, plans: [] };
|
||||
|
@ -94,7 +94,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-t-sm">
|
||||
<p class="text-center font-sbold" translate>{{ 'app.admin.calendar.restrict_this_slot_for_subcriptions_optional' }}</p>
|
||||
<p class="text-center font-sbold" translate>{{ 'app.admin.calendar.restrict_this_slot_for_subscriptions_optional' }}</p>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="is_only_subscriptions" translate>{{ 'app.admin.calendar.enabled' }}</label>
|
||||
|
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="col-xs-10 col-sm-10 col-md-8 b-l ">
|
||||
<section class="heading-title">
|
||||
<h1 translate>{{ 'app.public.plans.subcriptions' }}</h1>
|
||||
<h1 translate>{{ 'app.public.plans.subscriptions' }}</h1>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -46,7 +46,7 @@ en:
|
||||
adjust_the_opening_hours: "Adjust the opening hours"
|
||||
to_time: "to" # context: time. eg. 'from 18:00 to 21:00'
|
||||
restrict_this_slot_with_labels_optional: "Restrict this slot with labels (optional)"
|
||||
restrict_this_slot_for_subcriptions_optional: "Restrict this slot for subscription users (optional)"
|
||||
restrict_this_slot_for_subscriptions_optional: "Restrict this slot for subscription users (optional)"
|
||||
select_some_plans: "Select some plans"
|
||||
plans: "Plan(s):"
|
||||
recurrence: "Recurrence"
|
||||
|
@ -44,7 +44,7 @@ es:
|
||||
adjust_the_opening_hours: "Ajustar el horario de apertura"
|
||||
to_time: a
|
||||
restrict_this_slot_with_labels_optional: "Restringir este horario con etiquetas (opcional)"
|
||||
restrict_this_slot_for_subcriptions_optional: "Restrict this slot for subscription users (optional)"
|
||||
restrict_this_slot_for_subscriptions_optional: "Restrict this slot for subscription users (optional)"
|
||||
select_some_plans: "Select some plans"
|
||||
plans: "Plan(s):"
|
||||
recurrence: "Recurrencia"
|
||||
|
@ -46,7 +46,7 @@ fr:
|
||||
adjust_the_opening_hours: "Ajuster l'horaire"
|
||||
to_time: "à" # context: time. eg. 'from 18:00 to 21:00'
|
||||
restrict_this_slot_with_labels_optional: "Restreindre ce créneau avec des étiquettes (optionnel)"
|
||||
restrict_this_slot_for_subcriptions_optional: "Restreindre ce créneau pour les abonnements (optionnel)"
|
||||
restrict_this_slot_for_subscriptions_optional: "Restreindre ce créneau pour les abonnements (optionnel)"
|
||||
select_some_plans: "Sélectionnez des formules d'abonnement"
|
||||
plans: "Abonnement(s):"
|
||||
recurrence: "Récurrence"
|
||||
|
@ -46,7 +46,7 @@ pt:
|
||||
adjust_the_opening_hours: "Ajustar o horário de funcionamento"
|
||||
to_time: "ás" # context: time. eg. 'from 18:00 to 21:00'
|
||||
restrict_this_slot_with_labels_optional: "Restrinja este slot com etiquetas (opcional)"
|
||||
restrict_this_slot_for_subcriptions_optional: "Restrict this slot for subscription users (optional)"
|
||||
restrict_this_slot_for_subscriptions_optional: "Restrict this slot for subscription users (optional)"
|
||||
select_some_plans: "Select some plans"
|
||||
plans: "Plan(s):"
|
||||
recurrence: "Recurrence"
|
||||
|
@ -229,7 +229,7 @@ ach:
|
||||
the_training_cant_be_deleted_because_it_is_already_reserved_by_some_users: "crwdns9167:0crwdne9167:0"
|
||||
plans:
|
||||
#summary of the subscriptions
|
||||
subcriptions: "crwdns9169:0crwdne9169:0"
|
||||
subscriptions: "crwdns9169:0crwdne9169:0"
|
||||
i_choose_that_plan: "crwdns9171:0crwdne9171:0"
|
||||
i_subscribe_online: "crwdns9173:0crwdne9173:0"
|
||||
i_already_subscribed: "crwdns9175:0crwdne9175:0"
|
||||
|
@ -253,7 +253,7 @@ en:
|
||||
|
||||
plans:
|
||||
# summary of the subscriptions
|
||||
subcriptions: "Subscriptions"
|
||||
subscriptions: "Subscriptions"
|
||||
i_choose_that_plan: "I choose that plan"
|
||||
i_subscribe_online: "I subscribe online"
|
||||
i_already_subscribed: "I already subscribed"
|
||||
|
@ -229,7 +229,7 @@ es:
|
||||
the_training_cant_be_deleted_because_it_is_already_reserved_by_some_users: "El curso no puede borrarse porque ya ha sido reservado por algún usuario."
|
||||
plans:
|
||||
#summary of the subscriptions
|
||||
subcriptions: "Suscripciones"
|
||||
subscriptions: "Suscripciones"
|
||||
i_choose_that_plan: "Elijo este plan"
|
||||
i_subscribe_online: "Suscribirme online"
|
||||
i_already_subscribed: "Ya me he suscrito"
|
||||
|
@ -253,7 +253,7 @@ fr:
|
||||
|
||||
plans:
|
||||
# page récapitulative des abonnements
|
||||
subcriptions: "Les abonnements"
|
||||
subscriptions: "Les abonnements"
|
||||
i_choose_that_plan: "Je choisis cette formule"
|
||||
i_subscribe_online: "Je m'abonne en ligne"
|
||||
i_already_subscribed: "Je suis déjà abonné"
|
||||
|
@ -253,7 +253,7 @@ pt:
|
||||
|
||||
plans:
|
||||
# summary of the subscriptions
|
||||
subcriptions: "Assinaturas"
|
||||
subscriptions: "Assinaturas"
|
||||
i_choose_that_plan: "Eu escolho esse plano"
|
||||
i_subscribe_online: "Me inscrever online"
|
||||
i_already_subscribed: "Eu já estou inscrito"
|
||||
|
@ -440,4 +440,4 @@ en:
|
||||
none: "None"
|
||||
online_payment_disabled: "Online payment is not available. Please contact the Fablab reception directly."
|
||||
slot_restrict_plans: "This slot is restricted for the plans below:"
|
||||
slot_restrict_subcriptions_must_select_plan: "The slot is restricted for subscriptions, please select a plan first."
|
||||
slot_restrict_subscriptions_must_select_plan: "The slot is restricted for the subscribers. Please select a plan first."
|
||||
|
@ -417,4 +417,4 @@ es:
|
||||
none: "Ninguno"
|
||||
online_payment_disabled: "El pago en línea no está disponible. Póngase en contacto directamente con la recepción de Fablab."
|
||||
slot_restrict_plans: "This slot is restricted for the plans below:"
|
||||
slot_restrict_subcriptions_must_select_plan: "The slot is restricted for subscriptions, please select a plan first."
|
||||
slot_restrict_subscriptions_must_select_plan: "The slot is restricted for the subscribers. Please select a plan first."
|
||||
|
@ -440,4 +440,4 @@ fr:
|
||||
none: "Aucune"
|
||||
online_payment_disabled: "Le payment par carte bancaire n'est pas disponible. Merci de contacter directement l'accueil du Fablab."
|
||||
slot_restrict_plans: "Ce créneau est restreint pour les formules d'abonnement ci-desous:"
|
||||
slot_restrict_subcriptions_must_select_plan: "Le créneau est restreint pour les abonnements, Veuillez tout d'abord sélectionner un formule d'abonnement"
|
||||
slot_restrict_subscriptions_must_select_plan: "Le créneau est restreint pour les abonnés. Veuillez tout d'abord sélectionner une formule d'abonnement"
|
||||
|
@ -440,4 +440,4 @@ pt:
|
||||
none: "Vazio"
|
||||
online_payment_disabled: "O pagamento online não está disponível. Entre em contato diretamente com a recepção do Fablab."
|
||||
slot_restrict_plans: "This slot is restricted for the plans below:"
|
||||
slot_restrict_subcriptions_must_select_plan: "The slot is restricted for subscriptions, please select a plan first."
|
||||
slot_restrict_subscriptions_must_select_plan: "The slot is restricted for the subscribers. Please select a plan first."
|
||||
|
@ -15,8 +15,8 @@ ActiveRecord::Schema.define(version: 20200206132857) 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"
|
||||
|
Loading…
Reference in New Issue
Block a user