Commit 06b1d970 authored by Sarun Mungthanya's avatar Sarun Mungthanya
Browse files

issue create server license

parent 8831ea28
......@@ -166,21 +166,22 @@ class PatchCreate extends Component
public function save()
{
$this->validate([
'PATCHNAME' => 'required|string|max:255',
'PHP_VERSION' => 'required|in:0,1,2,3',
'PLEVEL' => 'required|string|max:255',
'MAJOR_VERSION' => 'required|string|max:255',
'PDESC' => 'required|string|max:255',
// 'POWNER' => 'required|string|max:255',
'PAPPROVEDATE' => 'required|date',
'PTYPE' => 'required|string|max:255',
// 'PTYPE' => 'required|string|max:255',
// 'POWNER' => 'required|string|max:255',
// 'PATCHCODE' => 'required|string',
// 'UNINSTALL' => 'required|string|max:255',
// 'PATCHCODE_SERVER' => 'required|string',
]);
$codePhpVersion = MasterPhpVer::find($this->PHP_VERSION);
$confSmartUpdate = new ConfSmartUpdate();
......@@ -188,13 +189,13 @@ class PatchCreate extends Component
$confSmartUpdate->PDATE = date("Y-m-d H:i:s");
$confSmartUpdate->PHP_VERSION_ID = $this->PHP_VERSION;
$confSmartUpdate->PLEVEL = $this->PLEVEL;
$confSmartUpdate->PCODE = $this->PCODE;
$confSmartUpdate->PCODE = $this->PCODE ?? $this->PATCHNAME;
$confSmartUpdate->MAJOR_VERSION = $this->MAJOR_VERSION;
$confSmartUpdate->PDESC = $this->PDESC;
$confSmartUpdate->Remark = $this->Remark;
$confSmartUpdate->POWNER = auth()->user()->id;
$confSmartUpdate->PAPPROVEDATE = $this->PAPPROVEDATE;
$confSmartUpdate->PTYPE = $this->PTYPE;
$confSmartUpdate->PTYPE = $this->PTYPE ?? ' ';
$confSmartUpdate->PATCHCODE = ($codePhpVersion->check_code ?? '') . " " . $this->PATCHCODE;
$confSmartUpdate->UNINSTALL = $this->UNINSTALL;
$confSmartUpdate->PATCHCODE_SERVER = $this->PATCHCODE_SERVER;
......
......@@ -34,7 +34,7 @@ class ServerLicenseCreate extends Component
public $installVersion;
public $databaseType;
public $ownerType;
public $hscodeMethod;
public $hscodeMethod = 1;
public $customerUrl;
public $contact;
public $contactCustomerName;
......@@ -55,7 +55,7 @@ class ServerLicenseCreate extends Component
'installVersion' => 'required|string|max:255',
'databaseType' => 'required',
'ownerType' => 'required',
'hscodeMethod' => 'required|integer|in:1,2',
// 'hscodeMethod' => 'required|integer|in:1,2',
'customerUrl' => 'required|string|max:255',
'contact' => 'required|string|max:255',
'contactCustomerName' => 'required|string|max:255',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment