diff --git a/config/products.php b/config/products.php index a84a63e78..e48e22b6e 100644 --- a/config/products.php +++ b/config/products.php @@ -17,7 +17,5 @@ return [ // Return neither true nor false but null by default to not interrupt the default chain that // defines if a product is saleable. It depends on the isSaleable() method of the product // type if this callable is obeyed. - 'isSaleable' => function (Product $product): ?bool { - return null; - }, + 'isSaleable' => null, ]; diff --git a/packages/Webkul/API/Http/Controllers/Shop/SessionController.php b/packages/Webkul/API/Http/Controllers/Shop/SessionController.php index 19370d917..b84f3694d 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/SessionController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/SessionController.php @@ -103,23 +103,19 @@ class SessionController extends Controller 'password' => 'confirmed|min:6', ]); - $data = request()->all(); + $data = request()->only('first_name', 'last_name', 'gender', 'date_of_birth', 'email', 'password'); - if (! $data['date_of_birth']) { - unset($data['date_of_birth']); - } - - if (!isset($data['password']) || ! $data['password']) { + if (! isset($data['password']) || ! $data['password']) { unset($data['password']); } else { $data['password'] = bcrypt($data['password']); } - $this->customerRepository->update($data, $customer->id); + $updatedCustomer = $this->customerRepository->update($data, $customer->id); return response()->json([ - 'message' => 'Your account has been created successfully.', - 'data' => new CustomerResource($this->customerRepository->find($customer->id)), + 'message' => 'Your account has been updated successfully.', + 'data' => new CustomerResource($updatedCustomer), ]); } @@ -136,4 +132,4 @@ class SessionController extends Controller 'message' => 'Logged out successfully.', ]); } -} \ No newline at end of file +} diff --git a/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php index b53eb110d..b95d28fd9 100755 --- a/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/tax/tax-rates/create.blade.php @@ -78,7 +78,7 @@
-1)i&&i.push(o);else if(l=ae(o),a=be(d.appendChild(o),"script"),l&&we(a),n)for(c=0;o=a[c++];)ge.test(o.type||"")&&n.push(o);return d}var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ke=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function Ae(){return!1}function ze(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Oe(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Oe(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ae;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return T().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=T.guid++)),e.each((function(){T.event.add(this,t,i,r,n)}))}function Ee(e,t,n){n?(Q.set(e,t,!1),T.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(T.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),Q.set(this,t,o),r=n(this,t),this[t](),o!==(i=Q.get(this,t))||r?Q.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(Q.set(this,t,{value:T.event.trigger(T.extend(o[0],T.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&T.event.add(e,t,Se)}T.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,h,p,v,m=Q.get(e);if(X(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(oe,i),n.guid||(n.guid=T.guid++),(u=m.events)||(u=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return void 0!==T&&T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;l--;)h=v=(s=ke.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),h&&(d=T.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=T.event.special[h]||{},c=T.extend({type:h,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:p.join(".")},o),(f=u[h])||((f=u[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(h,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),T.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,h,p,v,m=Q.hasData(e)&&Q.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(I)||[""]).length;l--;)if(h=v=(s=ke.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),h){for(d=T.event.special[h]||{},f=u[h=(r?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)c=f[o],!i&&v!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||T.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)T.event.remove(e,h+t[l],n,r,!0);T.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=T.event.fix(e),l=(Q.get(this,"events")||Object.create(null))[u.type]||[],c=T.event.special[u.type]||{};for(s[0]=u,t=1;t
+
+