├── public
├── favicon.ico
├── app
├── robots.txt
├── assets
│ ├── img
│ │ ├── favicon.ico
│ │ ├── loading.gif
│ │ ├── odontogram.jpg
│ │ └── profile_photo.jpg
│ ├── fonts
│ │ ├── Ubuntu.ttf
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.ttf
│ │ ├── glyphicons-halflings-regular.woff
│ │ ├── glyphicons-halflings-regular.woff2
│ │ ├── ubuntu-normal_47e00ddc85b6f98db1ca671885f51a0f.ttf
│ │ ├── fontawesome-normal_dd8072b6608ca7d01cd87acd38d44ae9.ttf
│ │ └── glyphicons-halflings-normal_5c47b9dbd6fea3143381cb1ce1818161.ttf
│ ├── images
│ │ ├── favicon.ico
│ │ ├── sort_asc.png
│ │ ├── sort_both.png
│ │ ├── sort_desc.png
│ │ ├── Sorting icons.psd
│ │ ├── back_disabled.png
│ │ ├── back_enabled.png
│ │ ├── forward_disabled.png
│ │ ├── forward_enabled.png
│ │ ├── back_enabled_hover.png
│ │ ├── sort_asc_disabled.png
│ │ ├── sort_desc_disabled.png
│ │ └── forward_enabled_hover.png
│ ├── css
│ │ └── images
│ │ │ ├── border.png
│ │ │ ├── loading.gif
│ │ │ ├── overlay.png
│ │ │ ├── controls.png
│ │ │ └── loading_background.png
│ ├── font-awe
│ │ └── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ └── fontawesome-webfont.woff2
│ ├── js
│ │ ├── calcula.js
│ │ ├── confirmDelete.js
│ │ ├── colorbox
│ │ │ └── jquery.colorbox-es.js
│ │ ├── serializeobject.min.js
│ │ ├── forgetChanges.js
│ │ └── modernizr.js
│ └── datetimepicker
│ │ ├── timepicker1.js
│ │ ├── datepicker1.js
│ │ └── datepicker2.js
├── .htaccess
├── web.config
└── index.php
├── app
├── Listeners
│ ├── .gitkeep
│ └── LogSuccessfulLogin.php
├── Policies
│ └── .gitkeep
├── Events
│ └── Event.php
├── Http
│ ├── Controllers
│ │ ├── Exceptions
│ │ │ ├── NoQueryResultException.php
│ │ │ └── NoAppointmentsFoundException.php
│ │ ├── Invoices
│ │ │ ├── InvoiceInterface.php
│ │ │ ├── Complete.php
│ │ │ └── Rectification.php
│ │ ├── Controller.php
│ │ ├── Interfaces
│ │ │ └── BaseInterface.php
│ │ ├── AccountingController.php
│ │ ├── SettingsController.php
│ │ ├── Traits
│ │ │ ├── DirTrait.php
│ │ │ └── DefaultTrait.php
│ │ ├── Libs
│ │ │ └── PdfLib.php
│ │ └── Auth
│ │ │ └── LoginController.php
│ ├── Requests
│ │ └── Request.php
│ ├── Middleware
│ │ ├── VerifyCsrfToken.php
│ │ ├── EncryptCookies.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── NormalMiddleware.php
│ │ ├── AdminMiddleware.php
│ │ └── Authenticate.php
│ └── Kernel.php
├── Models
│ ├── GetTableNameTrait.php
│ ├── Record.php
│ ├── BudgetsText.php
│ ├── InvoiceLines.php
│ ├── StaffWorks.php
│ ├── BaseModel.php
│ ├── Files.php
│ ├── StaffPositions.php
│ ├── User.php
│ ├── StaffPositionsEntries.php
│ └── Settings.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── Jobs
│ └── Job.php
├── Console
│ ├── Commands
│ │ └── Inspire.php
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
└── functions
│ └── other.php
├── database
├── seeds
│ ├── .gitkeep
│ ├── DatabaseSeeder.php
│ ├── StaffSeeder.php
│ ├── PatientsSeeder.php
│ ├── StaffPositionsSeeder.php
│ ├── AppointmentsSeeder.php
│ ├── StaffPositionsEntriesSeeder.php
│ ├── BudgetsSeeder.php
│ ├── TreatmentsSeeder.php
│ └── servicesSeeder.php
├── migrations
│ ├── .gitkeep
│ ├── 2016_02_06_195907_create_services_table.php
│ ├── 2016_01_06_042652_create_users_table.php
│ ├── 2016_07_11_152617_create_budgets_text_table.php
│ ├── 2017_04_08_170329_create_settings_table.php
│ ├── 2018_05_16_154555_create_files_table.php
│ ├── 2016_01_25_214921_create_staff_positions_table.php
│ ├── 2016_06_10_185632_create_record_table.php
│ ├── 2016_02_24_214858_create_appointments_table.php
│ ├── 2016_01_24_214921_create_staff_table.php
│ ├── 2017_12_10_164935_create_staff_works_table.php
│ ├── 2016_01_11_215004_create_patients_table.php
│ ├── 2016_02_24_215018_create_budgets_table.php
│ ├── 2016_02_25_215040_create_treatments_table.php
│ ├── 2018_11_04_034030_create_staff_positions_entries_table.php
│ ├── 2020_04_25_203957_create_invoice_lines_table.php
│ └── 2020_04_25_203926_create_invoices_table.php
├── .gitignore
└── factories
│ └── ModelFactory.php
├── tests
├── _data
│ └── .gitkeep
├── _output
│ └── .gitignore
├── _support
│ ├── _generated
│ │ └── .gitignore
│ ├── Helper
│ │ ├── Unit.php
│ │ ├── Acceptance.php
│ │ └── Functional.php
│ ├── UnitTester.php
│ ├── AcceptanceTester.php
│ └── FunctionalTester.php
├── unit.suite.yml
├── acceptance
│ └── PatientsTestCest.php
├── functional.suite.yml
├── acceptance.suite.yml
├── ExampleTest.php
└── TestCase.php
├── resources
├── views
│ ├── vendor
│ │ └── .gitkeep
│ ├── form_fields
│ │ ├── fields
│ │ │ ├── closeform.blade.php
│ │ │ ├── closediv.blade.php
│ │ │ ├── opendiv.blade.php
│ │ │ ├── issue_date.blade.php
│ │ │ ├── password.blade.php
│ │ │ ├── notes.blade.php
│ │ │ ├── paid.blade.php
│ │ │ ├── price.blade.php
│ │ │ ├── tel1.blade.php
│ │ │ ├── tel3.blade.php
│ │ │ ├── city.blade.php
│ │ │ ├── tel2.blade.php
│ │ │ ├── openform.blade.php
│ │ │ ├── address.blade.php
│ │ │ ├── dni.blade.php
│ │ │ ├── units.blade.php
│ │ │ ├── name.blade.php
│ │ │ ├── surname.blade.php
│ │ │ ├── birth.blade.php
│ │ │ ├── sex.blade.php
│ │ │ ├── full_name.blade.php
│ │ │ ├── hour.blade.php
│ │ │ ├── day.blade.php
│ │ │ ├── tax.blade.php
│ │ │ ├── pricetax.blade.php
│ │ │ ├── scopes.blade.php
│ │ │ ├── user.blade.php
│ │ │ ├── position.blade.php
│ │ │ ├── staff.blade.php
│ │ │ └── upload_photo.blade.php
│ │ ├── show
│ │ │ ├── profile_photo.blade.php
│ │ │ ├── dni.blade.php
│ │ │ ├── notes.blade.php
│ │ │ ├── name.blade.php
│ │ │ ├── age.blade.php
│ │ │ ├── birth.blade.php
│ │ │ ├── sex.blade.php
│ │ │ ├── city.blade.php
│ │ │ ├── tel1.blade.php
│ │ │ ├── tel2.blade.php
│ │ │ ├── tel3.blade.php
│ │ │ ├── address.blade.php
│ │ │ ├── position.blade.php
│ │ │ ├── search.blade.php
│ │ │ └── file.blade.php
│ │ └── save.blade.php
│ ├── staff
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ ├── file.blade.php
│ │ └── common.blade.php
│ ├── company
│ │ ├── ajaxIndex.blade.php
│ │ ├── index.blade.php
│ │ ├── includes
│ │ │ └── indexInclude.blade.php
│ │ └── edit.blade.php
│ ├── patients
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ ├── index.blade.php
│ │ ├── file.blade.php
│ │ ├── includes
│ │ │ ├── paymentsTable.blade.php
│ │ │ └── create_edit.blade.php
│ │ ├── record.blade.php
│ │ └── editRecord.blade.php
│ ├── staff_positions
│ │ ├── create.blade.php
│ │ ├── edit.blade.php
│ │ └── common.blade.php
│ ├── budgets
│ │ └── includes
│ │ │ ├── pdf.blade.php
│ │ │ ├── saveButton.blade.php
│ │ │ └── pdf_common.blade.php
│ ├── invoices
│ │ └── includes
│ │ │ ├── doc.blade.php
│ │ │ ├── type.blade.php
│ │ │ ├── notes.blade.php
│ │ │ ├── place.blade.php
│ │ │ ├── serial.blade.php
│ │ │ ├── buttons.blade.php
│ │ │ ├── scripts.blade.php
│ │ │ ├── exp_date.blade.php
│ │ │ └── data_section.blade.php
│ ├── includes
│ │ ├── delete_button.blade.php
│ │ ├── submit_button.blade.php
│ │ ├── services_nav.blade.php
│ │ ├── staff_positions_nav.blade.php
│ │ ├── users_nav.blade.php
│ │ ├── accounting_nav.blade.php
│ │ ├── company_nav.blade.php
│ │ ├── staff_nav.blade.php
│ │ ├── delete_dropdown.blade.php
│ │ ├── messages.blade.php
│ │ ├── patients_nav.blade.php
│ │ ├── js
│ │ │ └── datatables.blade.php
│ │ └── tables
│ │ │ └── table_items.blade.php
│ ├── accounting
│ │ └── index.blade.php
│ ├── services
│ │ ├── index.blade.php
│ │ ├── create.blade.php
│ │ └── edit.blade.php
│ ├── users
│ │ ├── edit.blade.php
│ │ └── deleteView.blade.php
│ ├── auth
│ │ └── layout.blade.php
│ ├── errors
│ │ └── 503.blade.php
│ ├── layouts
│ │ └── docs_layout.blade.php
│ ├── settings
│ │ └── index.blade.php
│ ├── appointments
│ │ ├── edit.blade.php
│ │ └── create.blade.php
│ └── test.blade.php
├── assets
│ └── sass
│ │ └── app.scss
└── lang
│ ├── es
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
│ └── en
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
├── bootstrap
├── cache
│ └── .gitignore
├── autoload.php
└── app.php
├── storage
├── logs
│ └── .gitignore
├── debugbar
│ └── .gitignore
├── framework
│ ├── cache
│ │ └── .gitignore
│ ├── views
│ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ └── .gitignore
└── app
│ └── .gitignore
├── .gitattributes
├── .gitignore
├── package.json
├── readme.md
├── .editorconfig
├── gulpfile.js
├── .env.testing
├── config
├── image.php
├── filesystems.php
├── compile.php
├── services.php
├── view.php
├── broadcasting.php
└── cache.php
├── .env.example
├── routes
├── api.php
└── console.php
├── server.php
├── phpunit.xml
├── artisan
└── composer.json
/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/Listeners/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/Policies/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/seeds/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/_data/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/migrations/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 |
--------------------------------------------------------------------------------
/resources/views/vendor/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/app:
--------------------------------------------------------------------------------
1 | /var/www/AroaDen/storage/app
--------------------------------------------------------------------------------
/tests/_output/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/storage/debugbar/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/tests/_support/_generated/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/closeform.blade.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/resources/views/staff/create.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @include('staff.common')
3 |
--------------------------------------------------------------------------------
/resources/views/staff/edit.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @include('staff.common')
3 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/closediv.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.less linguist-vendored
4 |
--------------------------------------------------------------------------------
/resources/views/company/ajaxIndex.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @include('company.includes.indexInclude')
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/opendiv.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | /node_modules
3 | /public/storage
4 | Homestead.yaml
5 | Homestead.json
6 | .env
--------------------------------------------------------------------------------
/public/assets/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roirod/AroaDen/HEAD/public/assets/img/favicon.ico
--------------------------------------------------------------------------------
/public/assets/img/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roirod/AroaDen/HEAD/public/assets/img/loading.gif
--------------------------------------------------------------------------------
/public/assets/fonts/Ubuntu.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/roirod/AroaDen/HEAD/public/assets/fonts/Ubuntu.ttf
--------------------------------------------------------------------------------
/resources/assets/sass/app.scss:
--------------------------------------------------------------------------------
1 | // @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
2 |
3 |
--------------------------------------------------------------------------------
/app/Events/Event.php:
--------------------------------------------------------------------------------
1 |
3 | {{ Lang::get('aroaden.delete') }}
4 |
5 |
--------------------------------------------------------------------------------
/tests/unit.suite.yml:
--------------------------------------------------------------------------------
1 | # Codeception Test Suite Configuration
2 | #
3 | # Suite for unit or integration tests.
4 |
5 | actor: UnitTester
6 | modules:
7 | enabled:
8 | - Asserts
9 | - \Helper\Unit
--------------------------------------------------------------------------------
/app/Http/Controllers/Exceptions/NoAppointmentsFoundException.php:
--------------------------------------------------------------------------------
1 |
4 | Guardar todo
5 |
6 |
--------------------------------------------------------------------------------
/resources/views/staff/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('content')
4 |
5 |
6 |
7 | @include('staff.ajaxIndex')
8 |
9 |
10 |
11 | @endsection
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "devDependencies": {
4 | "gulp": "^3.8.8"
5 | },
6 | "dependencies": {
7 | "laravel-elixir": "^4.0.0",
8 | "bootstrap-sass": "^3.0.0"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/profile_photo.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/resources/views/patients/edit.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @extends('layouts.main')
3 |
4 | @section('content')
5 |
6 | @include('includes.patients_nav')
7 |
8 | @include('patients.includes.create_edit')
9 |
10 | @endsection
11 |
--------------------------------------------------------------------------------
/app/Models/GetTableNameTrait.php:
--------------------------------------------------------------------------------
1 | getTable());
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/public/assets/js/calcula.js:
--------------------------------------------------------------------------------
1 |
2 | function multi(units, price) {
3 | var units = parseInt(units, 10);
4 | var price = parseInt(price, 10);
5 | var paid = units * price;
6 |
7 | $('input[name="paid"]').val(paid);
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/resources/views/accounting/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('content')
4 |
5 | @include('includes.accounting_nav')
6 |
7 | @include('includes.messages')
8 |
9 | @endsection
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/dni.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.dni') }}:
4 |
5 | {{ $object->dni }}
6 |
7 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/notes.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.notes') }}:
4 |
5 |
{!! nl2br(e($object->notes)) !!}
6 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Invoices/InvoiceInterface.php:
--------------------------------------------------------------------------------
1 |
2 |
{{ trans('aroaden.issue_date') }}
3 |
4 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/name.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.name') }}:
4 |
5 | {{ $object->surname }}, {{ $object->name }}
6 |
7 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/password.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.password') }}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/age.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.age') }}:
4 |
5 | {{ $age }} {{ @trans('aroaden.years') }}
6 |
7 |
--------------------------------------------------------------------------------
/tests/_support/Helper/Acceptance.php:
--------------------------------------------------------------------------------
1 |
6 |
7 | @include('includes.messages')
8 |
9 | @include('services.ajaxIndex')
10 |
11 |
12 |
13 | @endsection
14 |
15 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/birth.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.birth') }}:
4 |
5 | {{ date ('d-m-Y', strtotime ($object->birth) )}}
6 |
7 |
--------------------------------------------------------------------------------
/resources/views/invoices/includes/type.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/resources/views/includes/submit_button.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ Lang::get('aroaden.save') }}
6 |
7 |
--------------------------------------------------------------------------------
/resources/views/form_fields/save.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/public/assets/datetimepicker/timepicker1.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | var time = $("div#timepicker1").find('input').val();
3 |
4 | if (time == '')
5 | time = '12:00';
6 |
7 | $('#timepicker1').datetimepicker({
8 | format: 'HH:mm',
9 | locale: 'es'
10 | });
11 |
12 | $("div#timepicker1").find('input').val(time);
13 | });
--------------------------------------------------------------------------------
/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call(UserTableSeeder::class);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tests/acceptance/PatientsTestCest.php:
--------------------------------------------------------------------------------
1 | remove('url.intended');
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/resources/views/form_fields/show/sex.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.sex') }}:
4 |
5 | @if( $object->sex == 'male' )
6 |
7 | {{ @trans('aroaden.male') }}
8 |
9 | @else
10 |
11 | {{ @trans('aroaden.female') }}
12 |
13 | @endif
14 |
15 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/city.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.city') }}:
4 |
5 | @php
6 |
7 | $city = trim($object->city);
8 |
9 | @endphp
10 |
11 | @if ($city != '')
12 |
13 | {{ $object->city }}
14 |
15 | @endif
16 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/tel1.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.tele1') }}:
4 |
5 | @php
6 |
7 | $tel1 = trim($object->tel1);
8 |
9 | @endphp
10 |
11 | @if ($tel1 != '')
12 |
13 | {{ $object->tel1 }}
14 |
15 | @endif
16 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/tel2.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.tele2') }}:
4 |
5 | @php
6 |
7 | $tel2 = trim($object->tel2);
8 |
9 | @endphp
10 |
11 | @if ($tel2 != '')
12 |
13 | {{ $object->tel2 }}
14 |
15 | @endif
16 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/tel3.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.tele3') }}:
4 |
5 | @php
6 |
7 | $tel3 = trim($object->tel3);
8 |
9 | @endphp
10 |
11 | @if ($tel3 != '')
12 |
13 | {{ $object->tel3 }}
14 |
15 | @endif
16 |
--------------------------------------------------------------------------------
/resources/views/includes/services_nav.blade.php:
--------------------------------------------------------------------------------
1 |
13 |
14 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 | {!! @trans('aroaden.edit_user') !!}
13 |
14 |
15 | @include('form_fields.common')
16 |
17 |
18 |
19 | @endsection
--------------------------------------------------------------------------------
/resources/views/form_fields/show/address.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.address') }}:
4 |
5 | @php
6 |
7 | $address = trim($object->address);
8 |
9 | @endphp
10 |
11 | @if ($address != '')
12 |
13 | {{ $object->address }}
14 |
15 | @endif
16 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.notes') }}
3 | @if ($is_create_view)
4 |
5 |
6 |
7 | @else
8 |
9 |
10 |
11 | @endif
12 |
--------------------------------------------------------------------------------
/resources/views/includes/staff_positions_nav.blade.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/views/invoices/includes/notes.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.notes') }}
3 | @if ($is_create_view)
4 |
5 |
6 |
7 | @else
8 |
9 |
10 |
11 | @endif
12 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/paid.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.paid') }}
3 | @if ($is_create_view)
4 |
5 |
6 |
7 | @else
8 |
9 |
10 |
11 | @endif
12 |
--------------------------------------------------------------------------------
/public/assets/js/colorbox/jquery.colorbox-es.js:
--------------------------------------------------------------------------------
1 | /*
2 | jQuery Colorbox language configuration
3 | language: Spanish (es)
4 | translated by: migolo
5 | */
6 | jQuery.extend(jQuery.colorbox.settings, {
7 | current: "Imagen {current} de {total}",
8 | previous: "Anterior",
9 | next: "Siguiente",
10 | close: "Cerrar",
11 | xhrError: "Error en la carga del contenido.",
12 | imgError: "Error en la carga de la imagen."
13 | });
14 |
--------------------------------------------------------------------------------
/app/Http/Middleware/RedirectIfAuthenticated.php:
--------------------------------------------------------------------------------
1 | check())
14 | return redirect('/home');
15 |
16 | return $next($request);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.price_no_tax') }}
3 | @if ($is_create_view)
4 |
5 |
6 |
7 | @else
8 |
9 |
10 |
11 | @endif
12 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/tel1.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.tele1') }}
3 | @if ($is_create_view)
4 |
5 |
6 |
7 | @else
8 |
9 |
10 |
11 | @endif
12 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/tel3.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.tele3') }}
3 | @if ($is_create_view)
4 |
5 |
6 |
7 | @else
8 |
9 |
10 |
11 | @endif
12 |
--------------------------------------------------------------------------------
/resources/views/form_fields/show/position.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.positions') }}:
4 |
5 | @php
6 |
7 | $staffPositionsEntries = trim($staffPositionsEntries);
8 |
9 | @endphp
10 |
11 | @if ($staffPositionsEntries != '')
12 |
13 | {{ $staffPositionsEntries }}
14 |
15 | @endif
16 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/city.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.city') }}
3 | @if ($is_create_view)
4 |
5 |
6 |
7 | @else
8 |
9 |
10 |
11 | @endif
12 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/tel2.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.tele2') }}
3 |
4 | @if ($is_create_view)
5 |
6 |
7 |
8 | @else
9 |
10 |
11 |
12 | @endif
13 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/openform.blade.php:
--------------------------------------------------------------------------------
1 | @if ($is_create_view)
2 |
3 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/sex.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ @trans('aroaden.sex') }}
3 |
4 | @if ($is_create_view)
5 |
6 | {{ @trans('aroaden.male') }}
7 | {{ @trans('aroaden.female') }}
8 |
9 | @else
10 |
11 | sex == 'male' ) selected @endif>{{ @trans('aroaden.male') }}
12 | sex == 'female' ) selected @endif>{{ @trans('aroaden.female') }}
13 |
14 | @endif
15 |
16 |
--------------------------------------------------------------------------------
/resources/views/invoices/includes/buttons.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/Http/Middleware/AdminMiddleware.php:
--------------------------------------------------------------------------------
1 | username;
14 | $uid = Auth::user()->uid;
15 |
16 | if ($username != 'admin' && (int)$uid !== 1) {
17 | if($request->ajax())
18 | return response('Forbidden', 403);
19 |
20 | $request->session()->flash('error_message', Lang::get('aroaden.deny_access') );
21 | return redirect()->back();
22 | }
23 |
24 | return $next($request);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/full_name.blade.php:
--------------------------------------------------------------------------------
1 | @if ($is_create_view)
2 |
3 |
4 | {{ @trans('aroaden.full_name') }}
5 |
6 |
7 |
8 | @elseif (isset($object) && $object->username != 'admin')
9 |
10 |
11 | {{ @trans('aroaden.full_name') }}
12 |
13 |
14 |
15 | @endif
--------------------------------------------------------------------------------
/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/lang/es/auth.php:
--------------------------------------------------------------------------------
1 | 'Estas credenciales no coinciden con nuestros registros.',
14 | 'throttle' => 'Demasiados intentos de acceso. Por favor intente nuevamente en :seconds segundos.',
15 | ];
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/hour.blade.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/_support/UnitTester.php:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/tests/_support/AcceptanceTester.php:
--------------------------------------------------------------------------------
1 | 'local',
4 | 'cloud' => 's3',
5 | 'disks' => [
6 | 'local' => [
7 | 'driver' => 'local',
8 | 'root' => storage_path('app')
9 | ],
10 | 'public' => [
11 | 'driver' => 'local',
12 | 'root' => storage_path('app/public'),
13 | 'visibility' => 'public',
14 | ],
15 | 's3' => [
16 | 'driver' => 's3',
17 | 'key' => 'your-key',
18 | 'secret' => 'your-secret',
19 | 'region' => 'your-region',
20 | 'bucket' => 'your-bucket',
21 | ]
22 | ]
23 | ];
24 |
--------------------------------------------------------------------------------
/database/factories/ModelFactory.php:
--------------------------------------------------------------------------------
1 | define(App\User::class, function (Faker\Generator $faker) {
15 | return [
16 | 'name' => $faker->name,
17 | 'email' => $faker->email,
18 | 'password' => bcrypt(str_random(10)),
19 | 'remember_token' => str_random(10),
20 | ];
21 | });
22 |
--------------------------------------------------------------------------------
/app/Console/Commands/Inspire.php:
--------------------------------------------------------------------------------
1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/resources/views/staff/file.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('head')
4 | @parent
5 |
6 |
7 | @endsection
8 |
9 | @section('js')
10 | @parent
11 |
12 |
13 |
14 | @endsection
15 |
16 | @section('content')
17 |
18 | @include('includes.staff_nav')
19 |
20 | @include('includes.messages')
21 |
22 |
23 | @include('form_fields.show.name')
24 |
25 |
26 | @include('form_fields.show.file')
27 |
28 | @endsection
--------------------------------------------------------------------------------
/resources/views/staff_positions/common.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @include('includes.staff_positions_nav')
3 |
4 | @include('includes.messages')
5 |
6 |
7 |
8 |
9 |
10 |
11 | @if ($is_create_view)
12 |
13 | {!! @trans('aroaden.create_position') !!}
14 |
15 | @else
16 |
17 | {!! @trans('aroaden.edit_position') !!}
18 |
19 | @endif
20 |
21 |
22 | @include('form_fields.common')
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/resources/views/includes/messages.blade.php:
--------------------------------------------------------------------------------
1 | @if( $request->session()->has('success_message') )
2 |
3 |
8 |
9 | @elseif( $request->session()->has('error_message') )
10 |
11 |
16 |
17 | @endif
18 |
19 | @if (count($errors) > 0)
20 |
21 |
22 | @foreach ($errors->all() as $error)
23 | {{ $error }}
24 | @endforeach
25 |
26 |
27 | @endif
--------------------------------------------------------------------------------
/resources/views/patients/file.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('head')
4 | @parent
5 |
6 |
7 | @endsection
8 |
9 | @section('js')
10 | @parent
11 |
12 |
13 |
14 | @endsection
15 |
16 | @section('content')
17 |
18 | @include('includes.patients_nav')
19 |
20 | @include('includes.messages')
21 |
22 |
23 | @include('form_fields.show.name')
24 |
25 |
26 | @include('form_fields.show.file')
27 |
28 | @endsection
29 |
--------------------------------------------------------------------------------
/database/migrations/2016_02_06_195907_create_services_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
12 | $table->smallIncrements('idser');
13 | $table->string('name',111);
14 | $table->decimal('price', 11, 2);
15 | $table->tinyInteger('tax')->unsigned();
16 | $table->timestamps();
17 | $table->unique('name');
18 | });
19 | }
20 |
21 | public function down()
22 | {
23 | Schema::drop('services');
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/migrations/2016_01_06_042652_create_users_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
13 | $table->smallIncrements('uid');
14 | $table->string('username',20);
15 | $table->string('password',60);
16 | $table->string('type',11);
17 | $table->string('full_name',77);
18 | $table->timestamps();
19 | $table->unique('username');
20 | });
21 | }
22 |
23 | public function down()
24 | {
25 | Schema::drop('users');
26 | }
27 | }
--------------------------------------------------------------------------------
/app/Providers/AuthServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any application authentication / authorization services.
21 | *
22 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate
23 | * @return void
24 | */
25 | public function boot()
26 | {
27 | $this->registerPolicies();
28 |
29 | //
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/resources/views/invoices/includes/scripts.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/Http/Controllers/SettingsController.php:
--------------------------------------------------------------------------------
1 | main_route = $this->config['routes']['users'];
17 | $this->views_folder = $this->config['routes']['settings'];
18 | }
19 |
20 | public function index(Request $request)
21 | {
22 | $this->setPageTitle(Lang::get('aroaden.settings'));
23 |
24 | return parent::index($request);
25 | }
26 |
27 | public function jsonSettings(Request $request)
28 | {
29 | $data = [];
30 | $data['page_title'] = $request->session()->get('page_title');
31 |
32 | $this->echoJsonOuptut($data);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/day.blade.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/tax.blade.php:
--------------------------------------------------------------------------------
1 |
2 | {{ Lang::get('aroaden.tax') }}
3 |
4 | @if ($is_create_view)
5 |
6 | @foreach ($tax_types as $key => $value)
7 | @if ($value == 0)
8 |
9 | {{ $key }}
10 |
11 | @else
12 |
13 | {{ $key }}
14 |
15 | @endif
16 | @endforeach
17 |
18 | @else
19 |
20 | @foreach ($tax_types as $key => $value)
21 | @if ($object->tax == $value)
22 |
23 | {{ $key }}
24 |
25 | @else
26 |
27 | {{ $key }}
28 |
29 | @endif
30 | @endforeach
31 |
32 | @endif
33 |
34 |
--------------------------------------------------------------------------------
/database/seeds/StaffSeeder.php:
--------------------------------------------------------------------------------
1 | insert([
16 | 'surname' => htmlentities ($faker->lastName, ENT_QUOTES, "UTF-8").' '.htmlentities ($faker->lastName, ENT_QUOTES, "UTF-8"),
17 | 'name' => htmlentities ($faker->firstName, ENT_QUOTES, "UTF-8"),
18 | 'dni' => $faker->numberBetween($min = 100000000, $max = 999999999),
19 | 'birth' => $faker->date,
20 | 'address' => $faker->address,
21 | 'city' => $faker->city
22 | ]);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/seeds/PatientsSeeder.php:
--------------------------------------------------------------------------------
1 | insert([
16 | 'surname' => htmlentities ($faker->lastName, ENT_QUOTES, "UTF-8").' '.htmlentities ($faker->lastName, ENT_QUOTES, "UTF-8"),
17 | 'name' => htmlentities ($faker->firstName, ENT_QUOTES, "UTF-8"),
18 | 'dni' => $faker->numberBetween($min = 100000000, $max = 999999999),
19 | 'birth' => $faker->date,
20 | 'address' => $faker->address,
21 | 'city' => $faker->city
22 | ]);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/migrations/2016_07_11_152617_create_budgets_text_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
12 | $table->mediumInteger('idpat')->unsigned();
13 | $table->string('uniqid', 16);
14 | $table->text('text')->nullable();
15 | $table->primary(['uniqid', 'idpat']);
16 |
17 | $table->foreign('idpat')
18 | ->references('idpat')->on('patients')
19 | ->onDelete('cascade');
20 | });
21 | }
22 |
23 | public function down()
24 | {
25 | Schema::drop('budgets_text');
26 | }
27 | }
--------------------------------------------------------------------------------
/resources/views/invoices/includes/exp_date.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least six characters and match the confirmation.',
17 | 'reset' => 'Your password has been reset!',
18 | 'sent' => 'We have e-mailed your password reset link!',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that e-mail address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/resources/lang/es/passwords.php:
--------------------------------------------------------------------------------
1 | 'Las contraseñas deben contener al menos 6 caracteres y coincidir.',
14 | 'reset' => '¡Tu contraseña ha sido restablecida!',
15 | 'sent' => '¡Recordatorio de contraseña enviado!',
16 | 'token' => 'Este token de recuperación de contraseña es inválido.',
17 | 'user' => 'No podemos encontrar a un usuario con ese correo electrónico.',
18 | ];
--------------------------------------------------------------------------------
/resources/views/invoices/includes/data_section.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - {!! @trans("aroaden.company") !!}
5 |
6 | {!! $company->company_name !!}
7 |
8 | {!! $company->company_address !!}
9 |
10 | {!! $company->company_city !!}
11 |
12 | {!! $company->company_nif !!}
13 |
14 |
15 |
16 |
17 | - {!! @trans("aroaden.patient") !!}
18 |
19 | {!! $object->name.' '.$object->surname !!}
20 |
21 | {!! $object->address !!}
22 |
23 | {!! $object->city !!}
24 |
25 | {!! $object->dni !!}
26 |
--------------------------------------------------------------------------------
/database/migrations/2017_04_08_170329_create_settings_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
17 | $table->string('key', 33);
18 | $table->text('value')->nullable();
19 | $table->string('type', 33)->nullable();
20 | $table->primary(['key', 'type']);
21 | $table->unique('key');
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::drop('settings');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2018_05_16_154555_create_files_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
17 | $table->bigIncrements('idfiles');
18 | $table->mediumInteger('iduser')->unsigned();
19 | $table->string('type', 22);
20 | $table->text('info');
21 | $table->string('originalName', 55);
22 | $table->index('iduser', 'type');
23 | $table->index('originalName');
24 | });
25 | }
26 |
27 | public function down()
28 | {
29 | Schema::drop('files');
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/database/seeds/StaffPositionsSeeder.php:
--------------------------------------------------------------------------------
1 | insert([
31 | 'name' => htmlentities ($position, ENT_QUOTES, "UTF-8")
32 | ]);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/resources/views/auth/layout.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ trans('aroaden.aroaden_full_name') }}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | @yield('content')
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/database/migrations/2016_01_25_214921_create_staff_positions_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
18 | $table->smallIncrements('idstpo');
19 | $table->string('name', 88);
20 | $table->timestamps();
21 | $table->unique('name');
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists('staff_positions');
33 | }
34 | }
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | ./tests/
14 |
15 |
16 |
17 |
18 | app/
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/Providers/EventServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
17 | 'App\Listeners\EventListener',
18 | ],
19 | 'Illuminate\Auth\Events\Login' => [
20 | 'App\Listeners\LogSuccessfulLogin',
21 | ]
22 | ];
23 |
24 | /**
25 | * Register any other events for your application.
26 | *
27 | * @param \Illuminate\Contracts\Events\Dispatcher $events
28 | * @return void
29 | */
30 | public function boot()
31 | {
32 | parent::boot();
33 |
34 | //
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/seeds/AppointmentsSeeder.php:
--------------------------------------------------------------------------------
1 | pluck('idpat')->toArray();
20 |
21 | foreach (range(1, 500) as $index) {
22 |
23 | $key = array_rand($patients);
24 | $val = $patients[$key];
25 |
26 | DB::table('appointments')->insert([
27 | 'idpat' => $val,
28 | 'day' => htmlentities ($faker->dateTimeBetween($startDate = '-30 days', $endDate = '+90 days')->format("Y-m-d"), ENT_QUOTES, "UTF-8"),
29 | 'hour' => htmlentities ($faker->dateTimeBetween()->format("H:i:s"), ENT_QUOTES, "UTF-8")
30 | ]);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/resources/views/includes/patients_nav.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @if (isset($idnav))
3 |
4 |
17 |
18 | @endif
--------------------------------------------------------------------------------
/app/Models/InvoiceLines.php:
--------------------------------------------------------------------------------
1 | belongsTo('App\Models\Invoices');
21 | }
22 |
23 | public function scopeGetByNumber($query, $number)
24 | {
25 | $this->query = $query->join('services','invoice_lines.idser','=','services.idser')
26 | ->select('invoice_lines.*','services.name');
27 |
28 | $this->whereRaw = "number = '$number'";
29 | $this->query->orderBy('invoice_lines.day', 'DESC');
30 | $this->type = 'get';
31 |
32 | return $this->queryRaw();
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/public/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/pricetax.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ @trans('aroaden.price') }}
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/scopes.blade.php:
--------------------------------------------------------------------------------
1 | @if ($is_create_view || (isset($object) && $object->type == 'basic'))
2 |
3 |
4 | {{ @trans('aroaden.permissions') }}
5 |
6 | {{ @trans('aroaden.basic') }}
7 | {{ @trans('aroaden.normal') }}
8 |
9 |
10 |
11 | @elseif (isset($object) && $object->type == 'normal' && $object->username != 'admin')
12 |
13 |
14 | {{ @trans('aroaden.permissions') }}
15 |
16 | {{ @trans('aroaden.basic') }}
17 | {{ @trans('aroaden.normal') }}
18 |
19 |
20 |
21 | @endif
22 |
23 |
--------------------------------------------------------------------------------
/database/migrations/2016_06_10_185632_create_record_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
12 | $table->mediumInteger('idpat')->unsigned();
13 | $table->text('medical_record')->nullable();
14 | $table->text('diseases')->nullable();
15 | $table->text('medicines')->nullable();
16 | $table->text('allergies')->nullable();
17 | $table->timestamps();
18 | $table->primary('idpat');
19 |
20 | $table->foreign('idpat')
21 | ->references('idpat')->on('patients')
22 | ->onDelete('cascade');
23 | });
24 | }
25 |
26 | public function down()
27 | {
28 | Schema::drop('record');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/user.blade.php:
--------------------------------------------------------------------------------
1 | @if ($is_create_view)
2 |
3 |
4 | {{ @trans('aroaden.user') }}
5 |
6 |
7 |
8 | @elseif (isset($object) && $object->username != 'admin')
9 |
10 |
11 | {{ @trans('aroaden.user') }}
12 |
13 |
14 |
15 | @elseif (isset($object) && $object->username == 'admin')
16 |
17 |
24 |
25 | @endif
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | ajax())
22 | return response('Unauthorized', 401);
23 |
24 | if (Auth::guard($guard)->guest())
25 | if($request->ajax())
26 | return response('Unauthorized', 401);
27 |
28 | if (empty(Auth::user()))
29 | return redirect()->guest('login');
30 |
31 | if (Auth::guard($guard)->guest())
32 | return redirect()->guest('login');
33 |
34 | return $next($request);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/position.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ @trans('aroaden.positions') }}
5 |
6 |
7 |
8 |
9 |
10 |
11 | @if ($is_create_view)
12 |
13 | @foreach($staffPositions as $pos)
14 |
15 | {{ $pos->name }}
16 |
17 | @endforeach
18 |
19 | @else
20 |
21 |
24 |
25 | @foreach($staffPositions as $pos)
26 |
27 | @if(in_array($pos->idstpo, $staffPositionsEntries_array))
28 |
29 | {{ $pos->name }}
30 |
31 | @else
32 |
33 | {{ $pos->name }}
34 |
35 | @endif
36 |
37 | @endforeach
38 |
39 | @endif
40 |
41 |
42 |
--------------------------------------------------------------------------------
/database/migrations/2016_02_24_214858_create_appointments_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
17 | $table->bigIncrements('idapp');
18 | $table->mediumInteger('idpat')->unsigned();
19 | $table->date('day');
20 | $table->time('hour');
21 | $table->text('notes')->nullable();
22 | $table->timestamps();
23 | $table->index(['day', 'hour'], 'hoday');
24 |
25 | $table->foreign('idpat')
26 | ->references('idpat')->on('patients')
27 | ->onDelete('cascade');
28 | });
29 | }
30 |
31 | public function down()
32 | {
33 | Schema::drop('appointments');
34 | }
35 | }
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
28 | // ->hourly();
29 | }
30 |
31 | /**
32 | * Register the commands for the application.
33 | *
34 | * @return void
35 | */
36 | protected function commands()
37 | {
38 | $this->load(__DIR__.'/Commands');
39 | require base_path('routes/console.php');
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/config/compile.php:
--------------------------------------------------------------------------------
1 | [
17 | //
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled File Providers
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may list service providers which define a "compiles" function
26 | | that returns additional files that should be compiled, providing an
27 | | easy way to get common files from any packages you are utilizing.
28 | |
29 | */
30 |
31 | 'providers' => [
32 | //
33 | ],
34 |
35 | ];
36 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | ],
21 |
22 | 'mandrill' => [
23 | 'secret' => env('MANDRILL_SECRET'),
24 | ],
25 |
26 | 'ses' => [
27 | 'key' => env('SES_KEY'),
28 | 'secret' => env('SES_SECRET'),
29 | 'region' => 'us-east-1',
30 | ],
31 |
32 | 'stripe' => [
33 | 'model' => App\User::class,
34 | 'key' => env('STRIPE_KEY'),
35 | 'secret' => env('STRIPE_SECRET'),
36 | ],
37 |
38 | ];
39 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | realpath(base_path('resources/views')),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => realpath(storage_path('framework/views')),
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/app/Models/StaffWorks.php:
--------------------------------------------------------------------------------
1 | select('idsta','idtre')
20 | ->where('idtre', $id)
21 | ->get();
22 | }
23 |
24 | public function scopeAllByStaffId($query, $id)
25 | {
26 | return $query->join('treatments','treatments.idtre','=','staff_works.idtre')
27 | ->join('patients','patients.idpat','=','treatments.idpat')
28 | ->join('services','services.idser','=','treatments.idser')
29 | ->select('treatments.*','patients.*','services.name as service_name')
30 | ->where('staff_works.idsta', $id)
31 | ->orderBy('treatments.day','DESC')
32 | ->get();
33 | }
34 | }
--------------------------------------------------------------------------------
/resources/views/form_fields/show/file.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
27 |
28 |
29 |
30 |
31 |
32 | @include('form_fields.show.file_list')
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/resources/views/includes/js/datatables.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/database/migrations/2016_01_24_214921_create_staff_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
12 | $table->smallIncrements('idsta');
13 | $table->string('surname', 111);
14 | $table->string('name', 111);
15 | $table->string('address', 111)->nullable();
16 | $table->string('city', 111)->nullable();
17 | $table->string('dni', 18);
18 | $table->string('tel1', 18)->nullable();
19 | $table->string('tel2', 18)->nullable();
20 | $table->date('birth')->nullable();
21 | $table->text('notes')->nullable();
22 | $table->timestamps();
23 | $table->index('surname');
24 | $table->index('name');
25 | $table->unique('dni');
26 | });
27 | }
28 |
29 | public function down()
30 | {
31 | Schema::drop('staff');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Traits/DirTrait.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 | {!! @trans("aroaden.treatments_sum") !!}
8 | {!! numformat($sum->total_sum) !!} {{ $_SESSION["Alocale"]["currency_symbol"] }}
9 |
10 |
11 | {!! @trans("aroaden.paid") !!}
12 | {!! numformat($sum->total_paid) !!} {{ $_SESSION["Alocale"]["currency_symbol"] }}
13 |
14 |
15 | {!! @trans("aroaden.rest") !!}
16 | {!! numformat($sum->rest) !!} {{ $_SESSION["Alocale"]["currency_symbol"] }}
17 |
18 |
19 |
20 |
21 |
22 |
23 | @endforeach
--------------------------------------------------------------------------------
/database/migrations/2017_12_10_164935_create_staff_works_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
17 | $table->bigIncrements('idstwo');
18 | $table->smallInteger('idsta')->unsigned();
19 | $table->bigInteger('idtre')->unsigned();
20 | $table->index('idtre');
21 | $table->index('idsta');
22 |
23 | $table->foreign('idsta')
24 | ->references('idsta')->on('staff')
25 | ->onDelete('cascade');
26 |
27 | $table->foreign('idtre')
28 | ->references('idtre')->on('treatments')
29 | ->onDelete('cascade');
30 | });
31 | }
32 |
33 | /**
34 | * Reverse the migrations.
35 | *
36 | * @return void
37 | */
38 | public function down()
39 | {
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/bootstrap/autoload.php:
--------------------------------------------------------------------------------
1 | whereRaw($this->whereRaw);
21 | //$sql = $res->toSql();
22 |
23 | return $res->first();
24 | }
25 |
26 | public function queryRaw()
27 | {
28 | if (isset($this->selectRaw))
29 | $this->query->selectRaw($this->selectRaw);
30 |
31 | if (isset($this->whereRaw))
32 | $this->query->whereRaw($this->whereRaw);
33 |
34 | if ($this->toSql)
35 | return $this->query->toSql();
36 |
37 | if (empty($this->type))
38 | $this->type = 'first';
39 |
40 | $type = $this->type;
41 |
42 | if (isset($this->var))
43 | return $this->query->$type($this->var);
44 |
45 | return $this->query->$type();
46 | }
47 |
48 | public function scopeCountAll($query)
49 | {
50 | return (int)$query->count();
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/database/seeds/StaffPositionsEntriesSeeder.php:
--------------------------------------------------------------------------------
1 | pluck('idsta')->toArray();
20 | $staff_positions = DB::table('staff_positions')->pluck('idstpo')->toArray();
21 |
22 | foreach (range(1, 300) as $index) {
23 |
24 | $staffkey = array_rand($staff);
25 | $idsta = $staff[$staffkey];
26 |
27 | $key = array_rand($staff_positions);
28 | $idstpo = $staff_positions[$key];
29 |
30 | $exists = DB::table('staff_positions_entries')
31 | ->where('idsta', $idsta)
32 | ->where('idstpo', $idstpo)
33 | ->exists();
34 |
35 | if ($exists)
36 | continue;
37 |
38 | DB::table('staff_positions_entries')->insert([
39 | 'idsta' => $idsta,
40 | 'idstpo' => $idstpo
41 | ]);
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/resources/views/budgets/includes/pdf_common.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {!! $company->company_name !!}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | {!! $company->company_address !!}
15 |
16 |
17 | {!! $company->company_city !!}
18 |
19 |
20 | Telf: {!! $company->company_tel1 !!}
21 |
22 |
23 | Email: {!! $company->company_email !!}
24 |
25 |
26 |
27 | Presupuesto: {!! DatTime($created_at) !!}
28 |
29 | {!! $patient->name.' '.$patient->surname !!}
30 |
31 | {!! $patient->dni !!}
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | @include('includes.tables.table_items')
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | {!! nl2br(e($text)) !!}
54 |
55 |
56 |
57 | {!! nl2br(e($company->budget_text)) !!}
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/database/migrations/2016_01_11_215004_create_patients_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
13 | $table->mediumIncrements('idpat');
14 | $table->string('surname', 111);
15 | $table->string('name', 111);
16 | $table->string('address', 111)->nullable();
17 | $table->string('city', 111)->nullable();
18 | $table->string('dni', 18);
19 | $table->string('tel1', 18)->nullable();
20 | $table->string('tel2', 18)->nullable();
21 | $table->string('tel3', 18)->nullable();
22 | $table->string('sex', 9)->nullable();
23 | $table->date('birth')->nullable();
24 | $table->text('notes')->nullable();
25 | $table->timestamps();
26 | $table->index('surname');
27 | $table->index('name');
28 | $table->unique('dni');
29 | });
30 | }
31 |
32 | public function down()
33 | {
34 | Schema::drop('patients');
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/database/migrations/2016_02_24_215018_create_budgets_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
13 | $table->mediumInteger('idpat')->unsigned();
14 | $table->smallInteger('idser')->unsigned();
15 | $table->decimal('price', 11, 2);
16 | $table->tinyInteger('tax')->unsigned()->default(0);
17 | $table->tinyInteger('units')->unsigned()->default(1);
18 | $table->string('uniqid', 16);
19 | $table->timestamps();
20 | $table->primary(['uniqid', 'idpat', 'idser']);
21 |
22 | $table->foreign('idpat')
23 | ->references('idpat')->on('patients')
24 | ->onDelete('cascade');
25 |
26 | $table->foreign('idser')
27 | ->references('idser')->on('services')
28 | ->onDelete('cascade');
29 | });
30 | }
31 |
32 | public function down()
33 | {
34 | Schema::drop('budgets');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/resources/views/patients/includes/create_edit.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @include('includes.messages')
3 |
4 |
5 |
6 |
7 |
8 | @if ($is_create_view)
9 |
10 | {!! @trans('aroaden.create_patient') !!}
11 |
12 | @else
13 |
14 | {!! @trans('aroaden.edit_patient') !!}
15 |
16 | @endif
17 |
18 |
19 | @include('form_fields.common')
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/resources/views/errors/503.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Be right back.
5 |
6 |
7 |
8 |
39 |
40 |
41 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/database/migrations/2016_02_25_215040_create_treatments_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
12 | $table->bigIncrements('idtre');
13 | $table->mediumInteger('idpat')->unsigned();
14 | $table->smallInteger('idser')->unsigned();
15 | $table->tinyInteger('units')->unsigned();
16 | $table->decimal('price', 11, 2);
17 | $table->decimal('paid', 11, 2);
18 | $table->tinyInteger('tax')->unsigned();
19 | $table->date('day');
20 | $table->timestamps();
21 | $table->index('day');
22 | $table->index('idpat');
23 |
24 | $table->foreign('idpat')
25 | ->references('idpat')->on('patients')
26 | ->onDelete('cascade');
27 |
28 | $table->foreign('idser')
29 | ->references('idser')->on('services')
30 | ->onDelete('cascade');
31 | });
32 | }
33 |
34 | public function down()
35 | {
36 | Schema::drop('treatments');
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/database/migrations/2018_11_04_034030_create_staff_positions_entries_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
18 | $table->bigIncrements('id');
19 | $table->smallInteger('idsta')->unsigned();
20 | $table->smallInteger('idstpo')->unsigned();
21 | $table->index('idsta');
22 | $table->index('idstpo');
23 |
24 | $table->foreign('idsta')
25 | ->references('idsta')->on('staff')
26 | ->onDelete('cascade');
27 |
28 | $table->foreign('idstpo')
29 | ->references('idstpo')->on('staff_positions')
30 | ->onDelete('cascade');
31 | });
32 | }
33 |
34 | /**
35 | * Reverse the migrations.
36 | *
37 | * @return void
38 | */
39 | public function down()
40 | {
41 | Schema::dropIfExists('staff_positions_entries');
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/resources/views/layouts/docs_layout.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | @if($downloadPdf)
45 |
46 |
47 |
48 | @else
49 |
50 |
51 |
52 | @endif
53 |
54 |
55 | @yield('content')
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/resources/views/settings/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('content')
4 |
5 | @include('includes.messages')
6 |
7 |
8 |
9 |
10 | {{ @trans("aroaden.settings") }}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {{ @trans("aroaden.company") }}
22 |
23 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | {{ @trans("aroaden.users") }}
36 |
37 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | @endsection
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
18 | $table->bigIncrements('idinli');
19 | $table->Integer('number')->unsigned();
20 | $table->bigInteger('idtre')->unsigned();
21 | $table->smallInteger('idser')->unsigned();
22 | $table->tinyInteger('units')->unsigned();
23 | $table->decimal('price', 11, 2);
24 | $table->decimal('paid', 11, 2);
25 | $table->tinyInteger('tax')->unsigned();
26 | $table->date('day');
27 | $table->index('number');
28 |
29 | $table->foreign('number')
30 | ->references('number')->on('invoices')
31 | ->onDelete('cascade')
32 | ->onUpdate('cascade');
33 | });
34 | }
35 |
36 | /**
37 | * Reverse the migrations.
38 | *
39 | * @return void
40 | */
41 | public function down()
42 | {
43 | Schema::dropIfExists('invoice_lines');
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/database/migrations/2020_04_25_203926_create_invoices_table.php:
--------------------------------------------------------------------------------
1 | engine = 'InnoDB';
18 | $table->Integer('number')->unsigned();
19 | $table->year('serial');
20 | $table->mediumInteger('idpat')->unsigned();
21 | $table->char('type', 16);
22 | $table->Integer('parent_num')->unsigned()->nullable();
23 | $table->year('parent_serial')->nullable();
24 | $table->date('exp_date');
25 | $table->char('place', 88);
26 | $table->text('notes')->nullable();
27 | $table->primary('number');
28 | $table->index('idpat');
29 | $table->index('exp_date');
30 |
31 | $table->foreign('idpat')
32 | ->references('idpat')->on('patients')
33 | ->onDelete('cascade');
34 | });
35 | }
36 |
37 | /**
38 | * Reverse the migrations.
39 | *
40 | * @return void
41 | */
42 | public function down()
43 | {
44 | Schema::dropIfExists('invoices');
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/public/assets/js/modernizr.js:
--------------------------------------------------------------------------------
1 | /*! modernizr 3.2.0 (Custom Build) | MIT *
2 | * http://modernizr.com/download/?-setclasses !*/
3 | !function(n,e,s){function o(n,e){return typeof n===e}function a(){var n,e,s,a,i,l,r;for(var c in f)if(f.hasOwnProperty(c)){if(n=[],e=f[c],e.name&&(n.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(s=0;s
6 |
7 |
8 |
9 | {!! @trans('aroaden.create_service') !!}
10 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
52 |
--------------------------------------------------------------------------------
/resources/views/users/deleteView.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('content')
4 |
5 | @include('includes.users_nav')
6 |
7 | @include('includes.messages')
8 |
9 |
10 |
11 |
12 |
13 |
14 | {!! @trans('aroaden.del_user') !!}
15 |
16 |
17 |
46 |
47 |
48 |
49 |
50 |
51 | @endsection
--------------------------------------------------------------------------------
/app/Models/Files.php:
--------------------------------------------------------------------------------
1 | where('iduser', $iduser)
22 | ->where('type', $type)
23 | ->orderBy('originalName', 'ASC')
24 | ->get();
25 |
26 | return $files;
27 | }
28 |
29 | public static function CheckIfFileExist($iduser, $type, $originalName)
30 | {
31 | $file = DB::table('files')
32 | ->where('iduser', $iduser)
33 | ->where('type', $type)
34 | ->where('originalName', $originalName)
35 | ->first();
36 |
37 | if ($file !== NULL) {
38 | if ($file->originalName == $originalName)
39 | return true;
40 | }
41 |
42 | return false;
43 | }
44 |
45 | public static function GetFileByUserId($iduser, $idfiles)
46 | {
47 | $file = DB::table('files')
48 | ->where('iduser', $iduser)
49 | ->where('idfiles', $idfiles)
50 | ->first();
51 |
52 | return $file;
53 | }
54 | }
--------------------------------------------------------------------------------
/app/functions/other.php:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 | '.htmlentities(trim($text), ENT_QUOTES, "UTF-8").'
9 |
10 |
11 |
12 | ';
13 | }
14 |
15 | function calcTotal($price, $tax, $numformat = true) {
16 | $total = (($price * $tax) / 100) + $price;
17 |
18 | if ($numformat)
19 | return numformat($total);
20 |
21 | return convertToOperate($total);
22 | };
23 |
24 | function numformat($num) {
25 | $Alocale = $_SESSION["Alocale"];
26 |
27 | return number_format($num, $Alocale["frac_digits"], $Alocale["decimal_point"], $Alocale["thousands_sep"]);
28 | };
29 |
30 | function convertToOperate($num) {
31 | return number_format($num, 2, '.', '');
32 | };
33 |
34 | function DatTime($DatTi) {
35 | $DatTime = date_create_from_format('Y-m-d H:i:s',$DatTi);
36 | return date_format($DatTime, 'd-m-Y H:i:s');
37 | };
38 |
39 | function sanistr($str) {
40 | $str = filter_var($str, FILTER_SANITIZE_STRING);
41 | return $str;
42 | };
43 |
44 | function saninum($num) {
45 | $num = filter_var($num, FILTER_SANITIZE_NUMBER_INT);
46 | return $num;
47 | };
48 |
49 | function sanifulsp($num) {
50 | $num = filter_var($num, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
51 | return $num;
52 | };
53 |
54 | function lenum($num) {
55 | $num = preg_replace('/[^\wd -]/i', '', $num);
56 | return $num;
57 | };
58 |
59 | function convertYmdToDmY($date)
60 | {
61 | return date('d-m-Y', strtotime($date));
62 | }
63 |
64 | ?>
--------------------------------------------------------------------------------
/app/Models/StaffPositions.php:
--------------------------------------------------------------------------------
1 | orderBy('name', 'ASC')
23 | ->get();
24 | }
25 |
26 | public function scopeFirstById($query, $id)
27 | {
28 | $this->whereRaw = "$this->primaryKey = '$id'";
29 |
30 | return $this->scopeFirstWhereRaw($query);
31 | }
32 |
33 | public function scopeFirstByName($query, $name)
34 | {
35 | $this->whereRaw = "name = '$name'";
36 |
37 | return $this->scopeFirstWhereRaw($query);
38 | }
39 |
40 | public function scopeCheckIfExistsOnUpdate($query, $id, $name)
41 | {
42 | $this->whereRaw = "$this->primaryKey != '$id' AND name = '$name'";
43 |
44 | return $this->scopeFirstWhereRaw($query);
45 | }
46 |
47 | public static function checkDestroy($idstpo)
48 | {
49 | $result = DB::table('staff_positions_entries')
50 | ->select('staff_positions_entries.idsta')
51 | ->where('idstpo', $idstpo)
52 | ->first();
53 |
54 | if ($result !== NULL)
55 | throw new Exception(Lang::get('aroaden.staff_positions_delete_warning'));
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/app/Models/User.php:
--------------------------------------------------------------------------------
1 | orderBy('username', 'ASC')
22 | ->get();
23 | }
24 |
25 | public static function CheckIfExists($username)
26 | {
27 | return DB::table('users')
28 | ->where('username', $username)
29 | ->exists();
30 | }
31 |
32 | public static function CheckIfExistsOnUpdate($id, $username)
33 | {
34 | $exists = DB::table('users')
35 | ->where('uid', '!=', $id)
36 | ->where('username', $username)
37 | ->first();
38 |
39 | if ( isset($exists) )
40 | return true;
41 |
42 | return false;
43 | }
44 |
45 | public function getRememberToken()
46 | {
47 | return null; // not supported
48 | }
49 |
50 | public function setRememberToken($value)
51 | {}
52 |
53 | public function getRememberTokenName()
54 | {
55 | return null; // not supported
56 | }
57 |
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'pusher'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Broadcast Connections
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may define all of the broadcast connections that will be used
24 | | to broadcast events to other systems or over websockets. Samples of
25 | | each available type of connection are provided inside this array.
26 | |
27 | */
28 |
29 | 'connections' => [
30 |
31 | 'pusher' => [
32 | 'driver' => 'pusher',
33 | 'key' => env('PUSHER_KEY'),
34 | 'secret' => env('PUSHER_SECRET'),
35 | 'app_id' => env('PUSHER_APP_ID'),
36 | 'options' => [
37 | //
38 | ],
39 | ],
40 |
41 | 'redis' => [
42 | 'driver' => 'redis',
43 | 'connection' => 'default',
44 | ],
45 |
46 | 'log' => [
47 | 'driver' => 'log',
48 | ],
49 |
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Libs/PdfLib.php:
--------------------------------------------------------------------------------
1 | 'UTF-8',
17 | 'font' => "Helvetica",
18 | 'fontSize' => 8,
19 | 'fontColor' => array(.25, .25, .25),
20 | 'co_x' => 50,
21 | 'co_y' => '',
22 | 'msg' => ''
23 | ];
24 |
25 | public function __construct($pdfData, $pdfName)
26 | {
27 | if (empty($pdfData))
28 | throw new Exception("Error pdfData");
29 |
30 | if (empty($pdfName))
31 | throw new Exception("Error pdfName");
32 |
33 | $this->pdfData = $pdfData;
34 | $this->pdfName = html_entity_decode($pdfName);
35 | $this->options['msg'] = Lang::get('aroaden.page_from_to', ['from' => "{PAGE_NUM}", 'to' => "{PAGE_COUNT}"]);
36 | $this->options['co_y'] = self::A4_HEIGHT - 35;
37 | }
38 |
39 | public function downloadPdf()
40 | {
41 | $this->renderPdf();
42 |
43 | return $this->pdfObj->download($this->pdfName);
44 | }
45 |
46 | private function renderPdf()
47 | {
48 | $this->pdfObj = PDF::loadHTML($this->pdfData, $this->options['charset']);
49 | $dom_pdf = $this->pdfObj->getDomPDF();
50 | $canvas = $dom_pdf->get_canvas();
51 |
52 | $canvas->page_text(
53 | $this->options['co_x'],
54 | $this->options['co_y'],
55 | $this->options['msg'],
56 | $this->options['font'],
57 | $this->options['fontSize'],
58 | $this->options['fontColor']
59 | );
60 | }
61 |
62 | }
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/LoginController.php:
--------------------------------------------------------------------------------
1 | checkIfUserExists();
41 |
42 | $this->middleware('guest', ['except' => 'logout']);
43 | }
44 |
45 | public function logout()
46 | {
47 | Auth::logout();
48 |
49 | return redirect($this->loginPath);
50 | }
51 |
52 | public function username()
53 | {
54 | return 'username';
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 | [
16 | \App\Http\Middleware\EncryptCookies::class,
17 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
18 | \Illuminate\Session\Middleware\StartSession::class,
19 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
20 | \App\Http\Middleware\VerifyCsrfToken::class,
21 | \Illuminate\Routing\Middleware\SubstituteBindings::class
22 | ],
23 | 'api' => [
24 | 'throttle:60,1',
25 | 'bindings'
26 | ],
27 | 'auth' => [
28 | \App\Http\Middleware\Authenticate::class
29 | ],
30 | 'admin' => [
31 | \App\Http\Middleware\AdminMiddleware::class
32 | ],
33 | 'normal' => [
34 | \App\Http\Middleware\NormalMiddleware::class
35 | ]
36 | ];
37 |
38 | protected $routeMiddleware = [
39 | 'auth' => \App\Http\Middleware\Authenticate::class,
40 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
41 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
42 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
43 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class
44 | ];
45 | }
46 |
--------------------------------------------------------------------------------
/app/Models/StaffPositionsEntries.php:
--------------------------------------------------------------------------------
1 | belongsTo('App\Models\Staff');
21 | }
22 |
23 | public function staffPositions()
24 | {
25 | return $this->belongsTo('App\Models\StaffPositions');
26 | }
27 |
28 | public static function AllByStaffId($idsta)
29 | {
30 | $result = DB::table('staff_positions_entries')
31 | ->select('staff_positions_entries.idstpo')
32 | ->where('staff_positions_entries.idsta', $idsta)
33 | ->orderBy('staff_positions_entries.idstpo','DESC')
34 | ->get();
35 |
36 | return $result->toArray();
37 | }
38 |
39 | public static function AllByStaffIdWithName($id)
40 | {
41 | $result = DB::table('staff_positions_entries')
42 | ->join('staff_positions','staff_positions.idstpo','=','staff_positions_entries.idstpo')
43 | ->select('staff_positions.name')
44 | ->where('staff_positions_entries.idsta', $id)
45 | ->orderBy('staff_positions.name','ASC')
46 | ->get();
47 |
48 | return $result->toArray();
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/resources/views/services/edit.blade.php:
--------------------------------------------------------------------------------
1 | @include('includes.services_nav')
2 |
3 | @include('includes.messages')
4 |
5 |
6 |
7 |
8 |
9 | {!! @trans('aroaden.edit_service') !!}
10 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/Models/Settings.php:
--------------------------------------------------------------------------------
1 | where('key', $field)
25 | ->first();
26 | }
27 |
28 | public static function getArray()
29 | {
30 | $settings = DB::table('settings')
31 | ->select('key', 'value')
32 | ->get();
33 |
34 | $array = [];
35 |
36 | foreach ($settings as $value) {
37 | $array_key = $value->key;
38 | $array_val = $value->value;
39 |
40 | $array[$array_key] = $array_val;
41 | }
42 |
43 | return $array;
44 | }
45 |
46 | public static function getObject()
47 | {
48 | $settings = DB::table('settings')
49 | ->select('key', 'value')
50 | ->get();
51 |
52 | $obj = new StdClass;
53 |
54 | foreach ($settings as $setting) {
55 | $key = $setting->key;
56 | $value = $setting->value;
57 |
58 | $obj->$key = $value;
59 | }
60 |
61 | return $obj;
62 | }
63 |
64 | public function scopeGetCompanyData($query)
65 | {
66 | return $query->select('key', 'value', 'type')
67 | ->where('type', 'company_data')
68 | ->get();
69 | }
70 |
71 | }
--------------------------------------------------------------------------------
/resources/views/appointments/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('content')
4 |
5 | @include('includes.patients_nav')
6 |
7 | @include('includes.messages')
8 |
9 |
10 | @include('form_fields.show.name')
11 |
12 |
13 |
14 |
15 |
16 |
17 | {!! @trans('aroaden.edit_appointment') !!}
18 |
19 |
20 | @include('form_fields.fields.opendiv')
21 | @include('form_fields.fields.openform')
22 |
23 | @include('form_fields.common_alternative')
24 |
25 | @include('form_fields.fields.closeform')
26 | @include('form_fields.fields.closediv')
27 |
28 |
29 |
30 |
31 | @endsection
32 |
33 | @section('footer_script')
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | @endsection
--------------------------------------------------------------------------------
/resources/views/appointments/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('content')
4 |
5 | @include('includes.patients_nav')
6 |
7 | @include('includes.messages')
8 |
9 |
10 | @include('form_fields.show.name')
11 |
12 |
13 |
14 |
15 |
16 |
17 | {!! @trans('aroaden.create_appointment') !!}
18 |
19 |
20 | @include('form_fields.fields.opendiv')
21 | @include('form_fields.fields.openform')
22 |
23 |
24 |
25 | @include('form_fields.common_alternative')
26 |
27 | @include('form_fields.fields.closeform')
28 | @include('form_fields.fields.closediv')
29 |
30 |
31 |
32 |
33 | @endsection
34 |
35 | @section('footer_script')
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | @endsection
--------------------------------------------------------------------------------
/database/seeds/BudgetsSeeder.php:
--------------------------------------------------------------------------------
1 | numberBetween($min = 3, $max = 6);
16 | $num_budgets = 400;
17 |
18 | $patients = DB::table('patients')->pluck('idpat')->toArray();
19 | $services = DB::table('services')->pluck('idser')->toArray();
20 |
21 | foreach (range(1, $num_budgets) as $index) {
22 |
23 | $patkey = array_rand($patients);
24 | $idpat = $patients[$patkey];
25 |
26 | $uniqid = uniqid();
27 | $created_at = $faker->dateTimeBetween($startDate = '-30 days', $endDate = '+90 days');
28 |
29 | foreach (range(1, $num) as $index) {
30 |
31 | $serkey = array_rand($services);
32 | $idser = $services[$serkey];
33 |
34 | $servi = DB::table('services')->where('idser', $idser)->first();
35 |
36 | $units = $faker->numberBetween($min = 1, $max = 4);
37 |
38 | $exists = DB::table('budgets')
39 | ->where('idpat', $idpat)
40 | ->where('idser', $idser)
41 | ->where('uniqid', $uniqid)
42 | ->exists();
43 |
44 | if ($exists)
45 | continue;
46 |
47 | DB::table('budgets')->insert([
48 | 'idpat' => $idpat,
49 | 'idser' => $idser,
50 | 'price' => $servi->price,
51 | 'tax' => $servi->tax,
52 | 'units' => $units,
53 | 'uniqid' => $uniqid,
54 | 'created_at' => $created_at
55 | ]);
56 |
57 | }
58 |
59 | }
60 |
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/staff.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ @trans('aroaden.staff') }}
5 |
6 |
7 |
8 |
9 |
10 | {{ Lang::get('aroaden.none') }}
11 |
12 | @if ($is_create_view)
13 |
14 | @foreach($staff as $sta)
15 |
16 | positions == '') {
18 |
19 | $positions = '';
20 |
21 | } else {
22 |
23 | $positions = '('.$sta->positions.')';
24 |
25 | }
26 | ?>
27 |
28 | {{ $sta->surname }}, {{ $sta->name }} {{ $positions }}
29 |
30 | @endforeach
31 |
32 | @else
33 |
34 |
37 |
38 | @foreach($staff as $sta)
39 |
40 | positions == '') {
42 |
43 | $positions = '';
44 |
45 | } else {
46 |
47 | $positions = '('.$sta->positions.')';
48 |
49 | }
50 | ?>
51 |
52 | @if(in_array($sta->idsta, $idsta_array))
53 |
54 |
55 | {{ $sta->surname }}, {{ $sta->name }} {{ $positions }}
56 |
57 |
58 | @else
59 |
60 |
61 | {{ $sta->surname }}, {{ $sta->name }} {{ $positions }}
62 |
63 |
64 | @endif
65 |
66 | @endforeach
67 |
68 | @endif
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
32 |
33 | $status = $kernel->handle(
34 | $input = new Symfony\Component\Console\Input\ArgvInput,
35 | new Symfony\Component\Console\Output\ConsoleOutput
36 | );
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Shutdown The Application
41 | |--------------------------------------------------------------------------
42 | |
43 | | Once Artisan has finished running. We will fire off the shutdown events
44 | | so that any final work may be done by the application before we shut
45 | | down the process. This is the last thing to happen to the request.
46 | |
47 | */
48 |
49 | $kernel->terminate($input, $status);
50 |
51 | exit($status);
52 |
--------------------------------------------------------------------------------
/resources/views/test.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | @section('head')
5 |
6 | AroaDen
7 |
8 |
9 | @show
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | @section('content')
19 |
20 |
21 |
22 |
23 |
24 |
session vars
25 |
26 | @foreach ($request->session()->all() as $key => $value)
27 |
28 | @if (is_array($key) )
29 |
30 | @foreach ($key as $key => $value)
31 |
32 |
33 | {{ $key }} -- {{ $value }}
34 |
35 |
36 |
37 | @endforeach
38 |
39 | @else
40 |
41 |
42 | {{ $key }} -- {{ $value }}
43 |
44 |
45 |
46 | @endif
47 |
48 | @endforeach
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | {{ dd($request) }}
61 |
62 |
63 |
64 |
65 |
66 |
67 | @endsection
68 |
69 |
70 |
71 |
72 | @section('js')
73 |
74 |
75 | @show
76 |
77 |
78 |
--------------------------------------------------------------------------------
/database/seeds/TreatmentsSeeder.php:
--------------------------------------------------------------------------------
1 | pluck('idpat')->toArray();
23 | $services = DB::table('services')->pluck('idser')->toArray();
24 |
25 | foreach (range(1, $num_treatments) as $index) {
26 |
27 | $patkey = array_rand($patients);
28 | $patval = $patients[$patkey];
29 |
30 | $serkey = array_rand($services);
31 | $serval = $services[$serkey];
32 |
33 | $servi = DB::table('services')->where('idser', $serval)->first();
34 |
35 | $units = $faker->numberBetween($min = 1, $max = 4);
36 | $paid = $faker->numberBetween($min = 1, $max = $servi->price * $units);
37 |
38 | DB::table('treatments')->insert([
39 | 'idpat' => $patval,
40 | 'idser' => $serval,
41 | 'price' => $servi->price,
42 | 'units' => $units,
43 | 'paid' => $paid,
44 | 'day' => htmlentities ($faker->dateTimeBetween($startDate = '-30 days', $endDate = '+90 days')->format("Y-m-d"), ENT_QUOTES, "UTF-8"),
45 | 'tax' => $servi->tax
46 | ]);
47 | }
48 |
49 |
50 | $staff = DB::table('staff')->pluck('idsta')->toArray();
51 | $treatments = DB::table('treatments')->pluck('idtre')->toArray();
52 |
53 | foreach (range(1, $num_staff_works) as $index) {
54 |
55 | $stakey = array_rand($staff);
56 | $staval = $staff[$stakey];
57 |
58 | $treakey = array_rand($treatments);
59 | $treaval = $treatments[$treakey];
60 |
61 | DB::table('staff_works')->insert([
62 | 'idsta' => $staval,
63 | 'idtre' => $treaval
64 | ]);
65 | }
66 |
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | /*
11 | |--------------------------------------------------------------------------
12 | | Register The Auto Loader
13 | |--------------------------------------------------------------------------
14 | |
15 | | Composer provides a convenient, automatically generated class loader for
16 | | our application. We just need to utilize it! We'll simply require it
17 | | into the script here so that we don't have to worry about manual
18 | | loading any of our classes later on. It feels nice to relax.
19 | |
20 | */
21 |
22 | require __DIR__.'/../bootstrap/autoload.php';
23 |
24 | /*
25 | |--------------------------------------------------------------------------
26 | | Turn On The Lights
27 | |--------------------------------------------------------------------------
28 | |
29 | | We need to illuminate PHP development, so let us turn on the lights.
30 | | This bootstraps the framework and gets it ready for use, then it
31 | | will load up this application so that we can run it and send
32 | | the responses back to the browser and delight our users.
33 | |
34 | */
35 |
36 | $app = require_once __DIR__.'/../bootstrap/app.php';
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Run The Application
41 | |--------------------------------------------------------------------------
42 | |
43 | | Once we have the application, we can handle the incoming request
44 | | through the kernel, and send the associated response back to
45 | | the client's browser allowing them to enjoy the creative
46 | | and wonderful application we have prepared for them.
47 | |
48 | */
49 |
50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
51 |
52 | $response = $kernel->handle(
53 | $request = Illuminate\Http\Request::capture()
54 | );
55 |
56 | $response->send();
57 |
58 | $kernel->terminate($request, $response);
59 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapApiRoutes();
39 |
40 | $this->mapWebRoutes();
41 |
42 | //
43 | }
44 |
45 | /**
46 | * Define the "web" routes for the application.
47 | *
48 | * These routes all receive session state, CSRF protection, etc.
49 | *
50 | * @return void
51 | */
52 | protected function mapWebRoutes()
53 | {
54 | Route::group([
55 | 'middleware' => 'web',
56 | 'namespace' => $this->namespace,
57 | ], function ($router) {
58 | require base_path('routes/web.php');
59 | });
60 | }
61 |
62 | /**
63 | * Define the "api" routes for the application.
64 | *
65 | * These routes are typically stateless.
66 | *
67 | * @return void
68 | */
69 | protected function mapApiRoutes()
70 | {
71 | Route::group([
72 | 'middleware' => 'api',
73 | 'namespace' => $this->namespace,
74 | 'prefix' => 'api',
75 | ], function ($router) {
76 | require base_path('routes/api.php');
77 | });
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "laravel/laravel",
3 | "description": "The Laravel Framework.",
4 | "keywords": ["framework", "laravel"],
5 | "license": "MIT",
6 | "type": "project",
7 | "require": {
8 | "php": ">=5.5.9",
9 | "laravel/framework": "5.5.*",
10 | "nesbot/carbon": "^1.21",
11 | "laravelcollective/html": "5.5.*",
12 | "intervention/image": "^2.3",
13 | "doctrine/dbal": "^2.5",
14 | "barryvdh/laravel-dompdf": "^0.8.6"
15 | },
16 | "require-dev": {
17 | "fzaninotto/faker": "~1.4",
18 | "mockery/mockery": "0.9.*",
19 | "phpunit/phpunit": "~4.0",
20 | "symfony/css-selector": "3.1.*",
21 | "symfony/dom-crawler": "3.1.*",
22 | "filp/whoops": "~2.0",
23 | "barryvdh/laravel-debugbar": "^3.2"
24 | },
25 | "autoload": {
26 | "classmap": [
27 | "database"
28 | ],
29 | "psr-4": {
30 | "App\\": "app/"
31 | },
32 | "files": [
33 | "app/functions/other.php"
34 | ]
35 | },
36 | "autoload-dev": {
37 | "classmap": [
38 | "tests/TestCase.php"
39 | ]
40 | },
41 | "scripts": {
42 | "post-root-package-install": [
43 | "php -r \"copy('.env.example', '.env');\""
44 | ],
45 | "post-create-project-cmd": [
46 | "php artisan key:generate"
47 | ],
48 | "post-install-cmd": [
49 | "php artisan clear-compiled",
50 | "php artisan optimize"
51 | ],
52 | "pre-update-cmd": [
53 | "php artisan clear-compiled"
54 | ],
55 | "post-update-cmd": [
56 | "php artisan optimize"
57 | ],
58 | "post-autoload-dump": [
59 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
60 | "@php artisan package:discover"
61 | ]
62 | },
63 | "config": {
64 | "preferred-install": "dist"
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/resources/views/staff/common.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('content')
4 |
5 | @include('includes.staff_nav')
6 |
7 | @include('includes.messages')
8 |
9 |
10 |
11 |
12 |
13 | {!! $misc_text !!}
14 |
15 |
16 | @include('form_fields.common')
17 |
18 |
19 |
20 |
21 | @endsection
22 |
23 | @section('footer_script')
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
54 |
55 | @endsection
56 |
57 |
58 |
--------------------------------------------------------------------------------
/resources/views/patients/record.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('content')
4 |
5 | @include('includes.patients_nav')
6 |
7 | @include('includes.messages')
8 |
9 |
10 | @include('form_fields.show.name')
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
{!! @trans('aroaden.medical_record') !!}
36 |
37 |
{!! nl2br(e($record->medical_record)) !!}
38 |
39 |
40 |
41 |
42 |
{!! @trans('aroaden.diseases') !!}
43 |
44 |
{!! nl2br(e($record->diseases)) !!}
45 |
46 |
47 |
48 |
49 |
{!! @trans('aroaden.medicines') !!}
50 |
51 |
{!! nl2br(e($record->medicines)) !!}
52 |
53 |
54 |
55 |
56 |
{!! @trans('aroaden.allergies') !!}
57 |
58 |
{!! nl2br(e($record->allergies)) !!}
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | @endsection
--------------------------------------------------------------------------------
/app/Http/Controllers/Traits/DefaultTrait.php:
--------------------------------------------------------------------------------
1 | first();
25 |
26 | if ($exits == null) {
27 |
28 | User::insert([
29 | 'username' => $user["username"],
30 | 'password' => bcrypt($user["password"]),
31 | 'type' => $user["type"],
32 | 'full_name' => $user["full_name"]
33 | ]);
34 |
35 | }
36 |
37 | }
38 |
39 | return redirect("/login");
40 | }
41 |
42 | /**
43 | * check If Setting Exists
44 | *
45 | * @return object
46 | */
47 | public function createDefaultCompanyData()
48 | {
49 | $settings_fields = $this->config['settings_fields'];
50 |
51 | foreach ($settings_fields as $field) {
52 | $exits = Settings::getValueByKey($field['name']);
53 |
54 | if ($exits == null) {
55 | Settings::insert([
56 | 'key' => $field['name'],
57 | 'value' => '',
58 | 'type' => $field['settting_type']
59 | ]);
60 | }
61 | }
62 |
63 | if (env('REDIS_SERVER_IS_ON')) {
64 | $exists = Redis::exists('settings');
65 |
66 | if (!$exists) {
67 | $settings = Settings::getArray();
68 |
69 | Redis::set('settings', json_encode($settings));
70 | }
71 | }
72 | }
73 |
74 | /**
75 | * create Symlinks
76 | *
77 | * @return object
78 | */
79 | public function createSymlinks()
80 | {
81 | $app_Symlink = public_path('app');
82 | $public_Symlink = storage_path('app/public');
83 |
84 | if(!is_link($app_Symlink))
85 | symlink(storage_path('app'), $app_Symlink);
86 |
87 | if(!is_link($public_Symlink))
88 | symlink(public_path(), $public_Symlink);
89 | }
90 |
91 | }
--------------------------------------------------------------------------------
/resources/views/patients/editRecord.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.main')
2 |
3 | @section('content')
4 |
5 | @include('includes.patients_nav')
6 |
7 | @include('includes.messages')
8 |
9 |
10 | @include('form_fields.show.name')
11 |
12 |
13 |
14 |
15 |
16 |
17 | {!! @trans('aroaden.edit_record') !!}
18 |
19 |
20 |
47 |
48 |
49 |
50 |
51 |
52 | @endsection
53 |
54 | @section('js')
55 | @parent
56 |
57 |
58 |
59 |
60 |
61 | @endsection
--------------------------------------------------------------------------------
/resources/views/form_fields/fields/upload_photo.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
30 |
31 |
62 |
--------------------------------------------------------------------------------
/resources/views/company/includes/indexInclude.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @include('includes.messages')
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
19 |
20 |
21 |
22 |
23 |
24 | @foreach ($main_loop as $item)
25 |
26 |
31 |
32 | @if ($item['type'] == 'textarea')
33 |
34 |
35 |
40 |
41 | @else
42 |
43 |
44 | {!! @trans($aroaden_item_name) !!}
45 |
46 |
47 |
48 | @endif
49 |
50 | @endforeach
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/database/seeds/servicesSeeder.php:
--------------------------------------------------------------------------------
1 | 'Empaste',
13 | 'price' => '44',
14 | ],
15 | [
16 | 'name' => 'Empaste grande',
17 | 'price' => '55',
18 | ],
19 | [
20 | 'name' => 'Empaste pequeño',
21 | 'price' => '33',
22 | ],
23 | [
24 | 'name' => 'Cirugía',
25 | 'price' => '622',
26 | ],
27 | [
28 | 'name' => 'Extracción de pieza',
29 | 'price' => '111',
30 | ],
31 | [
32 | 'name' => 'Implante',
33 | 'price' => '1222',
34 | ],
35 | [
36 | 'name' => 'Odontopediatría',
37 | 'price' => '233',
38 | ],
39 | [
40 | 'name' => 'Periodoncia',
41 | 'price' => '244',
42 | ],
43 | [
44 | 'name' => 'Prótesis',
45 | 'price' => '543',
46 | ],
47 | [
48 | 'name' => 'Bruxismo',
49 | 'price' => '123',
50 | ],
51 | [
52 | 'name' => 'Endodoncia',
53 | 'price' => '333',
54 | ],
55 | [
56 | 'name' => 'Endodoncia compleja',
57 | 'price' => '444',
58 | ],
59 | [
60 | 'name' => 'Ortodoncia',
61 | 'price' => '222',
62 | ],
63 | [
64 | 'name' => 'Ortodoncia compleja',
65 | 'price' => '44',
66 | ],
67 | [
68 | 'name' => 'Limpieza',
69 | 'price' => '55',
70 | ]
71 | ];
72 |
73 | $tax = [0, 4, 10, 21];
74 |
75 | foreach ($array as $arr) {
76 |
77 | $k = array_rand($tax);
78 | $v = $tax[$k];
79 |
80 | DB::table('services')->insert([
81 | 'name' => htmlentities ($arr['name'], ENT_QUOTES, "UTF-8"),
82 | 'price' => htmlentities ($arr['price'], ENT_QUOTES, "UTF-8"),
83 | 'tax' => $v,
84 | ]);
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/resources/views/company/edit.blade.php:
--------------------------------------------------------------------------------
1 |
2 | @include('includes.messages')
3 |
4 |
5 |
6 | {!! @trans('aroaden.company_edit_data') !!}
7 |
8 |
9 |
10 |
11 |
12 |
13 | @foreach ($main_loop as $item)
14 |
15 |
20 |
21 | @if ($item['type'] == 'text' || $item['type'] == 'email')
22 |
23 |
24 | {!! @trans($aroaden_item_name) !!}
25 |
31 |
32 |
33 | @elseif ($item['type'] == 'textarea')
34 |
35 |
36 | {!! @trans($aroaden_item_name) !!}
37 | {!! $obj->$item_name !!}
38 |
39 |
40 |
41 | @endif
42 |
43 | @endforeach
44 |
45 | @include('includes.submit_button')
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Cache Stores
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may define all of the cache "stores" for your application as
24 | | well as their drivers. You may even define multiple stores for the
25 | | same cache driver to group types of items stored in your caches.
26 | |
27 | */
28 |
29 | 'stores' => [
30 |
31 | 'apc' => [
32 | 'driver' => 'apc',
33 | ],
34 |
35 | 'array' => [
36 | 'driver' => 'array',
37 | ],
38 |
39 | 'database' => [
40 | 'driver' => 'database',
41 | 'table' => 'cache',
42 | 'connection' => null,
43 | ],
44 |
45 | 'file' => [
46 | 'driver' => 'file',
47 | 'path' => storage_path('framework/cache'),
48 | ],
49 |
50 | 'memcached' => [
51 | 'driver' => 'memcached',
52 | 'servers' => [
53 | [
54 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
55 | 'port' => env('MEMCACHED_PORT', 11211),
56 | 'weight' => 100,
57 | ],
58 | ],
59 | ],
60 |
61 | 'redis' => [
62 | 'driver' => 'redis',
63 | 'connection' => 'default',
64 | ],
65 |
66 | ],
67 |
68 | /*
69 | |--------------------------------------------------------------------------
70 | | Cache Key Prefix
71 | |--------------------------------------------------------------------------
72 | |
73 | | When utilizing a RAM based store such as APC or Memcached, there might
74 | | be other applications utilizing the same cache. So, we'll specify a
75 | | value to get prefixed to all our keys so we can avoid collisions.
76 | |
77 | */
78 |
79 | 'prefix' => 'laravel',
80 |
81 | ];
82 |
--------------------------------------------------------------------------------
/resources/views/includes/tables/table_items.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {!! @trans("aroaden.treatment") !!}
5 |
6 | @if (isset($has_date))
7 | {!! @trans("aroaden.date") !!}
8 | @endif
9 |
10 | {!! @trans("aroaden.units") !!}
11 | {!! @trans("aroaden.price_no_tax") !!}
12 | {!! @trans("aroaden.tax") !!}
13 | {!! @trans("aroaden.amount") !!}
14 |
15 |
16 | @foreach ($items as $item)
17 |
18 |
19 | {!! $item->name !!}
20 |
21 | @if (isset($has_date))
22 | {!! date ('d-m-Y', strtotime ($item->day) ) !!}
23 | @endif
24 |
25 | {!! $item->units !!}
26 | {!! numformat($item->price) !!} {{ $_SESSION["Alocale"]["currency_symbol"] }}
27 | {!! $item->tax !!} %
28 |
29 | @php
30 | $price = calcTotal($item->price, $item->tax, false);
31 | $total = $item->units * $price;
32 |
33 | if (empty($total_amount))
34 | $total_amount = 0;
35 |
36 | $total_amount = $total_amount + $total;
37 | @endphp
38 |
39 | {!! numformat($total) !!} {{ $_SESSION["Alocale"]["currency_symbol"] }}
40 |
41 |
42 | @endforeach
43 |
44 |
45 |
46 |
47 | @if (isset($has_date))
48 |
49 | @endif
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | @if (isset($has_date))
61 |
62 | @endif
63 |
64 |
65 |
66 | {!! @trans("aroaden.total_amount") !!}
67 | {{ numformat($total_amount) }} {{ $_SESSION["Alocale"]["currency_symbol"] }}
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------