Add multi-branch POS with team roles and branch-scoped cashiers.
Deploy Ladill POS / deploy (push) Successful in 1m58s

Pro and Business users can manage branches, invite cashiers with branch assignment, and switch registers; sales and register flows respect acting location.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-08 06:05:30 +00:00
co-authored by Cursor
parent cac7c60415
commit 9d7dac6c24
34 changed files with 1434 additions and 30 deletions
@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('pos_members', function (Blueprint $table) {
$table->id();
$table->string('owner_ref')->index();
$table->string('user_ref')->index();
$table->string('role', 30)->default('cashier');
$table->foreignId('location_id')->nullable()->constrained('pos_locations')->nullOnDelete();
$table->timestamps();
$table->unique(['owner_ref', 'user_ref']);
});
}
public function down(): void
{
Schema::dropIfExists('pos_members');
}
};
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('pos_locations', function (Blueprint $table) {
$table->boolean('is_default')->default(false)->after('currency');
});
$defaults = DB::table('pos_locations')
->select('owner_ref', DB::raw('MIN(id) as id'))
->groupBy('owner_ref')
->get();
foreach ($defaults as $row) {
DB::table('pos_locations')
->where('id', $row->id)
->update(['is_default' => true]);
}
}
public function down(): void
{
Schema::table('pos_locations', function (Blueprint $table) {
$table->dropColumn('is_default');
});
}
};