Dumy data clean up
This commit is contained in:
@@ -1069,6 +1069,20 @@ class SettingsController extends Controller
|
||||
return redirect()->route('error404')->with('fails', Lang::get('lang.no-dummy-data'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @category function to handle clean dummy data ajax request
|
||||
* @param null
|
||||
* @return json
|
||||
*/
|
||||
public function postCleanDummyData(Request $request) {
|
||||
$result = 'failed';
|
||||
$system_check = CommonSettings::select('status')->where('option_name', '=', 'dummy_data_installation')->first();
|
||||
if ($system_check->status == 1 || $system_check->status == '1') {
|
||||
$result = Self::cleanDatabase();
|
||||
}
|
||||
return response()->json(compact('result'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @category function to clean dummy database and reseed tables with default options
|
||||
*
|
||||
@@ -1118,12 +1132,6 @@ class SettingsController extends Controller
|
||||
$system2->time_zone = $system->time_zone;
|
||||
$system2->date_time_format = $system->date_time_format;
|
||||
$system2->save();
|
||||
|
||||
// updating business hours
|
||||
$bhours = BusinessHours::where('id', '=', 1)->first();
|
||||
$bhours->timezone = $system2->time_zone;
|
||||
$bhours->save();
|
||||
|
||||
$response = 'success';
|
||||
|
||||
return $response;
|
||||
|
@@ -70,12 +70,11 @@ class="active"
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
<script type="text/javascript">
|
||||
$('#clean-confirm').click(function() {
|
||||
if($(this). prop("checked") == true){
|
||||
document.getElementById("clean-btn").disabled = false;
|
||||
} else {
|
||||
document.getElementById("clean-btn").disabled = true;
|
||||
}
|
||||
$('#clean-confirm').on('ifChecked', function () {
|
||||
document.getElementById("clean-btn").disabled = false;
|
||||
});
|
||||
$('#clean-confirm').on('ifUnchecked', function () {
|
||||
document.getElementById("clean-btn").disabled = true;
|
||||
});
|
||||
|
||||
$('#clean-btn').on('click', function(){
|
||||
|
Reference in New Issue
Block a user