diff --git a/composer.json b/composer.json index 288ed38..12b355e 100644 --- a/composer.json +++ b/composer.json @@ -12,14 +12,9 @@ "intervention/image": "^2.4", "laravel/framework": "5.6.*", "laravel/tinker": "^1.0", -<<<<<<< HEAD - "tymon/jwt-auth": "dev-develop", - "doctrine/dbal": "v2.7.1" -======= "santigarcor/laratrust": "5.0.*", "tymon/jwt-auth": "1.0.*", "zizaco/entrust": "5.2.x-dev" ->>>>>>> 3ad7a029f4a10a5defe390df0a13ea39f0a4914d }, "require-dev": { "filp/whoops": "^2.0", diff --git a/composer.lock b/composer.lock index 87f9e42..e477e1e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,24 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], -<<<<<<< HEAD - "content-hash": "49f978b7574d31a469e10acfa0a6e0b1", -======= - "content-hash": "cede893a42c764bea70b46adc91247ad", ->>>>>>> 3ad7a029f4a10a5defe390df0a13ea39f0a4914d + "content-hash": "9cdc384d6b45ecbec44474bb9968cc62", "packages": [ { "name": "aloha/twilio", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/aloha/laravel-twilio.git", - "reference": "0fd74d541116b0641f815bb59b8323cfe1d6004f" + "reference": "d35828313b7c2340007cd859b312210bb136ae6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aloha/laravel-twilio/zipball/0fd74d541116b0641f815bb59b8323cfe1d6004f", - "reference": "0fd74d541116b0641f815bb59b8323cfe1d6004f", + "url": "https://api.github.com/repos/aloha/laravel-twilio/zipball/d35828313b7c2340007cd859b312210bb136ae6d", + "reference": "d35828313b7c2340007cd859b312210bb136ae6d", "shasum": "" }, "require": { @@ -72,7 +68,7 @@ "sms", "twilio" ], - "time": "2018-04-23T14:59:03+00:00" + "time": "2018-05-03T16:14:04+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -858,16 +854,16 @@ }, { "name": "intervention/image", - "version": "2.4.1", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/Intervention/image.git", - "reference": "3603dbcc9a17d307533473246a6c58c31cf17919" + "reference": "e82d274f786e3d4b866a59b173f42e716f0783eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Intervention/image/zipball/3603dbcc9a17d307533473246a6c58c31cf17919", - "reference": "3603dbcc9a17d307533473246a6c58c31cf17919", + "url": "https://api.github.com/repos/Intervention/image/zipball/e82d274f786e3d4b866a59b173f42e716f0783eb", + "reference": "e82d274f786e3d4b866a59b173f42e716f0783eb", "shasum": "" }, "require": { @@ -887,7 +883,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "2.4-dev" }, "laravel": { "providers": [ @@ -924,7 +920,7 @@ "thumbnail", "watermark" ], - "time": "2017-09-21T16:29:17+00:00" + "time": "2018-05-29T14:19:03+00:00" }, { "name": "jakub-onderka/php-console-color", @@ -2167,7 +2163,7 @@ }, { "name": "symfony/console", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", @@ -2235,7 +2231,7 @@ }, { "name": "symfony/css-selector", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -2288,7 +2284,7 @@ }, { "name": "symfony/debug", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", @@ -2344,7 +2340,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -2407,7 +2403,7 @@ }, { "name": "symfony/finder", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -2456,16 +2452,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "39f2b7c681fa6c323e43b8e30ccb6e714e7d2f00" + "reference": "277b757a2d3960170d99d372e171a8a18916467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/39f2b7c681fa6c323e43b8e30ccb6e714e7d2f00", - "reference": "39f2b7c681fa6c323e43b8e30ccb6e714e7d2f00", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/277b757a2d3960170d99d372e171a8a18916467a", + "reference": "277b757a2d3960170d99d372e171a8a18916467a", "shasum": "" }, "require": { @@ -2505,20 +2501,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-05-16T09:05:32+00:00" + "time": "2018-05-25T11:08:56+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "aeae9c66976daf8a33c7be7c5e6314b39092b1b0" + "reference": "450a1bda817f2dce25a9e13f0f011336743f2a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aeae9c66976daf8a33c7be7c5e6314b39092b1b0", - "reference": "aeae9c66976daf8a33c7be7c5e6314b39092b1b0", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/450a1bda817f2dce25a9e13f0f011336743f2a48", + "reference": "450a1bda817f2dce25a9e13f0f011336743f2a48", "shasum": "" }, "require": { @@ -2592,7 +2588,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-05-21T14:02:31+00:00" + "time": "2018-05-25T13:32:52+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2873,7 +2869,7 @@ }, { "name": "symfony/process", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -2922,7 +2918,7 @@ }, { "name": "symfony/routing", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", @@ -3000,7 +2996,7 @@ }, { "name": "symfony/translation", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", @@ -3068,7 +3064,7 @@ }, { "name": "symfony/var-dumper", - "version": "v4.0.10", + "version": "v4.0.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", @@ -3184,16 +3180,16 @@ }, { "name": "twilio/sdk", - "version": "5.17.1", + "version": "5.19.2", "source": { "type": "git", "url": "https://github.com/twilio/twilio-php.git", - "reference": "ae3477ccf88a0efb5bbe8928274c4a2046aec0c1" + "reference": "4c49815bba498d61ae4ade03ef31863b9b389b6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twilio/twilio-php/zipball/ae3477ccf88a0efb5bbe8928274c4a2046aec0c1", - "reference": "ae3477ccf88a0efb5bbe8928274c4a2046aec0c1", + "url": "https://api.github.com/repos/twilio/twilio-php/zipball/4c49815bba498d61ae4ade03ef31863b9b389b6d", + "reference": "4c49815bba498d61ae4ade03ef31863b9b389b6d", "shasum": "" }, "require": { @@ -3226,7 +3222,7 @@ "sms", "twilio" ], - "time": "2018-04-20T23:40:08+00:00" + "time": "2018-05-25T16:20:50+00:00" }, { "name": "tymon/jwt-auth", @@ -3234,21 +3230,12 @@ "source": { "type": "git", "url": "https://github.com/tymondesigns/jwt-auth.git", -<<<<<<< HEAD - "reference": "481c67b0d95ad14c3f3690bb6ec2a285c2f1ab1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/481c67b0d95ad14c3f3690bb6ec2a285c2f1ab1b", - "reference": "481c67b0d95ad14c3f3690bb6ec2a285c2f1ab1b", -======= "reference": "d5220f6a84cbb8300f6f2f0f20aa908d072b4e4b" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/d5220f6a84cbb8300f6f2f0f20aa908d072b4e4b", "reference": "d5220f6a84cbb8300f6f2f0f20aa908d072b4e4b", ->>>>>>> 3ad7a029f4a10a5defe390df0a13ea39f0a4914d "shasum": "" }, "require": { @@ -3310,11 +3297,7 @@ "jwt", "laravel" ], -<<<<<<< HEAD - "time": "2018-05-16T16:37:21+00:00" -======= "time": "2018-02-07T20:55:14+00:00" ->>>>>>> 3ad7a029f4a10a5defe390df0a13ea39f0a4914d }, { "name": "vlucas/phpdotenv", @@ -3717,25 +3700,28 @@ }, { "name": "myclabs/deep-copy", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + "reference": "478465659fd987669df0bd8a9bf22a8710e5f1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/478465659fd987669df0bd8a9bf22a8710e5f1b6", + "reference": "478465659fd987669df0bd8a9bf22a8710e5f1b6", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { @@ -3758,7 +3744,7 @@ "object", "object graph" ], - "time": "2017-10-19T19:58:43+00:00" + "time": "2018-05-29T17:25:09+00:00" }, { "name": "nunomaduro/collision", @@ -4141,16 +4127,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.0.4", + "version": "6.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca" + "reference": "4cab20a326d14de7575a8e235c70d879b569a57a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/52187754b0eed0b8159f62a6fa30073327e8c2ca", - "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4cab20a326d14de7575a8e235c70d879b569a57a", + "reference": "4cab20a326d14de7575a8e235c70d879b569a57a", "shasum": "" }, "require": { @@ -4200,7 +4186,7 @@ "testing", "xunit" ], - "time": "2018-04-29T14:59:09+00:00" + "time": "2018-05-28T11:49:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4470,16 +4456,16 @@ }, { "name": "phpunit/phpunit-mock-objects", - "version": "6.1.1", + "version": "6.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" + "reference": "f9756fd4f43f014cb2dca98deeaaa8ce5500a36e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", - "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/f9756fd4f43f014cb2dca98deeaaa8ce5500a36e", + "reference": "f9756fd4f43f014cb2dca98deeaaa8ce5500a36e", "shasum": "" }, "require": { @@ -4522,7 +4508,7 @@ "mock", "xunit" ], - "time": "2018-04-11T04:50:36+00:00" + "time": "2018-05-29T13:54:20+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", diff --git a/config/app.php b/config/app.php index 79d7a78..b462b6d 100644 --- a/config/app.php +++ b/config/app.php @@ -211,14 +211,10 @@ return [ 'View' => Illuminate\Support\Facades\View::class, 'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class, 'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class, -<<<<<<< HEAD - 'Image' => Intervention\Image\Facades\Image::class - -======= + 'Image' => Intervention\Image\Facades\Image::class, 'Twilio' => Aloha\Twilio\Support\Laravel\Facade::class, 'Laratrust' => Laratrust\LaratrustFacade::class, 'auth.password.broker' => Illuminate\Auth\Passwords\TokenRepositoryInterface::class ->>>>>>> 3ad7a029f4a10a5defe390df0a13ea39f0a4914d ], ]; diff --git a/database/migrations/2018_05_23_020335_add_nullable_to_warehousearrs_table.php b/database/migrations/2018_05_23_020335_add_nullable_to_warehousearrs_table.php index 7a0b965..3f71ec4 100644 --- a/database/migrations/2018_05_23_020335_add_nullable_to_warehousearrs_table.php +++ b/database/migrations/2018_05_23_020335_add_nullable_to_warehousearrs_table.php @@ -14,21 +14,9 @@ class AddNullableToWarehousearrsTable extends Migration public function up() { Schema::table('warehousearrs', function (Blueprint $table) { - // $table->increments('id'); - - // $table->unsignedInteger('so_id');//FK shipping order id - // $table->foreign('so_id') - // ->references('id')->on('sos') - // ->onDelete('cascade'); - - // $table->date('receive_on'); - // $table->string('transport_company_name'); - // $table->integer('consignment_note_no'); - // $table->integer('warehouse_receive_note_no'); - // $table->string('receiving_person'); - // $table->integer('marking_number'); + $table->string('image')->nullable()->change(); - // $table->timestamps(); + }); } diff --git a/database/migrations/2018_05_23_042125_add_new_column_to_warehouseitems_table.php b/database/migrations/2018_05_23_042125_add_new_column_to_warehouseitems_table.php index ba18648..f0cb9bf 100644 --- a/database/migrations/2018_05_23_042125_add_new_column_to_warehouseitems_table.php +++ b/database/migrations/2018_05_23_042125_add_new_column_to_warehouseitems_table.php @@ -19,12 +19,7 @@ class AddNewColumnToWarehouseitemsTable extends Migration $table->foreign('wa_id') ->references('id')->on('warehousearrs') ->onDelete('cascade'); - - $table->unsignedInteger('soitem_id');//FK soitem id - $table->foreign('soitem_id') - ->references('id')->on('soitems') - ->onDelete('cascade'); - + }); } diff --git a/routes/api.php b/routes/api.php index d1296f1..8db69ea 100644 --- a/routes/api.php +++ b/routes/api.php @@ -13,30 +13,17 @@ use App\Company; | */ -<<<<<<< HEAD -//route for the Warehouse-receive-note +/* Warehouse-receive-note */ //Route::get('/so/{so_id}','warehousearrangementController@index');//view the list of wrn Route::get('/warehousearr','WarehousearrangementController@index');//view the wrn - Route::post('/warehousearr','WarehousearrangementController@store');//store the new wrn Route::post('/warehousearr/warehouse_picture/{wa_id}','WarehousearrangementController@warehousearrpic');//upload warehousepicture picture Route::post('/warehousearr/warehouse_item_picture/{wa_id}','WarehousearrangementController@warehouseitempic');//upload warehousepicture picture - Route::put('/warehousearr/{wa_id}','WarehousearrangementController@update');//update the wrn -Route::delete('/warehousearr/{wa_id}','WarehousearrangementController@delete');//delete the wrn - Route::post('/decision','WarehousearrangementController@storedecision');//decision reject and request the wrn Route::post('/decision/decisionitem','WarehousearrangementController@storedecisionitem');//decision item for reject and request - -//Route::middleware('auth:api')->get('/user', function (Request $request) { -// return $request->user(); -//}); - -Route::post('register', 'AuthController@register'); -======= /* Authentication */ ->>>>>>> 3ad7a029f4a10a5defe390df0a13ea39f0a4914d Route::post('login', 'AuthController@login'); Route::post('password/recover', 'AuthController@recover'); Route::post('password/reset', 'AuthController@reset'); diff --git a/tests/Unit/WarehouseReceiveNoteTest.php b/tests/Unit/WarehouseReceiveNoteTest.php index fa202cf..2f98d05 100644 --- a/tests/Unit/WarehouseReceiveNoteTest.php +++ b/tests/Unit/WarehouseReceiveNoteTest.php @@ -77,6 +77,44 @@ class WarehouseReceiveNoteTest extends TestCase } + // public function testPUT() + // { + // $response = $this->json('PUT', '/api/warehousearr/30', + + // [ + + // 'so_id'=> '3', + // 'receive_on'=> '2018-03-01', + // 'transport_company_name'=> 'TEScief', + // 'consignment_note_no'=> '3', + // 'warehouse_receive_note_no'=> '3', + // 'receiving_person'=> 'TEST', + // 'marking_number'=> '3', + // 'image'=> 'test.jpg', + // 'warehouseitem' => [ + // 0 => [ + // 'description'=> 'CIEFhuhuuh', + // 'nominal_ctn'=> '1', + // 'actual_ctn'=> '1', + // 'nominal_measurement'=> '1', + // 'actual_measurement'=> '1', + // 'nominal_weight'=> '1', + // 'actual_weight'=> '1', + // 'balance'=> '2', + // 'isDamaged'=> '1', + // 'status'=> 'ok', + // 'image'=> 'test.jpg', + // 'wa_id'=> '4', + // 'soitem_id'=> '4' + // ], + // ] + // ]); + + // // dd($response->getContent()); + // $response->assertStatus(201); + + // } + // public function testUploadWarehouseImage() // { // Storage::fake('warehouse_picture');