403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/calendar/roomsmanager/dist/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/calendar/roomsmanager/dist/roomsmanager.bundle.min.js
this.BX=this.BX||{};(function(t,e,o,s,a){"use strict";class i extends s.CalendarSection{constructor(t){super(t);this.updateData(t);this.calendarContext=o.Util.getCalendarContext()}updateData(t){this.data=t||{};this.type=t.CAL_TYPE||"";this.necessity=t.NECESSITY||"N";this.capacity=parseInt(t.CAPACITY)||0;this.ownerId=parseInt(t.OWNER_ID)||0;this.id=parseInt(t.ID);this.location_id=parseInt(t.LOCATION_ID);this.color=this.data.COLOR;this.name=this.data.NAME;this.categoryId=parseInt(this.data.CATEGORY_ID);this.reserved=this.data.reserved||false}belongsToView(){return true}}class n extends s.SectionManager{constructor(t,i){super(t,i);this.locationAccess=i.locationAccess||false;this.locationContext=i.locationContext||null;this.setRooms(t.rooms);this.setConfig(i);this.sortRooms();this.setSections(t.sections);this.sortSections();this.reloadRoomsFromDatabaseDebounce=e.Runtime.debounce(this.reloadRoomsFromDatabase,s.SectionManager.RELOAD_DELAY,this);if(Object.keys(o.Util.accessNames).length===0){BX.Calendar.Util.setAccessNames(i.accessNames)}a.EventEmitter.subscribeOnce("BX.Calendar.Rooms:delete",this.deleteRoomHandler.bind(this))}sortRooms(){this.roomsIndex={};this.rooms=this.rooms.sort(((t,e)=>{if(t.name.toLowerCase()>e.name.toLowerCase()){return 1}if(t.name.toLowerCase()<e.name.toLowerCase()){return-1}return 0}));this.rooms.forEach(((t,e)=>{this.roomsIndex[t.getId()]=e}))}setRooms(t=[]){this.rooms=[];this.roomsIndex={};t.forEach((t=>{let e=new i(t);this.rooms.push(e);this.roomsIndex[e.getId()]=this.rooms.length-1}))}getRooms(){return this.rooms}getRoom(t){return this.rooms[this.roomsIndex[t]]}createRoom(t){return new Promise((s=>{t.name=this.checkName(t.name);t.capacity=this.checkCapacity(t.capacity);t.necessity=t.necessity&&t.capacity!==0?"Y":"N";BX.ajax.runAction("calendar.api.locationajax.createRoom",{data:{name:t.name,capacity:t.capacity,necessity:t.necessity,ownerId:this.ownerId,color:t.color,access:t.access||null,categoryId:t.categoryId}}).then((t=>{const a=t.data.rooms||[];const i=t.data.sections||[];this.setRooms(a);this.sortRooms();this.setSections(i);this.sortSections();o.Util.getBX().Event.EventEmitter.emit("BX.Calendar.Rooms:create",new e.Event.BaseEvent({data:{roomsList:a}}));this.setLocationSelector(a);s(t.data)}),(t=>{BX.Calendar.Util.displayError(t.errors);s(t.data)}))}))}updateRoom(t){return new Promise((s=>{t.name=this.checkName(t.name);t.capacity=this.checkCapacity(t.capacity);t.necessity=t.necessity&&t.capacity!==0?"Y":"N";BX.ajax.runAction("calendar.api.locationajax.updateRoom",{data:{id:t.id,location_id:t.location_id,name:t.name,capacity:t.capacity,necessity:t.necessity,color:t.color,access:t.access||null,categoryId:t.categoryId}}).then((a=>{const i=a.data.rooms||[];const n=a.data.sections||[];this.setRooms(i);this.sortRooms();this.setSections(n);this.sortSections();this.unsetHiddenRoom(t.id);o.Util.getBX().Event.EventEmitter.emit("BX.Calendar.Rooms:update",new e.Event.BaseEvent({data:{roomsList:i}}));this.setLocationSelector(i);s(a.data)}),(t=>{BX.Calendar.Util.displayError(t.errors);s(t.data)}))}))}deleteRoom(t,s){const a=o.Util.getBX().Event;a.EventEmitter.emit("BX.Calendar.Section:delete",new a.BaseEvent({data:{sectionId:t}}));return new Promise((a=>{BX.ajax.runAction("calendar.api.locationajax.deleteRoom",{data:{id:t,location_id:s}}).then((s=>{const i=s.data.rooms||[];const n=s.data.sections||[];if(!i.length){BX.reload()}this.setRooms(i);this.sortRooms();this.setSections(n);this.sortSections();o.Util.getBX().Event.EventEmitter.emit("BX.Calendar.Rooms:delete",new e.Event.BaseEvent({data:{id:t}}));this.setLocationSelector(i);a(s.data)}),(t=>{BX.Calendar.Util.displayError(t.errors);a(t.data)}))}))}checkName(t){if(typeof t==="string"){t=t.trim();if(n.isEmpty(t)){t=e.Loc.getMessage("EC_SEC_SLIDER_NEW_ROOM")}}else{t=e.Loc.getMessage("EC_SEC_SLIDER_NEW_ROOM")}return t}checkCapacity(t){if(n.isEmpty(t)||t<=0||t>=1e4){return 0}return t}getRoomsInfo(){const t=[];const e=[];const o=[];const s=[];this.rooms.forEach((a=>{if(a.isShown()&&this.calendarType==="location"&&a.type==="location"){if(a.isSuperposed()){e.push(a.id)}else{o.push(a.id)}t.push(a.id)}else{s.push(a.id)}}));return{superposed:e,active:o,hidden:s,allActive:t}}getRoomName(t){if(n.isEmpty(t)){return null}const e=this.getRoom(t);return e.name}unsetHiddenRoom(t){if(t){const e=this.getRoom(t);if(e.calendarContext&&!e.isShown()){e.show()}}}handlePullRoomChanges(t){if(t.command==="delete_room"){const s=parseInt(t.ID,10);if(this.roomsIndex[s]){this.deleteRoomHandler(s);o.Util.getBX().Event.EventEmitter.emit("BX.Calendar.Rooms:pull-delete",new e.Event.BaseEvent({data:{roomId:s}}))}else{this.reloadRoomsFromDatabaseDebounce()}}else if(t.command==="create_room"){this.reloadRoomsFromDatabase().then(this.reloadDataDebounce());o.Util.getBX().Event.EventEmitter.emit("BX.Calendar.Rooms:pull-create");o.Util.getBX().Event.EventEmitter.emit("BX.Calendar:doRefresh")}else if(t.command==="update_room"){this.reloadRoomsFromDatabase().then(this.reloadDataDebounce());o.Util.getBX().Event.EventEmitter.emit("BX.Calendar.Rooms:pull-update");o.Util.getBX().Event.EventEmitter.emit("BX.Calendar:doRefresh")}else{this.reloadRoomsFromDatabase().then(this.reloadDataDebounce())}}deleteRoomHandler(t){if(this.roomsIndex[t]!==undefined){this.rooms.splice(this.roomsIndex[t],1);for(let t=0;t<this.rooms.length;t++){this.roomsIndex[this.rooms[t].id]=t}}if(this.sectionIndex[t]!==undefined){this.sections.splice(this.sectionIndex[t],1);for(let t=0;t<this.sections.length;t++){this.sectionIndex[this.sections[t].id]=t}}}reloadRoomsFromDatabase(){return new Promise((t=>{BX.ajax.runAction("calendar.api.locationajax.getRoomsList").then((e=>{this.setRooms(e.data.rooms||[]);this.sortRooms();BX.Calendar.Controls.Location.setLocationList(e.data.rooms);t(e.data)}),(e=>{t(e.data)}))}))}getLocationAccess(){return this.locationAccess}setLocationSelector(t){BX.Calendar.Controls.Location.setLocationList(t);if(this.locationContext!==null){this.locationContext.setValues()}}static isEmpty(t){if(e.Type.isArray(t)){return!t.length}return t===null||t===undefined||t===""||t===[]||t==={}}}t.RoomsSection=i;t.RoomsManager=n})(this.BX.Calendar=this.BX.Calendar||{},BX,BX.Calendar,BX.Calendar,BX.Event);
//# sourceMappingURL=roomsmanager.bundle.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit