Changes
This commit is contained in:
@@ -79,17 +79,17 @@ class UserDetailForm
|
||||
Forms\Components\TextInput::make('year')->label('Года обучения')->string()->required(),
|
||||
Forms\Components\TextInput::make('content')->label('Общая информация')->string()->required(),
|
||||
Forms\Components\TextInput::make('institution')->label('Учебное заведение')->string()->required()
|
||||
])->label('Образование'),
|
||||
])->label('Образование')->defaultItems(0),
|
||||
Forms\Components\Repeater::make('professionalRetraining')->schema([
|
||||
Forms\Components\TextInput::make('item')->label('')->string()->required()
|
||||
])->label('Профессиональная переподготовка'),
|
||||
])->label('Профессиональная переподготовка')->defaultItems(0),
|
||||
Forms\Components\Repeater::make('professionalDevelopment')
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('item')->label('')->string()->required()
|
||||
])->label('Повышение квалификации'),
|
||||
])->label('Повышение квалификации')->defaultItems(0),
|
||||
Forms\Components\Repeater::make('awards')->schema([
|
||||
Forms\Components\TextInput::make('item')->label('')->string()->required()
|
||||
])->label('Награды'),
|
||||
])->label('Награды')->defaultItems(0),
|
||||
]),
|
||||
Tabs\Tab::make('Преподавание')
|
||||
->schema([
|
||||
@@ -103,19 +103,19 @@ class UserDetailForm
|
||||
]),
|
||||
Forms\Components\Repeater::make('professDisciplines')->schema([
|
||||
Forms\Components\TextInput::make('item')->label('')->string()->required()
|
||||
])->label('Преподаваемые дисциплины'),
|
||||
])->label('Преподаваемые дисциплины')->defaultItems(0),
|
||||
]),
|
||||
Tabs\Tab::make('Научная деятельность')
|
||||
->schema([
|
||||
Forms\Components\Repeater::make('attendedConferences')->schema([
|
||||
Forms\Components\TextInput::make('item')->label('')->string()->required()
|
||||
])->label('Участие в конференциях'),
|
||||
])->label('Участие в конференциях')->defaultItems(0),
|
||||
Forms\Components\Repeater::make('participationScienceProjects')->schema([
|
||||
Forms\Components\TextInput::make('item')->label('')->string()->required()
|
||||
])->label('Участие в научных проектах'),
|
||||
])->label('Участие в научных проектах')->defaultItems(0),
|
||||
Forms\Components\Repeater::make('publications')->schema([
|
||||
Forms\Components\TextInput::make('item')->label('')->string()->required()
|
||||
])->label('Публикации'),
|
||||
])->label('Публикации')->defaultItems(0),
|
||||
]),
|
||||
Tabs\Tab::make('Другое')
|
||||
->schema([
|
||||
|
||||
+7
-3
@@ -25,9 +25,10 @@ class TeachersRelationManager extends RelationManager
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('name')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
Forms\Components\TextInput::make('teaching_position')->label('Преподавательская должность')->required(),
|
||||
Forms\Components\TextInput::make('service_email')->label('Служебная почта'),
|
||||
Forms\Components\TextInput::make('service_phone')->label('Служебный телефон'),
|
||||
Forms\Components\TextInput::make('cabinet')->label('Кабинет'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -46,6 +47,9 @@ class TeachersRelationManager extends RelationManager
|
||||
->form(fn (AttachAction $action): array => [
|
||||
$action->getRecordSelect(),
|
||||
Forms\Components\TextInput::make('teaching_position')->label('Преподавательская должность')->required(),
|
||||
Forms\Components\TextInput::make('service_email')->label('Служебная почта'),
|
||||
Forms\Components\TextInput::make('service_phone')->label('Служебный телефон'),
|
||||
Forms\Components\TextInput::make('cabinet')->label('Кабинет'),
|
||||
])
|
||||
])
|
||||
->actions([
|
||||
|
||||
@@ -25,6 +25,9 @@ class WorkersRelationManager extends RelationManager
|
||||
return $form
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('position')->label('Должность')->required(),
|
||||
Forms\Components\TextInput::make('service_email')->label('Служебная почта'),
|
||||
Forms\Components\TextInput::make('service_phone')->label('Служебный телефон'),
|
||||
Forms\Components\TextInput::make('cabinet')->label('Кабинет'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -44,6 +47,9 @@ class WorkersRelationManager extends RelationManager
|
||||
->form(fn (AttachAction $action): array => [
|
||||
$action->getRecordSelect(),
|
||||
Forms\Components\TextInput::make('position')->label('Должность')->required(),
|
||||
Forms\Components\TextInput::make('service_email')->label('Служебная почта'),
|
||||
Forms\Components\TextInput::make('service_phone')->label('Служебный телефон'),
|
||||
Forms\Components\TextInput::make('cabinet')->label('Кабинет'),
|
||||
])
|
||||
])
|
||||
->actions([
|
||||
|
||||
@@ -22,6 +22,9 @@ class WorkersRelationManager extends RelationManager
|
||||
return $form
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('administrativePosition')->label('Должность')->required(),
|
||||
Forms\Components\TextInput::make('service_email')->label('Служебная почта'),
|
||||
Forms\Components\TextInput::make('service_phone')->label('Служебный телефон'),
|
||||
Forms\Components\TextInput::make('cabinet')->label('Кабинет'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -45,6 +48,9 @@ class WorkersRelationManager extends RelationManager
|
||||
->form(fn (AttachAction $action): array => [
|
||||
$action->getRecordSelect(),
|
||||
Forms\Components\TextInput::make('administrativePosition')->label('Должность')->required(),
|
||||
Forms\Components\TextInput::make('service_email')->label('Служебная почта'),
|
||||
Forms\Components\TextInput::make('service_phone')->label('Служебный телефон'),
|
||||
Forms\Components\TextInput::make('cabinet')->label('Кабинет'),
|
||||
])
|
||||
])
|
||||
->actions([
|
||||
|
||||
@@ -23,6 +23,9 @@ class WorkersRelationManager extends RelationManager
|
||||
return $form
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('position')->label('Должность')->required(),
|
||||
Forms\Components\TextInput::make('service_email')->label('Служебная почта'),
|
||||
Forms\Components\TextInput::make('service_phone')->label('Служебный телефон'),
|
||||
Forms\Components\TextInput::make('cabinet')->label('Кабинет'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -45,6 +48,9 @@ class WorkersRelationManager extends RelationManager
|
||||
->form(fn (AttachAction $action): array => [
|
||||
$action->getRecordSelect()->preload(),
|
||||
Forms\Components\TextInput::make('position')->label('Должность')->required(),
|
||||
Forms\Components\TextInput::make('service_email')->label('Служебная почта'),
|
||||
Forms\Components\TextInput::make('service_phone')->label('Служебный телефон'),
|
||||
Forms\Components\TextInput::make('cabinet')->label('Кабинет'),
|
||||
])
|
||||
])
|
||||
->actions([
|
||||
|
||||
@@ -27,7 +27,7 @@ class Department extends Model
|
||||
|
||||
public function workers()
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'workers_departments')->withPivot(['position']);
|
||||
return $this->belongsToMany(User::class, 'workers_departments')->withPivot(['position', 'sort', 'service_email', 'service_phone', 'cabinet']);
|
||||
}
|
||||
|
||||
public function programs()
|
||||
@@ -37,6 +37,6 @@ class Department extends Model
|
||||
|
||||
public function teachers()
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'teachers_departments')->withPivot(['teaching_position']);
|
||||
return $this->belongsToMany(User::class, 'teachers_departments')->withPivot(['teaching_position', 'sort', 'service_email', 'service_phone', 'cabinet']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,6 @@ class Division extends Model
|
||||
|
||||
public function workers()
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'division_user')->withPivot(['administrativePosition', 'sort']);
|
||||
return $this->belongsToMany(User::class, 'division_user')->withPivot(['administrativePosition', 'sort', 'service_email', 'service_phone', 'cabinet']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class Faculty extends Model
|
||||
|
||||
public function workers()
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'workers_faculties')->withPivot(['position'])->whereHas('userDetail');
|
||||
return $this->belongsToMany(User::class, 'workers_faculties')->withPivot(['position', 'sort', 'service_email', 'service_phone', 'cabinet'])->whereHas('userDetail');
|
||||
}
|
||||
|
||||
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('workers_faculties', function (Blueprint $table) {
|
||||
$table->string('service_email')->nullable()->after('position');
|
||||
$table->string('service_phone')->nullable()->after('service_email');
|
||||
$table->string('cabinet')->nullable()->after('service_phone');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('workers_faculties', function (Blueprint $table) {
|
||||
$table->dropColumn('service_email');
|
||||
$table->dropColumn('service_phone');
|
||||
$table->dropColumn('cabinet');
|
||||
});
|
||||
}
|
||||
};
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('workers_departments', function (Blueprint $table) {
|
||||
$table->string('service_email')->nullable()->after('position');
|
||||
$table->string('service_phone')->nullable()->after('service_email');
|
||||
$table->string('cabinet')->nullable()->after('service_phone');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('workers_departments', function (Blueprint $table) {
|
||||
$table->dropColumn('service_email');
|
||||
$table->dropColumn('service_phone');
|
||||
$table->dropColumn('cabinet');
|
||||
});
|
||||
}
|
||||
};
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('teachers_departments', function (Blueprint $table) {
|
||||
$table->string('email')->nullable()->after('teaching_position');
|
||||
$table->string('phone')->nullable()->after('email');
|
||||
$table->string('cabinet')->nullable()->after('phone');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('teachers_departments', function (Blueprint $table) {
|
||||
$table->dropColumn('email');
|
||||
$table->dropColumn('phone');
|
||||
$table->dropColumn('cabinet');
|
||||
});
|
||||
}
|
||||
};
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('division_user', function (Blueprint $table) {
|
||||
$table->string('service_email')->nullable()->after('administrativePosition');
|
||||
$table->string('service_phone')->nullable()->after('service_email');
|
||||
$table->string('cabinet')->nullable()->after('service_phone');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('division_user', function (Blueprint $table) {
|
||||
$table->dropColumn('service_email');
|
||||
$table->dropColumn('service_phone');
|
||||
$table->dropColumn('cabinet');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user