82 lines
1.9 KiB
PHP
82 lines
1.9 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>
|
|
@hasSection('page_title')
|
|
@yield('page_title') -
|
|
@endif
|
|
@if (isset($titulo))
|
|
{{$titulo}} -
|
|
@endif
|
|
Incoviba S. A.</title>
|
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.7.8/semantic.min.css" />
|
|
<link rel="stylesheet" type="text/css" href="{{$urls->styles}}/app.css" />
|
|
<link rel="stylesheet" type="text/css" href="{{$urls->styles}}/custom.css" />
|
|
<link rel="icon" type="image/png" href="{{$urls->images}}/Isotipo 32.png" />
|
|
|
|
@stack('styles')
|
|
</head>
|
|
<body>
|
|
@include('layout.header')
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
@yield('content')
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@include('layout.footer')
|
|
<script type="text/javascript" src="{{$urls->scripts}}/app.js"></script>
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.7.8/semantic.min.js"></script>
|
|
<script type="text/javascript">
|
|
const API_KEY = '{{$api_key}}'
|
|
const _urls = {
|
|
base: '{{$urls->base}}',
|
|
api: 'http://localhost:8081'
|
|
}
|
|
function buildAjax(uri, method, files=false) {
|
|
const url = _urls.api + uri
|
|
if (files) {
|
|
return {
|
|
url,
|
|
headers: {
|
|
'Authorization': 'Bearer ' + API_KEY
|
|
},
|
|
method,
|
|
processData: false,
|
|
contentType: false
|
|
}
|
|
}
|
|
return {
|
|
url,
|
|
headers: {
|
|
'Authorization': 'Bearer ' + API_KEY
|
|
},
|
|
method,
|
|
dataType: 'json'
|
|
}
|
|
}
|
|
function sendGet(uri) {
|
|
let ajax_obj = buildAjax(uri, 'GET')
|
|
return $.ajax(ajax_obj)
|
|
}
|
|
function sendPost(uri, data, files=false) {
|
|
let ajax_obj = buildAjax(uri, 'POST', files)
|
|
ajax_obj['data'] = data
|
|
return $.ajax(ajax_obj)
|
|
}
|
|
function sendPut(uri, data) {
|
|
let ajax_obj = buildAjax(uri, 'PUT')
|
|
ajax_obj['data'] = data
|
|
return $.ajax(ajax_obj)
|
|
}
|
|
function sendDelete(uri) {
|
|
let ajax_obj = buildAjax(uri, 'DELETE')
|
|
return $.ajax(ajax_obj)
|
|
}
|
|
</script>
|
|
@stack('scripts')
|
|
</body>
|
|
</html>
|