Wyjazdy - naprawa wczytywania dat przy edycji, placeholdera przy opisie
This commit is contained in:
parent
cc4d87178e
commit
ecb5ab78fe
@ -3,6 +3,7 @@
|
|||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class operations extends Model
|
class operations extends Model
|
||||||
{
|
{
|
||||||
@ -10,4 +11,8 @@ class operations extends Model
|
|||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
|
|
||||||
protected $fillable = ['fireStationID', 'operationDate', 'location', 'target', 'dangerType', 'description', 'commanderID'];
|
protected $fillable = ['fireStationID', 'operationDate', 'location', 'target', 'dangerType', 'description', 'commanderID'];
|
||||||
|
|
||||||
|
public function getFromOperationsAttribute($value){
|
||||||
|
return \Carbon\Carbon::parse($value)->format('d-m-Y');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
"codedge/laravel-fpdf": "^1.5",
|
"codedge/laravel-fpdf": "^1.5",
|
||||||
"fideloper/proxy": "^4.0",
|
"fideloper/proxy": "^4.0",
|
||||||
"laravel/framework": "5.7.*",
|
"laravel/framework": "5.7.*",
|
||||||
"laravel/tinker": "^1.0"
|
"laravel/tinker": "^1.0",
|
||||||
|
"twbs/bootstrap": "4.4.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"beyondcode/laravel-dump-server": "^1.0",
|
"beyondcode/laravel-dump-server": "^1.0",
|
||||||
|
53
composer.lock
generated
53
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "3a500ef87d1fd5d10023d93966f07114",
|
"content-hash": "011fdaa7e037ee2376644be6d63383e1",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "codedge/laravel-fpdf",
|
"name": "codedge/laravel-fpdf",
|
||||||
@ -3697,6 +3697,57 @@
|
|||||||
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
|
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
|
||||||
"time": "2019-10-24T08:53:34+00:00"
|
"time": "2019-10-24T08:53:34+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "twbs/bootstrap",
|
||||||
|
"version": "v4.4.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/twbs/bootstrap.git",
|
||||||
|
"reference": "dca1ab7d877bc4b664b43604657a2b5fbe2b4ecb"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/dca1ab7d877bc4b664b43604657a2b5fbe2b4ecb",
|
||||||
|
"reference": "dca1ab7d877bc4b664b43604657a2b5fbe2b4ecb",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"replace": {
|
||||||
|
"twitter/bootstrap": "self.version"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.3.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Mark Otto",
|
||||||
|
"email": "markdotto@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jacob Thornton",
|
||||||
|
"email": "jacobthornton@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
|
||||||
|
"homepage": "https://getbootstrap.com/",
|
||||||
|
"keywords": [
|
||||||
|
"JS",
|
||||||
|
"css",
|
||||||
|
"framework",
|
||||||
|
"front-end",
|
||||||
|
"mobile-first",
|
||||||
|
"responsive",
|
||||||
|
"sass",
|
||||||
|
"web"
|
||||||
|
],
|
||||||
|
"time": "2019-11-28T12:59:49+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "vlucas/phpdotenv",
|
"name": "vlucas/phpdotenv",
|
||||||
"version": "v2.6.1",
|
"version": "v2.6.1",
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class addSoftDeletes_to_vechiles extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('vehicles', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
$table->softDeletes();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('vehicles');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class AddStatusToVehiclesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('vehicles', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
$table->integer('status')->default('0');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('vehicles', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run development",
|
"dev": "npm run development",
|
||||||
@ -20,6 +20,10 @@
|
|||||||
"resolve-url-loader": "^2.3.1",
|
"resolve-url-loader": "^2.3.1",
|
||||||
"sass": "^1.15.2",
|
"sass": "^1.15.2",
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
"vue": "^2.5.17"
|
"vue": "^2.5.17",
|
||||||
|
"vue-template-compiler": "^2.6.11"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"mtr-datepicker": "^0.3.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
11365
public/css/app.css
vendored
11365
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
49495
public/js/app.js
vendored
49495
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
4
public/mix-manifest.json
Normal file
4
public/mix-manifest.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"/js/app.js": "/js/app.js",
|
||||||
|
"/css/app.css": "/css/app.css"
|
||||||
|
}
|
@ -5,11 +5,12 @@
|
|||||||
<title>E-OSP</title>
|
<title>E-OSP</title>
|
||||||
<link rel="stylesheet" href="{{ asset('css/theme.css') }}">
|
<link rel="stylesheet" href="{{ asset('css/theme.css') }}">
|
||||||
<link rel="stylesheet" href="{{asset('css/app.css')}}">
|
<link rel="stylesheet" href="{{asset('css/app.css')}}">
|
||||||
|
|
||||||
{{-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">--}}
|
{{-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">--}}
|
||||||
|
|
||||||
|
<script src="js/app.js"></script>.
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" />
|
{{-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" />--}}
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
|
{{-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>--}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="date">Data wyjazdu: </label>
|
<label for="date">Data wyjazdu: </label>
|
||||||
<input type="datetime-local" id="operationDate" name="operationDate" value="2017-06-01 08:30">
|
<input type="datetime-local" id="operationDate" name="operationDate" value="1985-04-12T23:20">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="location">Opis akcji:</label>
|
<label for="location">Opis akcji:</label>
|
||||||
<textarea class="form-control" id="'operationDescription" name="operationDescription">Enter text here...</textarea>
|
<textarea class="form-control" id="'operationDescription" name="operationDescription" placeholder="Opis akcji..."></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=form-group">
|
<div class=form-group">
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
<input type="hidden" class="form-control" name="operationID" value="{{ $operation->id }}">
|
<input type="hidden" class="form-control" name="operationID" value="{{ $operation->id }}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="date">Data wyjazdu: </label>
|
<label for="date">Data wyjazdu: </label>
|
||||||
<input type="datetime-local" id="operationDate" name="operationDate" value="{{$operation->operationDate}}">
|
<input type="datetime-local" id="operationDate" name="operationDate" value="{{ \Carbon\Carbon::parse($operation->operationDate)->format('Y-m-d\TH:i') }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="location">Miejsce akcji:</label>
|
<label for="location">Miejsce akcji:</label>
|
||||||
<input type="text" class="form-control" id="operationLocation" name="operationLocation" value="{{ $operation->location }}">
|
<input type="text" class="form-control" id="operationLocation" name="operationLocation" value="{{ $operation->location}}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -103,6 +103,8 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
|
||||||
|
{{--document.getElementById("operationDate").defaultValue = "{{\Carbon\Carbon::parse($operation->operationDate)->format('d.m.Y H:i')}}";--}}
|
||||||
var count = 1;
|
var count = 1;
|
||||||
|
|
||||||
dynamic_field(count);
|
dynamic_field(count);
|
||||||
|
Loading…
Reference in New Issue
Block a user