@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * common |
| 16 | 16 | */ |
| 17 | - 'show'=>'Show', |
|
| 17 | + 'show'=>'Show', |
|
| 18 | 18 | 'edit'=>'Edit', |
| 19 | 19 | |
| 20 | 20 | |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | 'vote'=>'Vote', |
| 367 | 367 | 'comment'=>'Comment', |
| 368 | 368 | 'show-vote'=>'Show Vote', |
| 369 | - /* |
|
| 369 | + /* |
|
| 370 | 370 | |-------------------------------------- |
| 371 | 371 | | Location Catagory create lang |
| 372 | 372 | |-------------------------------------- |
@@ -43,10 +43,10 @@ |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * get the description of this model |
|
| 48 | - * @return string |
|
| 49 | - */ |
|
| 46 | + /** |
|
| 47 | + * get the description of this model |
|
| 48 | + * @return string |
|
| 49 | + */ |
|
| 50 | 50 | public function descriptions() { |
| 51 | 51 | $value = "--"; |
| 52 | 52 | $attr = $this->attributes['description']; |
@@ -238,7 +238,7 @@ |
||
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | public function changeRelaion(){ |
| 241 | - $through = "App\Plugins\ServiceDesk\Model\Problem\ProblemChangeRelation"; |
|
| 241 | + $through = "App\Plugins\ServiceDesk\Model\Problem\ProblemChangeRelation"; |
|
| 242 | 242 | $firstKey = 'problem_id'; |
| 243 | 243 | return $this->hasMany($through, $firstKey); |
| 244 | 244 | } |
@@ -103,59 +103,59 @@ |
||
| 103 | 103 | } |
| 104 | 104 | return $value; |
| 105 | 105 | } |
| 106 | - public function vendorRelation(){ |
|
| 107 | - return $this->hasMany("App\Plugins\ServiceDesk\Model\Common\ProductVendorRelation",'product_id'); |
|
| 108 | - } |
|
| 106 | + public function vendorRelation(){ |
|
| 107 | + return $this->hasMany("App\Plugins\ServiceDesk\Model\Common\ProductVendorRelation",'product_id'); |
|
| 108 | + } |
|
| 109 | 109 | |
| 110 | - public function vendors(){ |
|
| 111 | - $vendorids = $this->vendorRelation()->lists('vendor_id')->toArray(); |
|
| 112 | - $vendor = new \App\Plugins\ServiceDesk\Model\Vendor\SdVendors(); |
|
| 113 | - $vendors = $vendor->whereIn('id',$vendorids)->get(); |
|
| 114 | - return $vendors; |
|
| 110 | + public function vendors(){ |
|
| 111 | + $vendorids = $this->vendorRelation()->lists('vendor_id')->toArray(); |
|
| 112 | + $vendor = new \App\Plugins\ServiceDesk\Model\Vendor\SdVendors(); |
|
| 113 | + $vendors = $vendor->whereIn('id',$vendorids)->get(); |
|
| 114 | + return $vendors; |
|
| 115 | 115 | |
| 116 | - } |
|
| 116 | + } |
|
| 117 | 117 | |
| 118 | - public function assetRelation(){ |
|
| 119 | - return $this->hasMany('App\Plugins\ServiceDesk\Model\Assets\SdAssets','product_id'); |
|
| 120 | - } |
|
| 121 | - public function assets(){ |
|
| 122 | - $relation = $this->assetRelation(); |
|
| 123 | - $assets = $relation->get(); |
|
| 124 | - return $assets; |
|
| 125 | - } |
|
| 118 | + public function assetRelation(){ |
|
| 119 | + return $this->hasMany('App\Plugins\ServiceDesk\Model\Assets\SdAssets','product_id'); |
|
| 120 | + } |
|
| 121 | + public function assets(){ |
|
| 122 | + $relation = $this->assetRelation(); |
|
| 123 | + $assets = $relation->get(); |
|
| 124 | + return $assets; |
|
| 125 | + } |
|
| 126 | 126 | |
| 127 | - public function deleteProductInAsset(){ |
|
| 128 | - $asset = $this->assetRelation()->first(); |
|
| 129 | - if($asset){ |
|
| 130 | - $asset->product_id = NULL; |
|
| 131 | - $asset->save(); |
|
| 132 | - } |
|
| 133 | - } |
|
| 127 | + public function deleteProductInAsset(){ |
|
| 128 | + $asset = $this->assetRelation()->first(); |
|
| 129 | + if($asset){ |
|
| 130 | + $asset->product_id = NULL; |
|
| 131 | + $asset->save(); |
|
| 132 | + } |
|
| 133 | + } |
|
| 134 | 134 | |
| 135 | - public function contractRelation(){ |
|
| 136 | - return $this->hasMany('App\Plugins\ServiceDesk\Model\Contract\SdContract','product_id'); |
|
| 137 | - } |
|
| 138 | - public function deleteProductInContract(){ |
|
| 139 | - $contract = $this->contractRelation()->first(); |
|
| 140 | - if($contract){ |
|
| 141 | - $contract->product_id = NULL; |
|
| 142 | - $contract->save(); |
|
| 143 | - } |
|
| 144 | - } |
|
| 135 | + public function contractRelation(){ |
|
| 136 | + return $this->hasMany('App\Plugins\ServiceDesk\Model\Contract\SdContract','product_id'); |
|
| 137 | + } |
|
| 138 | + public function deleteProductInContract(){ |
|
| 139 | + $contract = $this->contractRelation()->first(); |
|
| 140 | + if($contract){ |
|
| 141 | + $contract->product_id = NULL; |
|
| 142 | + $contract->save(); |
|
| 143 | + } |
|
| 144 | + } |
|
| 145 | 145 | |
| 146 | - public function deleteVendorRelation(){ |
|
| 147 | - $relation = $this->vendorRelation()->first(); |
|
| 148 | - if($relation){ |
|
| 149 | - $relation->delete(); |
|
| 150 | - } |
|
| 151 | - } |
|
| 146 | + public function deleteVendorRelation(){ |
|
| 147 | + $relation = $this->vendorRelation()->first(); |
|
| 148 | + if($relation){ |
|
| 149 | + $relation->delete(); |
|
| 150 | + } |
|
| 151 | + } |
|
| 152 | 152 | |
| 153 | - public function delete(){ |
|
| 154 | - $this->deleteProductInAsset(); |
|
| 155 | - $this->deleteProductInContract(); |
|
| 156 | - $this->deleteVendorRelation(); |
|
| 157 | - parent::delete(); |
|
| 158 | - } |
|
| 153 | + public function delete(){ |
|
| 154 | + $this->deleteProductInAsset(); |
|
| 155 | + $this->deleteProductInContract(); |
|
| 156 | + $this->deleteVendorRelation(); |
|
| 157 | + parent::delete(); |
|
| 158 | + } |
|
| 159 | 159 | |
| 160 | 160 | |
| 161 | 161 | |
@@ -18,10 +18,10 @@ discard block |
||
| 18 | 18 | 'approval_id', |
| 19 | 19 | ]; |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * get the description of this model |
|
| 23 | - * @return string |
|
| 24 | - */ |
|
| 21 | + /** |
|
| 22 | + * get the description of this model |
|
| 23 | + * @return string |
|
| 24 | + */ |
|
| 25 | 25 | public function descriptions() { |
| 26 | 26 | $value = "--"; |
| 27 | 27 | $attr = $this->attributes['description']; |
@@ -146,10 +146,10 @@ discard block |
||
| 146 | 146 | return $this->belongsTo('App\Plugins\ServiceDesk\Model\Changes\SdChangepriorities','priority_id'); |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | - /** |
|
| 150 | - * get the priority name |
|
| 151 | - * @return string |
|
| 152 | - */ |
|
| 149 | + /** |
|
| 150 | + * get the priority name |
|
| 151 | + * @return string |
|
| 152 | + */ |
|
| 153 | 153 | public function priorities() { |
| 154 | 154 | $value = "--"; |
| 155 | 155 | $attr = $this->attributes['priority_id']; |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | public function releaseRelaion(){ |
| 227 | - $through = "App\Plugins\ServiceDesk\Model\Changes\ChangeReleaseRelation"; |
|
| 227 | + $through = "App\Plugins\ServiceDesk\Model\Changes\ChangeReleaseRelation"; |
|
| 228 | 228 | $firstKey = 'change_id'; |
| 229 | 229 | return $this->hasMany($through, $firstKey); |
| 230 | 230 | } |
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | { |
| 8 | 8 | protected $table = 'sd_release_priorities'; |
| 9 | 9 | |
| 10 | - protected $fillable = ['id','name','created_at','updated_at']; |
|
| 10 | + protected $fillable = ['id','name','created_at','updated_at']; |
|
| 11 | 11 | } |
| 12 | 12 | \ No newline at end of file |
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | { |
| 8 | 8 | protected $table = 'sd_release_status'; |
| 9 | 9 | |
| 10 | - protected $fillable = ['id','name','created_at','updated_at']; |
|
| 10 | + protected $fillable = ['id','name','created_at','updated_at']; |
|
| 11 | 11 | } |
| 12 | 12 | \ No newline at end of file |
@@ -80,10 +80,10 @@ discard block |
||
| 80 | 80 | return $this->belongsTo('App\Plugins\ServiceDesk\Model\Releases\SdReleasepriorities','priority_id'); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - /** |
|
| 84 | - * get the priority name |
|
| 85 | - * @return string |
|
| 86 | - */ |
|
| 83 | + /** |
|
| 84 | + * get the priority name |
|
| 85 | + * @return string |
|
| 86 | + */ |
|
| 87 | 87 | public function priorities() { |
| 88 | 88 | $value = "--"; |
| 89 | 89 | $attr = $this->attributes['priority_id']; |
@@ -112,10 +112,10 @@ discard block |
||
| 112 | 112 | return ucfirst($value); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - /** |
|
| 116 | - * get the description of this model |
|
| 117 | - * @return string |
|
| 118 | - */ |
|
| 115 | + /** |
|
| 116 | + * get the description of this model |
|
| 117 | + * @return string |
|
| 118 | + */ |
|
| 119 | 119 | public function descriptions() { |
| 120 | 120 | $value = "--"; |
| 121 | 121 | $attr = $this->attributes['description']; |
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | { |
| 8 | 8 | protected $table = 'sd_release_types'; |
| 9 | 9 | |
| 10 | - protected $fillable = ['id','name','created_at','updated_at']; |
|
| 10 | + protected $fillable = ['id','name','created_at','updated_at']; |
|
| 11 | 11 | } |
| 12 | 12 | \ No newline at end of file |