Skip to content

Commit

Permalink
Merge pull request #177 from avored/dev
Browse files Browse the repository at this point in the history
merge dev to master
  • Loading branch information
indpurvesh authored Jul 14, 2018
2 parents d231667 + a65cb99 commit 5c895dc
Show file tree
Hide file tree
Showing 27 changed files with 549 additions and 293 deletions.
1 change: 1 addition & 0 deletions app/Http/Requests/PlaceOrderRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function authorize()
*/
public function rules()
{
dd($this->request);
$validation['billing.first_name'] = 'required|max:255';
$validation['billing.last_name'] = 'required|max:255';
$validation['billing.phone'] = 'required|max:255';
Expand Down
6 changes: 3 additions & 3 deletions app/Http/ViewComposers/LayoutAppComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class LayoutAppComposer
protected $siteCurrencyRepository;

public function __construct(
MenuInterface $repository,
SiteCurrencyInterface $currencyRepository
) {
MenuInterface $repository,
SiteCurrencyInterface $currencyRepository
) {
$this->repository = $repository;
$this->siteCurrencyRepository = $currencyRepository;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/avored/ecommerce/resources/lang/en/lang.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| AvoRed E commerce Languages
Expand All @@ -25,7 +24,9 @@
'admin-login-card-title' => 'AvoRed Admin Login',
'admin-login-forget-password-link' => 'Forgot your Password?',
'admin-login-button-title' => 'Login',
'admin-reset-button-title' => 'Send Password Reset Link',
'admin-password-label' => 'Password',
'admin-confirm-password-label' => 'Confirm Password',
'admin-email-label' => 'Email Address',

'admin-dashboard-total-user-title' => 'Total User',
Expand All @@ -40,5 +41,4 @@
'address.configuration.title' => 'Address Configuration List',

'cancel' => 'Cancel',

];
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
@include('avored-ecommerce::forms.text',['name' => 'name','label' => __('avored-ecommerce::attribute.name')])
@include('avored-ecommerce::forms.text',['name' => 'identifier','label' => __('avored-ecommerce::attribute.identifier')])

<avored-form-input
field-name="name"
label="{{ __('avored-ecommerce::attribute.name') }}"
field-value="{!! $model->name ?? "" !!}"
error-text="{!! $errors->first('name') !!}"
v-on:change="changeModelValue"
autofocus="autofocus"
>
</avored-form-input>

<avored-form-input
field-name="identifier"
label="{{ __('avored-ecommerce::attribute.identifier') }}"
field-value="{!! $model->identifier ?? "" !!}"
error-text="{!! $errors->first('identifier') !!}"
v-on:change="changeModelValue"
>
</avored-form-input>


<?php
Expand All @@ -8,13 +25,12 @@
$randomString = substr(str_shuffle(str_repeat($pool, 6)), 0, 6);
$hiddenClass = "";
$hiddenClass = '';
$editMode = false;
if (isset($model) && $model->attributeDropdownOptions->count() > 0) {
$editMode = true;
$hiddenClass = "";
$hiddenClass = '';
}
?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@section('content')

<div class="row">
<div id="admin-attribute-page" class="row">
<div class="col-12">
<div class="card">
<div class="card-header">{{ __('avored-ecommerce::attribute.create') }}</div>
Expand All @@ -25,4 +25,28 @@

</div>
</div>
@endsection
@endsection

@push('scripts')

<script>
var app = new Vue({
el: '#admin-attribute-page',
data : {
model: {},
autofocus:true,
disabled: false
},
methods: {
changeModelValue: function(val,fieldName) {
this.model[fieldName] = val;
}
}
});
</script>


@endpush
28 changes: 26 additions & 2 deletions modules/avored/ecommerce/resources/views/attribute/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@section('content')

<div class="row">
<div id="admin-attribute-page" class="row">
<div class="col-12">
<div class="card">
<div class="card-header">{{ __('avored-ecommerce::attribute.edit') }}</div>
Expand All @@ -27,4 +27,28 @@
</div>
</div>

@endsection
@endsection

@push('scripts')

<script>
var app = new Vue({
el: '#admin-attribute-page',
data : {
model: {},
autofocus:true,
disabled: false
},
methods: {
changeModelValue: function(val,fieldName) {
this.model[fieldName] = val;
}
}
});
</script>


@endpush
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,22 @@
action="{{ route('admin.password.reset.token') }}">
@csrf

<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" >E-Mail Address</label>
<input v-model="email" id="email" type="email" class="form-control" name="email"
value="{{ old('email') }}" required>

@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif

</div>
<avored-form-input
field-name="email"
label="{{ __('avored-ecommerce::lang.admin-email-label') }}"
error-text="{!! $errors->first('email') !!}"
v-on:change="changeModelValue"
autofocus="autofocus"
>
</avored-form-input>

<div class="form-group">

<button type="submit" :disabled="isLoginDisbled" class="btn btn-primary">
Send Password Reset Link

<button
type="submit"
:disabled='isSendPasswordSubmitDisbled'
class="btn btn-primary">
{{ __('avored-ecommerce::lang.admin-reset-button-title') }}
</button>

</div>
Expand All @@ -80,17 +79,23 @@
var app = new Vue({
el: '#reset-password-page',
data : {
email: ''
email: '',
autofocus:true
},
computed: {
isLoginDisbled: function() {
isSendPasswordSubmitDisbled: function() {
if(this.email != "") {
return false;
}
return true;
}
},
methods: {
changeModelValue: function(val,fieldName) {
if(fieldName == "email") {
this.email = val;
}
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,36 @@
action="{{ route('admin.password.email.post') }}">
@csrf

<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email">E-Mail Address</label>
<input v-model="email" id="email" type="email" class="form-control" name="email"
value="{{ $email or old('email') }}" required autofocus>
<avored-form-input
field-name="email"
label="{{ __('avored-ecommerce::lang.admin-email-label') }}"
error-text="{!! $errors->first('email') !!}"
v-on:change="changeModelValue"
autofocus="autofocus"
>
</avored-form-input>

<avored-form-input
field-name="password"
field-type="password"
label="{{ __('avored-ecommerce::lang.admin-password-label') }}"
error-text="{!! $errors->first('password') !!}"
v-on:change="changeModelValue"

>
</avored-form-input>

<avored-form-input
field-name="password_confirmation"
field-type="password"
label="{{ __('avored-ecommerce::lang.admin-confirm-password-label') }}"
error-text="{!! $errors->first('password_confirmation') !!}"
v-on:change="changeModelValue"

>
</avored-form-input>

@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif

</div>

<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password">Password</label>
<input v-model="password" id="password" type="password" class="form-control" name="password" required>

@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif

</div>

<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<label for="password-confirm">Confirm Password</label>
<input v-model="password_confirmation" id="password-confirm"
type="password" class="form-control"
name="password_confirmation" required>

@if ($errors->has('password_confirmation'))
<span class="help-block">
<strong>{{ $errors->first('password_confirmation') }}</strong>
</span>
@endif

</div>

<div class="form-group">
<button :disabled='isLoginDisbled' type="submit" class="btn btn-primary">
Expand Down Expand Up @@ -105,11 +97,20 @@
computed: {
isLoginDisbled: function() {
if(this.email != "" && this.password != "" && this.password_confirmation != "" && this.password == this.password_confirmation) {
if(this.email != "" &&
this.password != "" &&
this.password_confirmation != "" &&
this.password == this.password_confirmation) {
return false;
}
return true;
}
},
methods: {
changeModelValue: function(val,fieldName) {
this[fieldName] = val;
}
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@



<avored-form-input
field-name="name"
label="Category Name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@

</div>
@endif
@if(session()->has('errorNotificationText'))
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
aria-hidden="true">&times;</span></button>

<strong>Opps!</strong> {{ session()->get('errorNotificationText') }}

</div>
@endif
</div>
</div>
{!! Breadcrumb::render(Route::getCurrentRoute()->getName() ) !!}
Expand Down
42 changes: 42 additions & 0 deletions modules/avored/ecommerce/resources/views/module/create.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@extends('avored-ecommerce::layouts.app')

@section('content')

<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
{{ __('avored-ecommerce::module.module-upload') }}
</div>
<div class="card-body">
<form method="post"
action="{{ route('admin.module.store') }}"
enctype="multipart/form-data">

@csrf()

<div class="form-group">
<label for="module_zip_file">
{{ __('avored-ecommerce::module.module-upload-file') }}
</label>
<input type="file"
class="form-control"
name="module_zip_file"
id="module_zip_file"/>
</div>

<div class="form-group">
<button type="submit" class="btn btn-primary">
{{ __('avored-ecommerce::module.module-upload') }}
</button>

<a href="{{ route('admin.module.index') }}" class="btn">Cancel</a>
</div>

</form>

</div>
</div>
</div>
</div>
@endsection
Loading

0 comments on commit 5c895dc

Please sign in to comment.