Wyjazdy - naprawa wczytywania dat przy edycji, placeholdera przy opisie

This commit is contained in:
czup 2020-01-13 04:34:20 +01:00
parent cc4d87178e
commit ecb5ab78fe
12 changed files with 61022 additions and 39 deletions

View File

@ -3,6 +3,7 @@
namespace App;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class operations extends Model
{
@ -10,4 +11,8 @@ class operations extends Model
protected $primaryKey = 'id';
protected $fillable = ['fireStationID', 'operationDate', 'location', 'target', 'dangerType', 'description', 'commanderID'];
public function getFromOperationsAttribute($value){
return \Carbon\Carbon::parse($value)->format('d-m-Y');
}
}

View File

@ -12,7 +12,8 @@
"codedge/laravel-fpdf": "^1.5",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0"
"laravel/tinker": "^1.0",
"twbs/bootstrap": "4.4.1"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",

53
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "3a500ef87d1fd5d10023d93966f07114",
"content-hash": "011fdaa7e037ee2376644be6d63383e1",
"packages": [
{
"name": "codedge/laravel-fpdf",
@ -3697,6 +3697,57 @@
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
"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",
"version": "v2.6.1",

View File

@ -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');
}
}

View File

@ -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) {
//
});
}
}

View File

@ -20,6 +20,10 @@
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"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

File diff suppressed because one or more lines are too long

49495
public/js/app.js vendored

File diff suppressed because one or more lines are too long

4
public/mix-manifest.json Normal file
View File

@ -0,0 +1,4 @@
{
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css"
}

View File

@ -5,11 +5,12 @@
<title>E-OSP</title>
<link rel="stylesheet" href="{{ asset('css/theme.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://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="js/app.js"></script>.
{{-- <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>--}}

View File

@ -16,7 +16,7 @@
{{ csrf_field() }}
<div class="form-group">
<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 class="form-group">
@ -36,7 +36,7 @@
<div class="form-group">
<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 class=form-group">

View File

@ -18,7 +18,7 @@
<input type="hidden" class="form-control" name="operationID" value="{{ $operation->id }}">
<div class="form-group">
<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 class="form-group">
@ -103,6 +103,8 @@
<script>
$(document).ready(function(){
{{--document.getElementById("operationDate").defaultValue = "{{\Carbon\Carbon::parse($operation->operationDate)->format('d.m.Y H:i')}}";--}}
var count = 1;
dynamic_field(count);