@@ -609,7 +624,9 @@
attention: false,
bearShowing: false,
oneSixEightEightServiceIds: [4, 10],
- parameters: {}
+ parameters: {},
+ locked: true,
+ lockInitialized: false,
}
},
computed: {
@@ -678,7 +695,10 @@
if(section === this.section + 'CheckTransferRule'){
window.location.href = route('billplz.bill', payload.payment_reference);
}
- else
+ else if(section === this.section + 'Lock'){
+ this.locked = true;
+ }
+ else if(section === this.section)
{
this.$store.dispatch('completeList', {'name': this.section, 'data': []});
this.isLoading = false;
@@ -689,7 +709,7 @@
if(section === this.section + 'CheckTransferRule' && statusCode === 422){
console.log('Transfer expired, please create new transfer');
}
- else{
+ else if(section === this.section){
window.location.href = this.route('dashboard');
}
},
@@ -708,6 +728,28 @@
};
this.submit(route('api.rule.check.transfer'), 'post', this.section + 'CheckTransferRule', false, true);
},
+ initializeLock(state) {
+ this.lockInitialized = true;
+ this.locked = state;
+ },
+ lock(state){
+ this.lockInitialized = true;
+ this.parameters = {
+ booking_id: this.booking.id,
+ };
+ if(state){
+ this.submit(
+ route("api.booking.create.lock"),
+ "post",
+ this.section + 'Lock',
+ true,
+ false
+ );
+ }
+ else{
+ this.locked = false;
+ }
+ }
}
}
diff --git a/resources/assets/vue/components/settings/elements/PageLock.vue b/resources/assets/vue/components/settings/elements/PageLock.vue
new file mode 100644
index 00000000..61d768bb
--- /dev/null
+++ b/resources/assets/vue/components/settings/elements/PageLock.vue
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
To edit, please enter the password to unlock page:
+
+
+
+
+
+
{{ errorMessage }}
+
+
+
+
+
+
+
+
+
diff --git a/routes/booking.php b/routes/booking.php
index 50e9911a..3a74bb99 100644
--- a/routes/booking.php
+++ b/routes/booking.php
@@ -3,6 +3,8 @@
use App\Http\Controllers\Bookings\RegenerateBookingPaymentRVController;
use App\Http\Controllers\Bookings\RegenerateBookingEInvoiceController;
use App\Http\Controllers\Bookings\UpdateBookingAmountController;
+use App\Http\Controllers\Bookings\CreateBookingLockController;
+use App\Http\Controllers\Bookings\DeleteBookingLockController;
use Illuminate\Support\Facades\Route;
Route::group(['prefix' => 'booking', 'as' => 'booking.', 'namespace' => 'Bookings'], function () {
@@ -10,6 +12,8 @@ Route::group(['prefix' => 'booking', 'as' => 'booking.', 'namespace' => 'Booking
Route::get('/list', 'ListBookingsController@list')->name('list');
Route::get('/list/job', 'ListBookingsJobController@list')->name('list.job');
Route::post('/create', 'CreateBookingController@create')->name('create');
+ Route::post('/create/lock', [CreateBookingLockController::class, 'create'])->name('create.lock');
+ Route::delete('/delete/lock/{id}', [DeleteBookingLockController::class, 'delete'])->name('delete.lock');
Route::put('/update/{id}', 'UpdateBookingController@update')->name('update');
Route::put('/recipient/update/{id}', 'UpdateBookingRecipientController@update')->name('update.recipient');
Route::put('/cancel/{id}', 'CancelBookingController@cancel')->name('cancel');
diff --git a/routes/rule.php b/routes/rule.php
index d5330176..bba6b435 100644
--- a/routes/rule.php
+++ b/routes/rule.php
@@ -9,4 +9,6 @@ Route::prefix('rule')
Route::post('/check/eInvoice', [CheckRuleController::class, 'checkEInvoiceRule'])->name('check.einvoice');
Route::post('/check/purchase-order', [CheckRuleController::class, 'checkPurchaseOrderRule'])->name('check.purchase.order');
Route::post('/check/tranfer', [CheckRuleController::class, 'checkTransferRule'])->name('check.transfer');
+
+ Route::post('/check/tranfer/period-lock', [CheckRuleController::class, 'checkTransferPeriodLockRule'])->name('check.transfer.period.lock');
});