Revert "Update Module Document Management, add upload file"

This reverts commit 548b345111.
This commit is contained in:
Daeng Deni Mardaeni 2023-04-18 09:56:27 +07:00
parent 548b345111
commit 51442d6d42
7 changed files with 33 additions and 63 deletions

View File

@ -100,14 +100,6 @@
'group' => $request->group, 'group' => $request->group,
]; ];
if($request->hasFile('file_upload')) {
$file = $request->file('file_upload');
$filename = $file->getClientOriginalName();
$file->move(public_path('uploads'), $filename);
$detail['file_name'] = $filename;
$detail['file_path'] = public_path('uploads');
}
DocumentDetail::create($detail); DocumentDetail::create($detail);
} }

View File

@ -32,10 +32,7 @@ class DocumentDetail extends Model
'custom_field_1', 'custom_field_1',
'custom_field_2', 'custom_field_2',
'custom_field_3', 'custom_field_3',
'custom_field_4', 'custom_field_4'
'file_name',
'file_path',
]; ];

59
composer.lock generated
View File

@ -691,22 +691,22 @@
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.5.1", "version": "7.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle.git", "url": "https://github.com/guzzle/guzzle.git",
"reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9" "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba",
"reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9", "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"guzzlehttp/promises": "^1.5", "guzzlehttp/promises": "^1.5",
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "guzzlehttp/psr7": "^1.9 || ^2.4",
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0", "psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0" "symfony/deprecation-contracts": "^2.2 || ^3.0"
@ -799,7 +799,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/guzzle/issues", "issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.5.1" "source": "https://github.com/guzzle/guzzle/tree/7.5.0"
}, },
"funding": [ "funding": [
{ {
@ -815,7 +815,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-04-17T16:30:08+00:00" "time": "2022-08-28T15:39:27+00:00"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
@ -903,22 +903,22 @@
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.5.0", "version": "2.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "b635f279edd83fc275f822a1188157ffea568ff6" "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", "url": "https://api.github.com/repos/guzzle/psr7/zipball/3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
"reference": "b635f279edd83fc275f822a1188157ffea568ff6", "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2.5 || ^8.0", "php": "^7.2.5 || ^8.0",
"psr/http-factory": "^1.0", "psr/http-factory": "^1.0",
"psr/http-message": "^1.1 || ^2.0", "psr/http-message": "^1.0",
"ralouphie/getallheaders": "^3.0" "ralouphie/getallheaders": "^3.0"
}, },
"provide": { "provide": {
@ -938,6 +938,9 @@
"bamarni-bin": { "bamarni-bin": {
"bin-links": true, "bin-links": true,
"forward-command": false "forward-command": false
},
"branch-alias": {
"dev-master": "2.4-dev"
} }
}, },
"autoload": { "autoload": {
@ -999,7 +1002,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.5.0" "source": "https://github.com/guzzle/psr7/tree/2.4.4"
}, },
"funding": [ "funding": [
{ {
@ -1015,7 +1018,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-04-17T16:11:26+00:00" "time": "2023-03-09T13:19:02+00:00"
}, },
{ {
"name": "guzzlehttp/uri-template", "name": "guzzlehttp/uri-template",
@ -7878,16 +7881,16 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "10.1.1", "version": "10.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "884a0da7f9f46f28b2cb69134217fd810b793974" "reference": "fc4f5ee614fa82d50ecf9014b51af0a9561f3df8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/884a0da7f9f46f28b2cb69134217fd810b793974", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fc4f5ee614fa82d50ecf9014b51af0a9561f3df8",
"reference": "884a0da7f9f46f28b2cb69134217fd810b793974", "reference": "fc4f5ee614fa82d50ecf9014b51af0a9561f3df8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7906,7 +7909,7 @@
"theseer/tokenizer": "^1.2.0" "theseer/tokenizer": "^1.2.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^10.1" "phpunit/phpunit": "^10.0"
}, },
"suggest": { "suggest": {
"ext-pcov": "PHP extension that provides line coverage", "ext-pcov": "PHP extension that provides line coverage",
@ -7944,7 +7947,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.1" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.0"
}, },
"funding": [ "funding": [
{ {
@ -7952,7 +7955,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-04-17T12:15:40+00:00" "time": "2023-04-13T07:08:27+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -8197,16 +8200,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "10.1.1", "version": "10.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "0d9401b7e8245d71079e249e3cb868e9d2337887" "reference": "5a477aea03e61329132935689ae2d73f418f5e25"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0d9401b7e8245d71079e249e3cb868e9d2337887", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5a477aea03e61329132935689ae2d73f418f5e25",
"reference": "0d9401b7e8245d71079e249e3cb868e9d2337887", "reference": "5a477aea03e61329132935689ae2d73f418f5e25",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -8220,7 +8223,7 @@
"phar-io/manifest": "^2.0.3", "phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2", "phar-io/version": "^3.0.2",
"php": ">=8.1", "php": ">=8.1",
"phpunit/php-code-coverage": "^10.1.1", "phpunit/php-code-coverage": "^10.1",
"phpunit/php-file-iterator": "^4.0", "phpunit/php-file-iterator": "^4.0",
"phpunit/php-invoker": "^4.0", "phpunit/php-invoker": "^4.0",
"phpunit/php-text-template": "^3.0", "phpunit/php-text-template": "^3.0",
@ -8278,7 +8281,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.1" "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.0"
}, },
"funding": [ "funding": [
{ {
@ -8294,7 +8297,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-04-17T12:17:05+00:00" "time": "2023-04-14T05:15:09+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",

View File

@ -33,8 +33,6 @@ return new class extends Migration
$table->string('custom_field_4')->nullable(); $table->string('custom_field_4')->nullable();
$table->string('status')->nullable(); $table->string('status')->nullable();
$table->string('keterangan')->nullable(); $table->string('keterangan')->nullable();
$table->string('file_name')->nullable();
$table->string('file_path')->nullable();
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();

View File

@ -3,7 +3,6 @@
namespace Database\Seeders; namespace Database\Seeders;
use App\Models\Directorat; use App\Models\Directorat;
use App\Models\DocumentType;
use App\Models\Job; use App\Models\Job;
use App\Models\SpecialCode; use App\Models\SpecialCode;
use App\Models\SubDirectorat; use App\Models\SubDirectorat;
@ -65,10 +64,5 @@ class LabelSeeder extends Seeder
'kode' => '98', 'kode' => '98',
'name' => 'Softcopy' 'name' => 'Softcopy'
]); ]);
$documentType = DocumentType::create([
'kode' => '01',
'name' => 'Surat Masuk',
]);
} }
} }

View File

@ -2,7 +2,7 @@
$route = explode('.', Route::currentRouteName()); $route = explode('.', Route::currentRouteName());
@endphp @endphp
<!--begin:Form--> <!--begin:Form-->
<form class="form_{{$route[0]}}" enctype="multipart/form-data" method="POST" action="{{ route($route[0].'.store') }}"> <form class="form_{{$route[0]}}" method="POST" action="{{ route($route[0].'.store') }}">
@csrf @csrf
<!--begin::Input group--> <!--begin::Input group-->
<div class="d-flex flex-column mb-8 fv-row"> <div class="d-flex flex-column mb-8 fv-row">
@ -349,20 +349,6 @@
</div> </div>
<!--end::Input group--> <!--end::Input group-->
</div> </div>
<div class="col-lg-12">
<!--begin::Input group-->
<div class="d-flex flex-column mb-8 fv-row">
<!--begin::Label-->
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
<span>File</span>
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
</label>
<!--end::Label-->
<input type="file" accept="application/pdf,image/*" class="form-control form-control-solid" name="file_upload" />
</div>
<!--end::Input group-->
</div>
</div> </div>
<!--begin::Actions--> <!--begin::Actions-->