31 lines
824 B
JavaScript
31 lines
824 B
JavaScript
/**
|
|
* PropertyStatus Enum
|
|
* Backend values are numeric (0, 1, 2)
|
|
* Used in: PropertyInformation.status
|
|
*/
|
|
const PropertyStatus = Object.freeze({
|
|
AVAILABLE: 0,
|
|
NOT_AVAILABLE: 1,
|
|
BOOKED: 2,
|
|
});
|
|
|
|
const PropertyStatusLabels = Object.freeze({
|
|
[PropertyStatus.AVAILABLE]: 'متاح',
|
|
[PropertyStatus.NOT_AVAILABLE]: 'غير متاح',
|
|
[PropertyStatus.BOOKED]: 'محجوز',
|
|
});
|
|
|
|
const PropertyStatusKeys = Object.freeze({
|
|
[PropertyStatus.AVAILABLE]: 'available',
|
|
[PropertyStatus.NOT_AVAILABLE]: 'notAvailable',
|
|
[PropertyStatus.BOOKED]: 'booked',
|
|
});
|
|
|
|
const PropertyStatusByKey = Object.freeze({
|
|
available: PropertyStatus.AVAILABLE,
|
|
notAvailable: PropertyStatus.NOT_AVAILABLE,
|
|
booked: PropertyStatus.BOOKED,
|
|
});
|
|
|
|
export { PropertyStatus, PropertyStatusLabels, PropertyStatusKeys, PropertyStatusByKey };
|