|
@@ -147,6 +147,8 @@ class Member extends Component
|
|
|
public $already_existing = false;
|
|
public $already_existing = false;
|
|
|
private $fileService;
|
|
private $fileService;
|
|
|
|
|
|
|
|
|
|
+ public $hasCertificate = false;
|
|
|
|
|
+
|
|
|
protected $rules = [
|
|
protected $rules = [
|
|
|
'first_name' => 'required',
|
|
'first_name' => 'required',
|
|
|
'last_name' => 'required',
|
|
'last_name' => 'required',
|
|
@@ -369,19 +371,6 @@ class Member extends Component
|
|
|
|
|
|
|
|
$this->course_subscriptions = \App\Models\CourseSubscription::select('*')->whereIn('id', $course_subscription_ids)->where('enabled', true)->get();
|
|
$this->course_subscriptions = \App\Models\CourseSubscription::select('*')->whereIn('id', $course_subscription_ids)->where('enabled', true)->get();
|
|
|
|
|
|
|
|
- /*
|
|
|
|
|
-
|
|
|
|
|
- if ($this->course_course_id > 0) {
|
|
|
|
|
- $c = \App\Models\Course::findOrFail($this->course_course_id);
|
|
|
|
|
- $this->course_price = formatPrice($c->price);
|
|
|
|
|
- $this->course_subscription_price = formatPrice($c->subscription_price);
|
|
|
|
|
- // Controllo se sono già iscritto la corso
|
|
|
|
|
- $this->course_exist = \App\Models\MemberCourse::where('course_id', $this->course_course_id)->where('member_id', $this->dataId)->count() > 0;
|
|
|
|
|
- } else {
|
|
|
|
|
- $this->course_price = 0;
|
|
|
|
|
- $this->course_subscription_price = 0;
|
|
|
|
|
- $this->course_exist = false;
|
|
|
|
|
- }*/
|
|
|
|
|
} else {
|
|
} else {
|
|
|
$this->course_price = 0;
|
|
$this->course_price = 0;
|
|
|
$this->course_subscription_price = 0;
|
|
$this->course_subscription_price = 0;
|
|
@@ -552,13 +541,6 @@ class Member extends Component
|
|
|
|
|
|
|
|
$this->getCategories(\App\Models\Category::select('id', 'name')->where('parent_id', null)->orderBy('name')->get(), 0);
|
|
$this->getCategories(\App\Models\Category::select('id', 'name')->where('parent_id', null)->orderBy('name')->get(), 0);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- // $this->getCourses(\App\Models\Course::select('id', 'name')->where('parent_id', null)->get(), 0);
|
|
|
|
|
-
|
|
|
|
|
- /*$this->nations = \App\Models\Nation::select('id', 'name')->orderBy('name')->get();
|
|
|
|
|
- $this->provinces = \App\Models\Province::where('nation_id', 1)->orderBy('name')->get();
|
|
|
|
|
- $this->cities = \App\Models\City::where('province_id', 178)->orderBy('name')->orderBy('name')->get();*/
|
|
|
|
|
-
|
|
|
|
|
$c = \App\Models\Causal::where('type', 'IN')->where('money', true)->first();
|
|
$c = \App\Models\Causal::where('type', 'IN')->where('money', true)->first();
|
|
|
if ($c)
|
|
if ($c)
|
|
|
$this->causalId = $c->id;
|
|
$this->causalId = $c->id;
|
|
@@ -567,9 +549,6 @@ class Member extends Component
|
|
|
$this->showDetailF($_GET["member_detail"]);
|
|
$this->showDetailF($_GET["member_detail"]);
|
|
|
$this->refreshAfter = 1;
|
|
$this->refreshAfter = 1;
|
|
|
}
|
|
}
|
|
|
- /*$this->birthNations = \App\Models\Nation::select('id', 'name')->orderBy('name')->get();
|
|
|
|
|
- $this->birthProvinces = \App\Models\Province::where('nation_id', 1)->orderBy('name')->get();
|
|
|
|
|
- $this->birthCities = \App\Models\City::where('province_id', 178)->orderBy('name')->orderBy('name')->get();*/
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function boot(){
|
|
public function boot(){
|
|
@@ -648,37 +627,6 @@ class Member extends Component
|
|
|
} else
|
|
} else
|
|
|
$this->isBirthItaly = false;
|
|
$this->isBirthItaly = false;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- /*public function loadProvinces()
|
|
|
|
|
- {
|
|
|
|
|
- $n = \App\Models\Nation::findOrFail($this->nation_id);
|
|
|
|
|
- $this->isItaly = $n->is_italy;
|
|
|
|
|
- $this->provinces = \App\Models\Province::where('nation_id', $this->nation_id)->orderBy('name')->get();
|
|
|
|
|
- $this->cities = array();
|
|
|
|
|
- $this->selectId++;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public function loadCities()
|
|
|
|
|
- {
|
|
|
|
|
- $this->cities = \App\Models\City::where('province_id', $this->province_id)->orderBy('name')->orderBy('name')->get();
|
|
|
|
|
- $this->selectId++;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public function loadBirthProvinces()
|
|
|
|
|
- {
|
|
|
|
|
- $n = \App\Models\Nation::findOrFail($this->birth_nation_id);
|
|
|
|
|
- $this->isBirthItaly = $n->is_italy;
|
|
|
|
|
- $this->birthProvinces = \App\Models\Province::where('nation_id', $this->birth_nation_id)->orderBy('name')->get();
|
|
|
|
|
- $this->birthCities = array();
|
|
|
|
|
- $this->selectId++;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public function loadBirthCities()
|
|
|
|
|
- {
|
|
|
|
|
- $this->birthCities = \App\Models\City::where('province_id', $this->birth_province_id)->get();
|
|
|
|
|
- $this->selectId++;
|
|
|
|
|
- }
|
|
|
|
|
- */
|
|
|
|
|
public function search()
|
|
public function search()
|
|
|
{
|
|
{
|
|
|
if ($this->searchTxt != '') {
|
|
if ($this->searchTxt != '') {
|
|
@@ -719,61 +667,43 @@ class Member extends Component
|
|
|
if (!in_array($cN, $this->course_names))
|
|
if (!in_array($cN, $this->course_names))
|
|
|
$this->course_names[] = $cN;
|
|
$this->course_names[] = $cN;
|
|
|
}
|
|
}
|
|
|
- //$this->course_names = \App\Models\Course::orderBy('name')->groupBy('name')->pluck('name');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$datas = [];
|
|
$datas = [];
|
|
|
- // $this->emit('destroy-data-table');
|
|
|
|
|
if (false) {
|
|
if (false) {
|
|
|
|
|
|
|
|
if (!$this->advanced) {
|
|
if (!$this->advanced) {
|
|
|
- /*if ($this->search != '')
|
|
|
|
|
- $datas = \App\Models\Member::select('members.*') // , \DB::raw('SUM(records.id) As total'))
|
|
|
|
|
- ->where('first_name', 'LIKE', '%' . $this->search . '%')
|
|
|
|
|
- ->orWhere('last_name', 'LIKE', '%' . $this->search . '%')
|
|
|
|
|
- ->orWhere('email', 'LIKE', '%' . $this->search . '%');
|
|
|
|
|
- $this->records = \App\Models\Member::where('first_name', 'LIKE', '%' . $this->search . '%')->orWhere('last_name', 'LIKE', '%' . $this->search . '%')->orWhere('email', 'LIKE', '%' . $this->search . '%')->get();
|
|
|
|
|
- else*/
|
|
|
|
|
$this->records = \App\Models\Member::select('id', 'first_name', 'last_name', 'phone')->get();
|
|
$this->records = \App\Models\Member::select('id', 'first_name', 'last_name', 'phone')->get();
|
|
|
- //$datas = \App\Models\Member::select('members.*');
|
|
|
|
|
} else {
|
|
} else {
|
|
|
- //$this->records = \App\Models\Member::where('id', '>', 0);
|
|
|
|
|
$datas = \App\Models\Member::select('members.*')->where('id', '>', 0);
|
|
$datas = \App\Models\Member::select('members.*')->where('id', '>', 0);
|
|
|
if (sizeof($this->filterCard) > 0) {
|
|
if (sizeof($this->filterCard) > 0) {
|
|
|
$card_ids = \App\Models\MemberCard::whereIn('card_id', $this->filterCard)->pluck('member_id');
|
|
$card_ids = \App\Models\MemberCard::whereIn('card_id', $this->filterCard)->pluck('member_id');
|
|
|
- //$this->records->whereIn('id', $card_ids);
|
|
|
|
|
$datas = $datas->whereIn('id', $card_ids);
|
|
$datas = $datas->whereIn('id', $card_ids);
|
|
|
}
|
|
}
|
|
|
if (sizeof($this->filterCategory) > 0) {
|
|
if (sizeof($this->filterCategory) > 0) {
|
|
|
$cats_ids = \App\Models\MemberCategory::whereIn('category_id', $this->filterCategory)->pluck('member_id');
|
|
$cats_ids = \App\Models\MemberCategory::whereIn('category_id', $this->filterCategory)->pluck('member_id');
|
|
|
- //$this->records->whereIn('id', $cats_ids);
|
|
|
|
|
$datas = $datas->whereIn('id', $cats_ids);
|
|
$datas = $datas->whereIn('id', $cats_ids);
|
|
|
}
|
|
}
|
|
|
$certs = [];
|
|
$certs = [];
|
|
|
|
|
|
|
|
if ($this->filterCertNormal > 0) {
|
|
if ($this->filterCertNormal > 0) {
|
|
|
$normal = \App\Models\MemberCertificate::where('type', 'N')->pluck('member_id');
|
|
$normal = \App\Models\MemberCertificate::where('type', 'N')->pluck('member_id');
|
|
|
- //$this->records->whereIn('id', $normal);
|
|
|
|
|
$datas = $datas->whereIn('id', $normal);;
|
|
$datas = $datas->whereIn('id', $normal);;
|
|
|
}
|
|
}
|
|
|
if ($this->filterCertAgonistic > 0) {
|
|
if ($this->filterCertAgonistic > 0) {
|
|
|
$agonistic = \App\Models\MemberCertificate::where('type', 'A')->pluck('member_id');
|
|
$agonistic = \App\Models\MemberCertificate::where('type', 'A')->pluck('member_id');
|
|
|
- //$this->records->whereIn('id', $agonistic);
|
|
|
|
|
$datas = $datas->whereIn('id', $agonistic);
|
|
$datas = $datas->whereIn('id', $agonistic);
|
|
|
}
|
|
}
|
|
|
if ($this->filterCertScaduto > 0) {
|
|
if ($this->filterCertScaduto > 0) {
|
|
|
$scaduto = \App\Models\MemberCertificate::where('expire_date', '<', date("Y-m-d"))->pluck('member_id');
|
|
$scaduto = \App\Models\MemberCertificate::where('expire_date', '<', date("Y-m-d"))->pluck('member_id');
|
|
|
- //$this->records->whereIn('id', $scaduto);
|
|
|
|
|
$datas = $datas->whereIn('id', $scaduto);
|
|
$datas = $datas->whereIn('id', $scaduto);
|
|
|
}
|
|
}
|
|
|
if ($this->filterCertInScadenza > 0) {
|
|
if ($this->filterCertInScadenza > 0) {
|
|
|
$scaduto = \App\Models\MemberCertificate::whereBetween('expire_date', [date("Y-m-d"), date("Y-m-d", strtotime("+1 month"))])->pluck('member_id');
|
|
$scaduto = \App\Models\MemberCertificate::whereBetween('expire_date', [date("Y-m-d"), date("Y-m-d", strtotime("+1 month"))])->pluck('member_id');
|
|
|
- //$this->records->whereIn('id', $scaduto);
|
|
|
|
|
$datas = $datas->whereIn('id', $scaduto);
|
|
$datas = $datas->whereIn('id', $scaduto);
|
|
|
}
|
|
}
|
|
|
if (sizeof($certs) > 0) {
|
|
if (sizeof($certs) > 0) {
|
|
|
$datas = $datas->whereIn('id', $certs);
|
|
$datas = $datas->whereIn('id', $certs);
|
|
|
- //$this->records->whereIn('id', $certs);
|
|
|
|
|
}
|
|
}
|
|
|
$this->records = $datas->get();
|
|
$this->records = $datas->get();
|
|
|
}
|
|
}
|
|
@@ -786,16 +716,6 @@ class Member extends Component
|
|
|
$r->certificate = $r->hasCertificate()["date"];
|
|
$r->certificate = $r->hasCertificate()["date"];
|
|
|
$r->state = $r->getStatus()["status"];
|
|
$r->state = $r->getStatus()["status"];
|
|
|
}
|
|
}
|
|
|
- /*
|
|
|
|
|
- if ($this->sortAsc)
|
|
|
|
|
- $this->records = $this->records->sortBy($this->sortField);
|
|
|
|
|
- else
|
|
|
|
|
- $this->records = $this->records->sortByDesc($this->sortField);
|
|
|
|
|
- */
|
|
|
|
|
-
|
|
|
|
|
- //$datas = $datas->get(); // ->orderBy($this->sortField, $this->sortAsc ? 'ASC' : 'DESC')->paginate(10);
|
|
|
|
|
-
|
|
|
|
|
- //$this->records = $this->records->get();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->emit('load-data-table');
|
|
$this->emit('load-data-table');
|
|
@@ -807,7 +727,6 @@ class Member extends Component
|
|
|
$this->loadMemberCertificates();
|
|
$this->loadMemberCertificates();
|
|
|
|
|
|
|
|
$this->courses = \App\Models\Course::select('id', 'name')->where('type', $this->course_course_type)->get();
|
|
$this->courses = \App\Models\Course::select('id', 'name')->where('type', $this->course_course_type)->get();
|
|
|
- // $this->course_subscriptions = \App\Models\CourseSubscription::select('*')->where('enabled', true)->get();
|
|
|
|
|
|
|
|
|
|
return view('livewire.member', ['datas' => $datas]);
|
|
return view('livewire.member', ['datas' => $datas]);
|
|
|
}
|
|
}
|
|
@@ -851,25 +770,21 @@ class Member extends Component
|
|
|
public function loadMemberCards()
|
|
public function loadMemberCards()
|
|
|
{
|
|
{
|
|
|
$this->member_cards = \App\Models\MemberCard::where('member_id', $this->dataId)->get();
|
|
$this->member_cards = \App\Models\MemberCard::where('member_id', $this->dataId)->get();
|
|
|
- // return view('livewire.member');
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function loadMemberCourses()
|
|
public function loadMemberCourses()
|
|
|
{
|
|
{
|
|
|
$this->member_courses = \App\Models\MemberCourse::where('member_id', $this->dataId)->get();
|
|
$this->member_courses = \App\Models\MemberCourse::where('member_id', $this->dataId)->get();
|
|
|
- // return view('livewire.member');
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function loadMemberCategories()
|
|
public function loadMemberCategories()
|
|
|
{
|
|
{
|
|
|
$this->member_categories = \App\Models\MemberCategory::where('member_id', $this->dataId)->get();
|
|
$this->member_categories = \App\Models\MemberCategory::where('member_id', $this->dataId)->get();
|
|
|
- // return view('livewire.member');
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function loadMemberCertificates()
|
|
public function loadMemberCertificates()
|
|
|
{
|
|
{
|
|
|
$this->member_certificates = \App\Models\MemberCertificate::where('member_id', $this->dataId)->orderBy('expire_date', 'DESC')->get();
|
|
$this->member_certificates = \App\Models\MemberCertificate::where('member_id', $this->dataId)->orderBy('expire_date', 'DESC')->get();
|
|
|
- // return view('livewire.member');
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function showDetailF($id)
|
|
public function showDetailF($id)
|
|
@@ -1238,10 +1153,6 @@ class Member extends Component
|
|
|
$interval = $date1->diff($date2);
|
|
$interval = $date1->diff($date2);
|
|
|
$this->age = $interval->y . " anni";
|
|
$this->age = $interval->y . " anni";
|
|
|
$this->under18 = $interval->y < 18;
|
|
$this->under18 = $interval->y < 18;
|
|
|
- //$this->provinces = \App\Models\Province::where('nation_id', $this->nation_id)->get();
|
|
|
|
|
- //$this->cities = \App\Models\City::where('province_id', $this->province_id)->get();
|
|
|
|
|
- //$this->birthProvinces = \App\Models\Province::where('nation_id', $this->birth_nation_id)->get();
|
|
|
|
|
- //$this->birthCities = \App\Models\City::where('province_id', $this->birth_province_id)->get();
|
|
|
|
|
$this->update = true;
|
|
$this->update = true;
|
|
|
$this->add = false;
|
|
$this->add = false;
|
|
|
|
|
|
|
@@ -1592,7 +1503,7 @@ class Member extends Component
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- \Illuminate\Support\Facades\Log::info('Updating member card', [
|
|
|
|
|
|
|
+ Log::info('Updating member card', [
|
|
|
'card_id' => $this->cardDataId,
|
|
'card_id' => $this->cardDataId,
|
|
|
'member_id' => $this->dataId,
|
|
'member_id' => $this->dataId,
|
|
|
'card_number' => $this->card_number,
|
|
'card_number' => $this->card_number,
|
|
@@ -1616,7 +1527,7 @@ class Member extends Component
|
|
|
|
|
|
|
|
updateMemberData($this->dataId);
|
|
updateMemberData($this->dataId);
|
|
|
|
|
|
|
|
- \Illuminate\Support\Facades\Log::info('Card updated successfully', [
|
|
|
|
|
|
|
+ Log::info('Card updated successfully', [
|
|
|
'card_id' => $this->cardDataId,
|
|
'card_id' => $this->cardDataId,
|
|
|
'member_id' => $this->dataId
|
|
'member_id' => $this->dataId
|
|
|
]);
|
|
]);
|
|
@@ -1625,7 +1536,7 @@ class Member extends Component
|
|
|
$this->resetCardFields();
|
|
$this->resetCardFields();
|
|
|
$this->updateCard = false;
|
|
$this->updateCard = false;
|
|
|
} catch (\Exception $ex) {
|
|
} catch (\Exception $ex) {
|
|
|
- \Illuminate\Support\Facades\Log::error('Error updating card', [
|
|
|
|
|
|
|
+ Log::error('Error updating card', [
|
|
|
'card_id' => $this->cardDataId,
|
|
'card_id' => $this->cardDataId,
|
|
|
'member_id' => $this->dataId,
|
|
'member_id' => $this->dataId,
|
|
|
'error_message' => $ex->getMessage(),
|
|
'error_message' => $ex->getMessage(),
|
|
@@ -1657,19 +1568,6 @@ class Member extends Component
|
|
|
public function addCourse()
|
|
public function addCourse()
|
|
|
{
|
|
{
|
|
|
$this->resetCourseFields();
|
|
$this->resetCourseFields();
|
|
|
- /*if ($this->under18)
|
|
|
|
|
- {
|
|
|
|
|
- $this->course_months[] = array("m" => 9, "status" => "");
|
|
|
|
|
- $this->course_months[] = array("m" => 10, "status" => "");
|
|
|
|
|
- $this->course_months[] = array("m" => 11, "status" => "");
|
|
|
|
|
- $this->course_months[] = array("m" => 12, "status" => "");
|
|
|
|
|
- $this->course_months[] = array("m" => 1, "status" => "");
|
|
|
|
|
- $this->course_months[] = array("m" => 2, "status" => "");
|
|
|
|
|
- $this->course_months[] = array("m" => 3, "status" => "");
|
|
|
|
|
- $this->course_months[] = array("m" => 4, "status" => "");
|
|
|
|
|
- $this->course_months[] = array("m" => 5, "status" => "");
|
|
|
|
|
- $this->course_months[] = array("m" => 6, "status" => "");
|
|
|
|
|
- }*/
|
|
|
|
|
$this->addCourse = true;
|
|
$this->addCourse = true;
|
|
|
$this->updateCourse = false;
|
|
$this->updateCourse = false;
|
|
|
$this->emit('setEditCorso', true);
|
|
$this->emit('setEditCorso', true);
|
|
@@ -1725,24 +1623,6 @@ class Member extends Component
|
|
|
$rate->status = 0;
|
|
$rate->status = 0;
|
|
|
$rate->is_subscription = true;
|
|
$rate->is_subscription = true;
|
|
|
$rate->save();
|
|
$rate->save();
|
|
|
-
|
|
|
|
|
- // Se la data inizio pagamenti è "inizio corso" allora prendo quella come start date
|
|
|
|
|
- /*if ($r->when_start == 'COURSE')
|
|
|
|
|
- $start = $c->date_from;
|
|
|
|
|
-
|
|
|
|
|
- //
|
|
|
|
|
- $month_day = $r->month_day;
|
|
|
|
|
- if ($month_day > 0)
|
|
|
|
|
- {
|
|
|
|
|
- if ($month_day >= 29)
|
|
|
|
|
- $start = date("Y-m-t", strtotime($start));
|
|
|
|
|
- else
|
|
|
|
|
- $start = date('Y-m-d', strtotime('+' . ($month_day - 1) . ' days', strtotime('first day of ' . ((int)date('j', strtotime($start)) < $month_day ? 'this' : 'next' ) . ' month', strtotime($start))));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if ($r->months > 1)
|
|
|
|
|
- $start = date('Y-m-' . ($month_day >= 29 ? 't' : 'd'), strtotime("+" . ($r->months - 1) . " months", strtotime($start)));
|
|
|
|
|
- */
|
|
|
|
|
$go = true;
|
|
$go = true;
|
|
|
while ($go) {
|
|
while ($go) {
|
|
|
|
|
|
|
@@ -2143,17 +2023,6 @@ class Member extends Component
|
|
|
} else {
|
|
} else {
|
|
|
$this->course_months[] = array("m" => $m, "status" => "");
|
|
$this->course_months[] = array("m" => $m, "status" => "");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- /*
|
|
|
|
|
- if (in_array($m, $this->course_months))
|
|
|
|
|
- {
|
|
|
|
|
- $i = array_search($m, $this->course_months);
|
|
|
|
|
- array_splice($this->course_months, $i, 1);
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- $this->course_months[] = $m;
|
|
|
|
|
- }*/
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function newPayment($course)
|
|
public function newPayment($course)
|
|
@@ -2328,7 +2197,6 @@ class Member extends Component
|
|
|
}
|
|
}
|
|
|
if ($payed < $price)
|
|
if ($payed < $price)
|
|
|
$class = 'orange half';
|
|
$class = 'orange half';
|
|
|
- //$class .= $extraC;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -2437,6 +2305,83 @@ class Member extends Component
|
|
|
}
|
|
}
|
|
|
return $ret;
|
|
return $ret;
|
|
|
}
|
|
}
|
|
|
|
|
+ public function archive($id)
|
|
|
|
|
+ {
|
|
|
|
|
+ try {
|
|
|
|
|
+ $member = \App\Models\Member::findOrFail($id);
|
|
|
|
|
+
|
|
|
|
|
+ $originalFirstName = $member->first_name;
|
|
|
|
|
+ $originalLastName = $member->last_name;
|
|
|
|
|
+
|
|
|
|
|
+ $member->update([
|
|
|
|
|
+ 'is_archived' => true,
|
|
|
|
|
+ 'archived_date' => now(),
|
|
|
|
|
+
|
|
|
|
|
+ 'first_name' => 'Nome Archiviato',
|
|
|
|
|
+ 'last_name' => 'Cognome Archiviato',
|
|
|
|
|
+
|
|
|
|
|
+ 'fiscal_code' => null,
|
|
|
|
|
+ 'email' => null,
|
|
|
|
|
+ 'phone' => null,
|
|
|
|
|
+ 'phone2' => null,
|
|
|
|
|
+ 'phone3' => null,
|
|
|
|
|
+ 'address' => null,
|
|
|
|
|
+ 'zip_code' => null,
|
|
|
|
|
+
|
|
|
|
|
+ 'birth_place' => null,
|
|
|
|
|
+ 'birth_date' => null,
|
|
|
|
|
+ 'birth_city_id' => null,
|
|
|
|
|
+ 'birth_province_id' => null,
|
|
|
|
|
+ 'birth_nation_id' => null,
|
|
|
|
|
+
|
|
|
|
|
+ 'nation_id' => null,
|
|
|
|
|
+ 'province_id' => null,
|
|
|
|
|
+ 'city_id' => null,
|
|
|
|
|
+
|
|
|
|
|
+ 'document_type' => null,
|
|
|
|
|
+ 'document_number' => null,
|
|
|
|
|
+ 'document_from' => null,
|
|
|
|
|
+ 'document_expire_date' => null,
|
|
|
|
|
+ 'document_files' => null,
|
|
|
|
|
+
|
|
|
|
|
+ 'father_name' => null,
|
|
|
|
|
+ 'mother_name' => null,
|
|
|
|
|
+ 'father_email' => null,
|
|
|
|
|
+ 'mother_email' => null,
|
|
|
|
|
+ 'father_phone' => null,
|
|
|
|
|
+ 'mother_phone' => null,
|
|
|
|
|
+ 'father_fiscal_code' => null,
|
|
|
|
|
+ 'mother_fiscal_code' => null,
|
|
|
|
|
+ 'father_doc_number' => null,
|
|
|
|
|
+ 'father_doc_type' => null,
|
|
|
|
|
+ 'mother_doc_number' => null,
|
|
|
|
|
+ 'mother_doc_type' => null,
|
|
|
|
|
+ 'father_document_files' => null,
|
|
|
|
|
+ 'mother_document_files' => null,
|
|
|
|
|
+
|
|
|
|
|
+ 'image' => null,
|
|
|
|
|
+
|
|
|
|
|
+ 'gender' => null,
|
|
|
|
|
+ 'status' => 'archived',
|
|
|
|
|
+
|
|
|
|
|
+ 'enabled' => false
|
|
|
|
|
+ ]);
|
|
|
|
|
+
|
|
|
|
|
+ updateMemberData($id);
|
|
|
|
|
+
|
|
|
|
|
+ session()->flash('success', 'Membro archiviato con successo');
|
|
|
|
|
+
|
|
|
|
|
+ $this->emit('reload');
|
|
|
|
|
+
|
|
|
|
|
+ } catch (\Exception $e) {
|
|
|
|
|
+ session()->flash('error', 'Errore durante l\'archiviazione: ' . $e->getMessage());
|
|
|
|
|
+ Log::error('Archive member error', [
|
|
|
|
|
+ 'member_id' => $id,
|
|
|
|
|
+ 'error' => $e->getMessage(),
|
|
|
|
|
+ 'trace' => $e->getTraceAsString()
|
|
|
|
|
+ ]);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class codicefiscale
|
|
class codicefiscale
|
|
@@ -2861,7 +2806,6 @@ class codicefiscale
|
|
|
$codice .= $this->_calcolaCifraControllo($codice);
|
|
$codice .= $this->_calcolaCifraControllo($codice);
|
|
|
|
|
|
|
|
if (strlen($codice) != 16) {
|
|
if (strlen($codice) != 16) {
|
|
|
- //$this->_setError(self::ERR_GENERIC);
|
|
|
|
|
return 'ERROR';
|
|
return 'ERROR';
|
|
|
}
|
|
}
|
|
|
|
|
|