ldc-supportweb/resources/views/modules/scriptConstants.blade.php
2022-08-30 09:22:03 +02:00

34 lines
1.3 KiB
PHP

<script @if(isset($nonce)) nonce="{{ $nonce }}" @endif>
if (!window.__SYSTEM) {
window.__SYSTEM = {};
}
window.__SYSTEM._locale = '{{ app()->getLocale() }}';
window.__SYSTEM._translations = @json(cache(sprintf('translations.%s', app()->getLocale())) ?? []);
window.__SYSTEM._asset = '{{ asset('') }}';
if(!window.__SYSTEM._routes) {
window.__SYSTEM._routes = {}
}
window.__SYSTEM._routes['crud-policies'] = {
upload: '{{ route('crud-policies.upload') }}'
};
window.__SYSTEM._routes.macroplanning = {
activity: "{{ route('macroplanning.activity') }}"
};
window.__SYSTEM._routes.ticket = {
index: "{{ route('ticket.index') }}",
show: "{{ route('ticket.show', ['ticket' => 'TICKET']) }}"
};
window.__SYSTEM._routes.sites = {
index: "{{ route('sites.index') }}",
show: "{{ route('sites.show', ['site' => 'SITE']) }}"
};
window.__SYSTEM._routes.projects = {
index: "{{ route('projects.index') }}",
show: "{{ route('projects.show', ['project' => 'PROJECT']) }}"
};
window.__SYSTEM._routes.schedule = {
index: "{{ route('schedule.index') }}",
setCellContent: "{{ route('schedule.setCellContent') }}",
eraseCellContent: "{{ route('schedule.eraseCellContent') }}"
};
</script>