All files / platform/modules/booking/config general.js

100% Statements 2/2
100% Branches 0/0
100% Functions 0/0
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52      1x   1x                                                                                            
'use strict';
 
/** @type {import('@adonisjs/framework/src/Env')} */
const Env = use('Env');
 
module.exports = {
  name: 'Booking',
  namespace: 'Modules/Booking',
  statuses: {
    new: 0,
    cancel: 1,
    arrived: 2,
    started: 3,
    done: 4,
  },
  maxOverlapByStaff: Math.round(Env.get('BOOKING_MAX_OVERLAP_BY_STAFF', 5)),
  notes: {
    targetSystemStatus: {
      type: 'targetSystemStatus',
      format: 'text',
    },
    canPayment: {
      type: 'canPayment',
      format: 'boolean',
    },
    changeDateReason: {
      type: 'changeDateReason',
      format: 'text',
    },
    changePriceReason: {
      type: 'changePriceReason',
      format: 'text',
    },
  },
 
  // booking status in target system (booking_notes table)
  targetSystemStatuses: {
    CANCELED_RESERVATION: 'CANCELED_RESERVATION',
    CARD_ERROR_CANCEL: 'CARD_ERROR_CANCEL',
    CHANGE_DATE_CANCEL: 'CHANGE_DATE_CANCEL',
    CONFIRMED: 'CONFIRMED',
    DECLINED_RESERVATION: 'DECLINED_RESERVATION',
    DONE: 'DONE',
    NAILIE_CANCELED: 'NAILIE_CANCELED',
    NAILIST_CANCELED: 'NAILIST_CANCELED',
    NOVISIT: 'NOVISIT',
    PERMANENT_DELETED: 'PERMANENT_DELETED',
    UNDONE: 'UNDONE',
    WAITING_DONE: 'WAITING_DONE',
  },
};