refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
This commit is contained in:
132
resources/views/people/_header.blade.php
Normal file
132
resources/views/people/_header.blade.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<div class="ph3 ph5-ns pv2 cf w-100 mt4 mt0-ns">
|
||||
|
||||
@if ($contact->isMe())
|
||||
<div class="alert alert-success tc">
|
||||
{{ trans('people.me') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="mw9 center tc w-100 avatar-header relative">
|
||||
{{-- AVATAR --}}
|
||||
<div class="relative center dib z-3">
|
||||
<div class="relative hide-child">
|
||||
<div class="image-header top-0 left-0">
|
||||
<img class="cover br3 bb b--gray-monica"
|
||||
alt="{{ $contact->initials }}"
|
||||
src="{{ $contact->getAvatarURL() }}"
|
||||
style="height: 115px; width: 115px;"
|
||||
v-on:error="fixAvatarDisplay"
|
||||
/>
|
||||
<div class="hidden br3 dib white tc f1"
|
||||
style="padding-top: 21px; height: 115px; width: 115px; background-color: {{ $contact->default_avatar_color }}"
|
||||
>
|
||||
{{ $contact->initials }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="child absolute top-0 left-0 h-100 w-100 br3">
|
||||
<div class="db w-100 h-100 center tc pt5">
|
||||
<a class="no-underline white" href="{{ route('people.avatar.edit', $contact) }}">
|
||||
📷 {{ trans('app.update' )}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mw9 center dt w-100 box-shadow pa4 relative">
|
||||
|
||||
<h1 class="tc mb2 mt4">
|
||||
<span class="{{ htmldir() == 'ltr' ? 'mr1' : 'ml1' }}">{{ $contact->name }}</span>
|
||||
<contact-favorite hash="{{ $contact->hashID() }}" :starred="{{ \Safe\json_encode($contact->is_starred) }}"></contact-favorite>
|
||||
@if ($contact->job)
|
||||
<span class="db f5 normal">{{ $contact->job }}
|
||||
@if ($contact->company)
|
||||
({{ $contact->company }})
|
||||
@endif
|
||||
</span>
|
||||
@endif
|
||||
</h1>
|
||||
|
||||
<ul class="tc-ns mb3 {{ htmldir() == 'ltr' ? 'tl' : 'tr' }}">
|
||||
|
||||
{{-- AGE --}}
|
||||
<li class="mb2 mb0-ns di-ns db tc {{ htmldir() == 'ltr' ? 'mr3-ns' : 'ml3-ns' }}">
|
||||
@if ($contact->birthdate && !($contact->is_dead))
|
||||
@if ($contact->getBirthdayState() !== 'unknown')
|
||||
<span class="{{ htmldir() == 'ltr' ? 'mr1' : 'ml1' }}">@include('partials.icons.header_birthday')</span>
|
||||
@if($contact->getBirthdayState() === 'approximate')
|
||||
<span>{{ trans('people.age_approximate_in_years', ['age' => $contact->birthdate->getAge()]) }}</span>
|
||||
@elseif($contact->getBirthdayState() === 'almost')
|
||||
<span>{{$contact->birthdate->toShortString()}}</span>
|
||||
@else
|
||||
<span>{{$contact->birthdate->toShortString()}} ({{ $contact->birthdate->getAge() }})</span>
|
||||
@endif
|
||||
@endif
|
||||
@elseif ($contact->is_dead)
|
||||
@if (! is_null($contact->deceasedDate))
|
||||
{{ trans('people.deceased_label_with_date', ['date' => $contact->deceasedDate->toShortString()]) }}
|
||||
@if ($contact->deceasedDate->is_year_unknown == 0 && $contact->getBirthdayState() !== 'almost')
|
||||
<span>({{ trans('people.deceased_age') }} {{ $contact->getAgeAtDeath() }})</span>
|
||||
@endif
|
||||
@else
|
||||
{{ trans('people.deceased_label') }}
|
||||
@endif
|
||||
@endif
|
||||
</li>
|
||||
|
||||
{{-- LAST ACTIVITY --}}
|
||||
@if (! $contact->isMe())
|
||||
<li class="mb2 mb0-ns dn di-ns tc {{ htmldir() == 'ltr' ? 'mr3-ns' : 'ml3-ns' }}">
|
||||
<span class="{{ htmldir() == 'ltr' ? 'mr1' : 'ml1' }}">@include('partials.icons.header_people')</span>
|
||||
@if (is_null($contact->getLastActivityDate()))
|
||||
{{ trans('people.last_activity_date_empty') }}
|
||||
@else
|
||||
{{ trans('people.last_activity_date', ['date' => \App\Helpers\DateHelper::getShortDate($contact->getLastActivityDate())]) }}
|
||||
@endif
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- LAST CALLED --}}
|
||||
@if (! $contact->isMe())
|
||||
<li class="mb2 mb0-ns dn di-ns tc {{ htmldir() == 'ltr' ? 'mr3-ns' : 'ml3-ns' }}">
|
||||
<span class="{{ htmldir() == 'ltr' ? 'mr1' : 'ml1' }}">@include('partials.icons.header_call')</span>
|
||||
<last-called hash="{{ $contact->hashID() }}"
|
||||
initial-value="{{ is_null($contact->last_talked_to) ? null : \App\Helpers\DateHelper::getShortDate($contact->last_talked_to) }}"
|
||||
ref="lastCalledAttribute"
|
||||
>
|
||||
</last-called>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- DESCRIPTION --}}
|
||||
@if ($contact->description)
|
||||
<li class="mb2 mb0-ns di-ns db tc {{ htmldir() == 'ltr' ? 'mr3-ns' : 'ml3-ns' }}">
|
||||
@include('partials.icons.header_description')
|
||||
{{ $contact->description }}
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- STAY IN TOUCH --}}
|
||||
@if(!$contact->is_dead && ! $contact->isMe())
|
||||
<li class="mb2 mb0-ns di-ns db tc {{ htmldir() == 'ltr' ? 'mr3-ns' : 'ml3-ns' }}">
|
||||
@include('partials.icons.header_stayintouch')
|
||||
<stay-in-touch :first-name="'{{ $contact->first_name }}'" :frequency="{{ $contact->stay_in_touch_frequency ?? 'null' }}" :trigger-date="'{{ $contact->stay_in_touch_trigger_date !== null ? \App\Helpers\DateHelper::getTimestamp($contact->stay_in_touch_trigger_date) : null }}'" hash="{{ $contact->hashID() }}" :limited="{{ \Safe\json_encode($accountHasLimitations) }}"></stay-in-touch>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
<tags hash="{{ $contact->hashID() }}" class="mb3 mb0-ns"></tags>
|
||||
|
||||
<div class="absolute-ns tc profile-edit-contact-button">
|
||||
<a href="{{ route('people.edit', $contact) }}" class="btn" id="button-edit-contact">{{ trans('people.edit_contact_information') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ph3 ph5-ns pv2 cf w-100">
|
||||
<div class="mw9 center dt w-100">
|
||||
@include ('partials.errors')
|
||||
@include ('partials.notification')
|
||||
</div>
|
||||
</div>
|
||||
7
resources/views/people/activities/index.blade.php
Normal file
7
resources/views/people/activities/index.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="{{ htmldir() == 'ltr' ? 'fl' : 'fr' }} w-100 pb3 pt1 pl3 pr3">
|
||||
<div class="br2 bg-white mb2">
|
||||
|
||||
<activity-list hash="{{ $contact->hashID() }}" :contact-id="{{ $contact->id }}" name="{{ $contact->first_name }}" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
130
resources/views/people/activities/year.blade.php
Normal file
130
resources/views/people/activities/year.blade.php
Normal file
@@ -0,0 +1,130 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('title', $contact->name )
|
||||
|
||||
@section('content')
|
||||
{{-- Breadcrumb --}}
|
||||
<section class="ph3 ph5-ns pt4 cf w-100 bg-gray-monica">
|
||||
<div class="mw7 center">
|
||||
<div class="full-page-modal-header ph4 pv3 bt br bl b--gray-monica">
|
||||
<ul>
|
||||
<li class="di"><a href="{{ route('people.show', $contact) }}">{{ trans('app.breadcrumb_profile', ['name' => $contact->name]) }}</a></li>
|
||||
<li class="di ph2">></li>
|
||||
<li class="di">{{ trans('people.activity_title') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- Main section --}}
|
||||
<section class="ph3 ph5-ns cf w-100 bg-gray-monica mb5">
|
||||
<div class="mw8 center full-page-modal pt4">
|
||||
<h2 class="tc bb b--gray-monica pb4 mb3 normal">{{ trans('people.activities_profile_title', ['name' => $contact->first_name]) }}</h2>
|
||||
<h2 class="tc pt3 pb4 ph3 f4 normal">🚀 {{ trans_choice('people.activities_profile_subtitle', $totalActivities, ['total_activities' => $totalActivities, 'activities_last_twelve_months' => $activitiesLastTwelveMonths, 'name' => $contact->first_name]) }}</h2>
|
||||
<div class="cf ph2-ns">
|
||||
|
||||
{{-- Left sidebar --}}
|
||||
<div class="fl w-100 w-25-ns pa2">
|
||||
<div class="bg-white">
|
||||
<ul>
|
||||
@foreach($activitiesPerYear as $activityStatistic)
|
||||
<li class="full-page-modal-year-selector pv2 b {{ $year == $activityStatistic->year ? 'selected' : '' }}">
|
||||
|
||||
<span class="ph3">
|
||||
@if ($year != $activityStatistic->year)
|
||||
<a href="{{ route('people.activities.year', [$contact, $activityStatistic->year]) }}">
|
||||
@endif
|
||||
|
||||
{{ $activityStatistic->year }}
|
||||
|
||||
@if ($year != $activityStatistic->year)
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<span class="fr mr3">{{ $activityStatistic->count }}</span>
|
||||
</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Right Content --}}
|
||||
<div class="fl w-100 w-75-ns pa2">
|
||||
<div class="bg-white">
|
||||
<p class="tc b">🤲 {{ trans('people.activities_profile_year_summary_activity_types', ['year' => $year]) }}</p>
|
||||
<ul class="column-list mb4">
|
||||
@foreach($uniqueActivityTypes as $activityType)
|
||||
<li class="mb2 relative tc">
|
||||
<span class="f3">{{ $activityType['occurences'] }}</span>
|
||||
<span class="relative" style="top: -3px;">{{ $activityType['object']->name }}</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<p class="tc b mb4">{{ trans('people.activities_profile_year_summary', ['year' => $year]) }}</p>
|
||||
|
||||
{{-- Bar chart --}}
|
||||
<div class="ba b--gray-monica mb5-ns mb6 br2">
|
||||
<ul class="chart-activities">
|
||||
@foreach ($activitiesPerMonthForYear->sortBy('month') as $activityMonth)
|
||||
<li>
|
||||
<span class="f6" style="height: {{ $activityMonth['percent'] }}%" title="{{ \App\Helpers\DateHelper::getShortMonth(\Carbon\Carbon::create(1990, $activityMonth['month'], 1)) }}"></span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{-- Details about each month --}}
|
||||
@foreach ($activitiesPerMonthForYear as $activityMonth)
|
||||
@if ($activityMonth['occurences'] != 0)
|
||||
|
||||
<h3 class="f4">
|
||||
<svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg" class="mr2">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 14V15H0V0H1V14H16ZM5 13H3V8H5V13ZM9 13H7V3H9V13ZM13 13H11V6H13V13Z" fill="#4CA35A" />
|
||||
</svg>
|
||||
{{ \App\Helpers\DateHelper::getFullMonthAndDate(\Carbon\Carbon::create($year, $activityMonth['month'])) }} <span class="black-70 f4 normal ml3">{{ trans_choice('people.activities_profile_number_occurences', $activityMonth['occurences'], ['value' => $activityMonth['occurences']]) }}</span>
|
||||
</h3>
|
||||
|
||||
{{-- Activities list --}}
|
||||
@foreach ($activityMonth['activities'] as $activity)
|
||||
<div class="pl2 bl-ns b--gray-monica">
|
||||
<div class="pa3-ns pa2 br2 mb3-ns mb2 ml4-ns ml2">
|
||||
<div class="mb1">
|
||||
<ul class="mb3 di black-70">
|
||||
<li class="di relative pr1" style="top:2px">
|
||||
<svg width="13" height="14" viewBox="0 0 13 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.6308 1H10.6615V2.5C10.6615 2.78 10.4483 3 10.1769 3H8.23846C7.96708 3 7.75385 2.78 7.75385 2.5V1H4.84615V2.5C4.84615 2.78 4.63292 3 4.36154 3H2.42308C2.15169 3 1.93846 2.78 1.93846 2.5V1H0.969231C0.436154 1 0 1.45 0 2V13C0 13.55 0.436154 14 0.969231 14H11.6308C12.1638 14 12.6 13.55 12.6 13V2C12.6 1.45 12.1638 1 11.6308 1ZM11.6308 13H0.969231V4H11.6308V13ZM3.87692 2H2.90769V0H3.87692V2ZM9.69231 2H8.72308V0H9.69231V2ZM4.84615 6H3.87692V5H4.84615V6ZM6.78461 6H5.81538V5H6.78461V6ZM8.72308 6H7.75385V5H8.72308V6ZM10.6615 6H9.69231V5H10.6615V6ZM2.90769 8H1.93846V7H2.90769V8ZM4.84615 8H3.87692V7H4.84615V8ZM6.78461 8H5.81538V7H6.78461V8ZM8.72308 8H7.75385V7H8.72308V8ZM10.6615 8H9.69231V7H10.6615V8ZM2.90769 10H1.93846V9H2.90769V10ZM4.84615 10H3.87692V9H4.84615V10ZM6.78461 10H5.81538V9H6.78461V10ZM8.72308 10H7.75385V9H8.72308V10ZM10.6615 10H9.69231V9H10.6615V10ZM2.90769 12H1.93846V11H2.90769V12ZM4.84615 12H3.87692V11H4.84615V12ZM6.78461 12H5.81538V11H6.78461V12ZM8.72308 12H7.75385V11H8.72308V12Z" fill="#CDCDCD" />
|
||||
</svg>
|
||||
</li>
|
||||
<li class="di f6 pr3">
|
||||
{{ \App\Helpers\DateHelper::getShortDate($activity->happened_at) }}
|
||||
</li>
|
||||
@if (!is_null($activity->type))
|
||||
<li class="di relative pr1" style="top:1px">
|
||||
<svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 2H7V1C7 0.34 6.69 0 6 0H1C0.45 0 0 0.45 0 1V11C0 11.55 0.45 12 1 12H13C13.55 12 14 11.55 14 11V3C14 2.45 13.55 2 13 2ZM6 2H1V1H6V2Z" fill="#DFDFDF" />
|
||||
</svg>
|
||||
</li>
|
||||
<li class="di f6">
|
||||
{{ $activity->type->name }}
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
<p class="mb2"><strong>{{ $activity->summary }}</strong></p>
|
||||
<p class="mb0">{{ $activity->description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
65
resources/views/people/auditlogs/index.blade.php
Normal file
65
resources/views/people/auditlogs/index.blade.php
Normal file
@@ -0,0 +1,65 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('title', $contact->name )
|
||||
|
||||
@section('content')
|
||||
{{-- Breadcrumb --}}
|
||||
<section class="ph3 ph5-ns pt4 cf w-100 bg-gray-monica">
|
||||
<div class="mw7 center">
|
||||
<div class="full-page-modal-header ph4 pv3 bt br bl b--gray-monica tc">
|
||||
<ul>
|
||||
<li class="di"><a href="{{ route('people.show', $contact) }}">{{ trans('app.breadcrumb_profile', ['name' => $contact->name]) }}</a></li>
|
||||
<li class="di ph2">></li>
|
||||
<li class="di">{{ trans('people.auditlogs_breadcrumb') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- Main section --}}
|
||||
<section class="ph3 ph5-ns cf w-100 bg-gray-monica mb5">
|
||||
<div class="mw8 center full-page-modal pt4">
|
||||
<h2 class="tc bb b--gray-monica pb4 mb3 normal">{{ trans('people.auditlogs_title', ['name' => $contact->first_name]) }}</h2>
|
||||
<div class="cf ph2-ns">
|
||||
|
||||
{{-- Left sidebar --}}
|
||||
<div class="fl w-100 w-100-ns pa2">
|
||||
<div class="bg-white">
|
||||
<ul class="table">
|
||||
<li class="table-row">
|
||||
<div class="table-cell table-header">
|
||||
{{ trans('settings.logs_actor') }}
|
||||
</div>
|
||||
<div class="table-cell table-header date">
|
||||
{{ trans('settings.logs_timestamp') }}
|
||||
</div>
|
||||
<div class="table-cell table-header">
|
||||
{{ trans('settings.logs_description') }}
|
||||
</div>
|
||||
</li>
|
||||
@foreach ($logsCollection as $log)
|
||||
<li class="table-row">
|
||||
<div class="table-cell audit-log-cell">
|
||||
{{ $log['author_name'] }}
|
||||
</div>
|
||||
<div class="table-cell audit-log-cell date">
|
||||
{{ \App\Helpers\DateHelper::getShortDateWithTime($log['audited_at']) }}
|
||||
</div>
|
||||
<div class="table-cell audit-log-cell">
|
||||
{{ $log['description'] }}
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<div class="tc center">
|
||||
{{ $logsPagination->links() }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
44
resources/views/people/avatar/edit.blade.php
Normal file
44
resources/views/people/avatar/edit.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<section class="ph3 ph0-ns">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<p><a href="{{ route('people.show', $contact) }}">< {{ $contact->name }}</a></p>
|
||||
<h3 class="f3 fw5">{{ trans('people.avatar_change_title') }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="mw7 center br3 ba b--gray-monica bg-white mb5">
|
||||
<form method="POST" action="{{ route('people.avatar.update', $contact) }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
{{-- Adorable --}}
|
||||
<contact-avatar
|
||||
:avatar="'{{ $contact->avatar_source }}'"
|
||||
:default-url="'{{ $contact->getAvatarDefaultURL() }}'"
|
||||
:adorable-url="'{{ $contact->avatar_adorable_data_url }}'"
|
||||
:gravatar-url="'{{ $contact->avatar_gravatar_url }}'"
|
||||
:photo-url="'{{ $contact->getAvatarURL() }}'"
|
||||
:has-reached-account-storage-limit="false"
|
||||
:max-upload-size="{{ config('monica.max_upload_size') }}"
|
||||
>
|
||||
</contact-avatar>
|
||||
|
||||
{{-- Form actions --}}
|
||||
<div class="ph4-ns ph3 pv3 bb b--gray-monica">
|
||||
<div class="flex-ns justify-between">
|
||||
<div>
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary w-auto-ns w-100 mb2 pb0-ns">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-primary w-auto-ns w-100 mb2 pb0-ns" name="save" type="submit">{{ trans('app.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
40
resources/views/people/blank.blade.php
Normal file
40
resources/views/people/blank.blade.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<div class="blank-people-state">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@if (! is_null($tags))
|
||||
<p class="clear-filter">
|
||||
{{ trans('people.people_list_filter_tag') }}
|
||||
@foreach ($tags as $tag)
|
||||
<span class="pretty-tag">
|
||||
{{ $tag->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
<a href="{{ route('people.index') }}">{{ trans('people.people_list_clear_filter') }}</a>
|
||||
</p>
|
||||
@endif
|
||||
@if ($tagLess)
|
||||
<p class="clear-filter">
|
||||
<span class="mr2">{{ trans('people.people_list_filter_untag') }}</span>
|
||||
<a href="{{ route('people.index') }}">{{ trans('people.people_list_clear_filter') }}</a>
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<div class="illustration-blank">
|
||||
<img src="img/people/blank.svg" alt="Image">
|
||||
</div>
|
||||
<h3>{{ trans('people.people_list_blank_title') }}</h3>
|
||||
|
||||
<div class="cta-blank">
|
||||
<a href="{{ route('people.create') }}" class="btn btn-primary" id="button-add-contact">{{ trans('people.people_list_blank_cta') }}</a>
|
||||
</div>
|
||||
|
||||
<div class="mb4">
|
||||
@if ($hasArchived)
|
||||
<a href="{{ route('people.archived') }}">@lang('people.list_link_to_archived_contacts')</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
5
resources/views/people/calls/index.blade.php
Normal file
5
resources/views/people/calls/index.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="{{ htmldir() == 'ltr' ? 'fl' : 'fr' }} w-100 pb3 pt1 pl3 pr3">
|
||||
<div class="br2 bg-white mb2">
|
||||
<phone-call-list hash="{{ $contact->hashID() }}" name="{{ $contact->first_name }}"></phone-call-list>
|
||||
</div>
|
||||
</div>
|
||||
93
resources/views/people/conversations/edit.blade.php
Normal file
93
resources/views/people/conversations/edit.blade.php
Normal file
@@ -0,0 +1,93 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
|
||||
<section class="ph3 ph0-ns">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<p><a href="{{ route('people.show', $contact) }}">< {{ $contact->name }}</a></p>
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<h3 class="f3 fw5">{{ trans('people.conversation_edit_title') }}</h3>
|
||||
<form method="POST" action="{{ route('people.conversations.destroy', [$contact, $conversation]) }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<confirm message="{{ trans('people.conversation_edit_delete') }}" link-class="w-auto-ns w-100 mb2 pb0-ns">
|
||||
{{ trans('people.conversation_delete_link') }}
|
||||
</confirm>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mw7 center br3 ba b--gray-monica bg-white mb6">
|
||||
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
<form action="{{ route('people.conversations.update', [$contact, $conversation]) }}" method="POST" enctype="multipart/form-data">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
|
||||
{{-- When did it take place --}}
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<p class="mb2 b">{{ trans('people.conversation_add_when') }}</p>
|
||||
<div class="">
|
||||
<div class="di {{ htmldir() == 'ltr' ? 'mr3' : 'ml3' }}">
|
||||
<input type="radio" class="mr1" id="today" name="conversationDateRadio" value="today">
|
||||
<label for="today" class="pointer">{{ trans('app.today') }}</label>
|
||||
</div>
|
||||
<div class="di {{ htmldir() == 'ltr' ? 'mr3' : 'ml3' }}">
|
||||
<input type="radio" class="mr1" id="yesterday" name="conversationDateRadio" value="yesterday">
|
||||
<label for="yesterday" class="pointer">{{ trans('app.yesterday') }}</label>
|
||||
</div>
|
||||
<div class="di {{ htmldir() == 'ltr' ? 'mr3' : 'ml3' }}">
|
||||
<input type="radio" id="another" name="conversationDateRadio" value="another" checked>
|
||||
<label for="another" class="pointer mr2">{{ trans('app.another_day') }}
|
||||
<span class="dib">
|
||||
<form-date
|
||||
:id="'conversationDate'"
|
||||
:default-date="'{{ now() }}'"
|
||||
:value="'{{ $conversation->happened_at }}'"
|
||||
:locale="'{{ \App::getLocale() }}'">
|
||||
</form-date>
|
||||
</span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- What tool did you use --}}
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<form-select
|
||||
:options="{{ $contactFieldTypes }}"
|
||||
:required="true"
|
||||
value="{{ $conversation->contact_field_type_id }}"
|
||||
:title="'{{ trans('people.conversation_add_how') }}'"
|
||||
:id="'contactFieldTypeId'">
|
||||
</form-select>
|
||||
</div>
|
||||
|
||||
{{-- Conversation --}}
|
||||
<conversation participant-name="{{ $contact->first_name }}" :existing-messages="{{ $messages }}"></conversation>
|
||||
|
||||
{{-- Form actions --}}
|
||||
<div class="ph4-ns ph3 pv3 bb b--gray-monica">
|
||||
<div class="flex-ns justify-between">
|
||||
<div class="">
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary tc w-auto-ns w-100 mb2 pb0-ns">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
<div class="">
|
||||
<button class="btn btn-primary w-auto-ns w-100 mb2 pb0-ns" name="save" type="submit">{{ trans('app.update') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
28
resources/views/people/conversations/index.blade.php
Normal file
28
resources/views/people/conversations/index.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="col-12 {{ \App\Helpers\LocaleHelper::getDirection() }}">
|
||||
<h3>
|
||||
🗣 {{ trans('people.conversation_list_title') }}
|
||||
|
||||
<span class="relative {{ \App\Helpers\LocaleHelper::getDirection() == 'ltr' ? 'fr' : 'fl' }}" style="top: -7px;">
|
||||
<a href="{{ route('people.conversations.create', $contact) }}" class="btn edit-information">{{ trans('people.conversation_list_cta') }}</a>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@if ($contact->conversations->count() > 0)
|
||||
|
||||
<div class="{{ \App\Helpers\LocaleHelper::getDirection() == 'ltr' ? 'fl' : 'fr' }} w-100 pb3 pt1 pl3 pr3">
|
||||
<div class="br2 bg-white mb4">
|
||||
<conversation-list hash="{{ $contact->hashID() }}"></conversation-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<div class="col-12" cy-name="conversation-blank-state">
|
||||
<div class="section-blank">
|
||||
<h3>{{ trans('people.conversation_blank', ['name' => $contact->first_name]) }}</h3>
|
||||
<a href="{{ route('people.conversations.create', $contact) }}" cy-name="add-conversation-button">{{ trans('people.conversation_list_cta') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
83
resources/views/people/conversations/new.blade.php
Normal file
83
resources/views/people/conversations/new.blade.php
Normal file
@@ -0,0 +1,83 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
|
||||
<section class="ph3 ph0-ns">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<p><a href="{{ route('people.show', $contact) }}">< {{ $contact->name }}</a></p>
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<h3 class="f3 fw5">{{ trans('people.conversation_add_title') }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mw7 center br3 ba b--gray-monica bg-white mb6">
|
||||
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
<form action="{{ route('people.conversations.store', $contact) }}" method="POST">
|
||||
@csrf
|
||||
|
||||
{{-- When did it take place --}}
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<p class="mb2 b">{{ trans('people.conversation_add_when') }}</p>
|
||||
<div class="">
|
||||
<div class="di mr3">
|
||||
<input type="radio" class="mr1" id="today" name="conversationDateRadio" value="today" checked>
|
||||
<label for="today" class="pointer">{{ trans('app.today') }}</label>
|
||||
</div>
|
||||
<div class="di mr3">
|
||||
<input type="radio" class="mr1" id="yesterday" name="conversationDateRadio" value="yesterday">
|
||||
<label for="yesterday" class="pointer">{{ trans('app.yesterday') }}</label>
|
||||
</div>
|
||||
<div class="di mr3">
|
||||
<input type="radio" id="another" name="conversationDateRadio" value="another">
|
||||
<label for="another" class="pointer mr2">{{ trans('app.another_day') }}</label>
|
||||
<div class="dib">
|
||||
<form-date
|
||||
:id="'conversationDate'"
|
||||
:default-date="'{{ now(\App\Helpers\DateHelper::getTimezone()) }}'"
|
||||
:locale="'{{ \App::getLocale() }}'">
|
||||
</form-date>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- What tool did you use --}}
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<form-select
|
||||
:options="{{ $contactFieldTypes }}"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.conversation_add_how') }}'"
|
||||
:id="'contactFieldTypeId'">
|
||||
</form-select>
|
||||
</div>
|
||||
|
||||
{{-- Conversation --}}
|
||||
<conversation participant-name="{{ $contact->first_name }}"></conversation>
|
||||
|
||||
{{-- Form actions --}}
|
||||
<div class="ph4-ns ph3 pv3 bb b--gray-monica">
|
||||
<div class="flex-ns justify-between">
|
||||
<div class="">
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary tc w-auto-ns w-100 mb2 pb0-ns">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
<div class="">
|
||||
<button class="btn btn-primary w-auto-ns w-100 mb2 pb0-ns" cy-name="save-conversation-button" name="save" type="submit">{{ trans('app.add') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
153
resources/views/people/create.blade.php
Normal file
153
resources/views/people/create.blade.php
Normal file
@@ -0,0 +1,153 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
|
||||
<section class="ph3 ph0-ns">
|
||||
<div class="mt4 mw7 center mb3">
|
||||
@if ($isContactMissing)
|
||||
<h2 class="f2 fw5">{{ trans('people.people_add_missing') }}</h2>
|
||||
@else
|
||||
<h2 class="f3 fw5">{{ trans('people.people_add_title') }}</h2>
|
||||
@endif
|
||||
|
||||
@if (! $accountHasLimitations)
|
||||
<p class="import">{!! trans('people.people_add_import', ['url' => route('settings.import')]) !!}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="mw7 center br3 ba b--gray-monica bg-white mb6">
|
||||
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
<form action="{{ route('people.store') }}" method="POST">
|
||||
@csrf
|
||||
|
||||
<div class="pa4-ns ph3 pv2 bb b--gray-monica">
|
||||
{{-- This check is for the cultures that are used to say the last name first --}}
|
||||
@if ($formNameOrder == 'firstname')
|
||||
|
||||
<div class="mb3">
|
||||
<form-input
|
||||
:id="'first_name'"
|
||||
:input-type="'text'"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.people_add_firstname') }}'"
|
||||
value="{{ $firstName }}">
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="mb3">
|
||||
<form-input
|
||||
:id="'middle_name'"
|
||||
:input-type="'text'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_middlename') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="mb3">
|
||||
<form-input
|
||||
:id="'last_name'"
|
||||
:input-type="'text'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_lastname') }}'"
|
||||
value="{{ $lastName }}">
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="mb3 mb0-ns">
|
||||
<form-input
|
||||
:id="'nickname'"
|
||||
:input-type="'text'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_nickname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<div class="mb3">
|
||||
<form-input
|
||||
:id="'last_name'"
|
||||
:input-type="'text'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_lastname') }}'"
|
||||
value="{{ $lastName }}">
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="mb3">
|
||||
<form-input
|
||||
:id="'first_name'"
|
||||
:input-type="'text'"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.people_add_firstname') }}'"
|
||||
value="{{ $firstName }}">
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="mb3">
|
||||
<form-input
|
||||
:id="'middle_name'"
|
||||
:input-type="'text'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_middlename') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="mb3 mb0-ns">
|
||||
<form-input
|
||||
:id="'nickname'"
|
||||
:input-type="'text'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_nickname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<form-input
|
||||
:id="'email'"
|
||||
:input-type="'text'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_email') }}'"
|
||||
:value="'{{ $email }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<form-select
|
||||
:options="{{ $genders }}"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_gender') }}'"
|
||||
:id="'gender'"
|
||||
:value="'{{ $defaultGender }}'">
|
||||
</form-select>
|
||||
</div>
|
||||
|
||||
{{-- Form actions --}}
|
||||
<div class="ph4-ns ph3 pv3 bb b--gray-monica">
|
||||
<div class="flex-ns justify-between">
|
||||
<div>
|
||||
<a href="{{ route('people.index') }}" class="btn btn-secondary w-auto-ns w-100 mb2 pb0-ns">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-secondary w-auto-ns w-100 mb2 pb0-ns" name="save_and_add_another" type="submit">{{ trans('people.people_save_and_add_another_cta') }}</button>
|
||||
<button class="btn btn-primary w-auto-ns w-100 mb2 pb0-ns" name="save" value="true" type="submit">{{ trans('people.people_add_cta') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
46
resources/views/people/debt/add.blade.php
Normal file
46
resources/views/people/debt/add.blade.php
Normal file
@@ -0,0 +1,46 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<div class="people-show debt">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="breadcrumb">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="horizontal">
|
||||
<li>
|
||||
<a href="{{ route('dashboard.index') }}">{{ trans('app.breadcrumb_dashboard') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('people.index') }}">{{ trans('app.breadcrumb_list_contacts') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ $contact->name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page header -->
|
||||
@include('people._header')
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="main-content central-form">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 offset-sm-3 offset-sm-3-right">
|
||||
@include('people.debt.form', [
|
||||
'method' => 'POST',
|
||||
'action' => route('people.debts.store', $contact),
|
||||
'update_or_add' =>'add'
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
46
resources/views/people/debt/edit.blade.php
Normal file
46
resources/views/people/debt/edit.blade.php
Normal file
@@ -0,0 +1,46 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<div class="people-show debt">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="breadcrumb">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="horizontal">
|
||||
<li>
|
||||
<a href="{{ route('dashboard.index') }}">{{ trans('app.breadcrumb_dashboard') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('people.index') }}">{{ trans('app.breadcrumb_list_contacts') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ $contact->name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page header -->
|
||||
@include('people._header')
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="main-content central-form">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 offset-sm-3 offset-sm-3-right">
|
||||
@include('people.debt.form', [
|
||||
'method' => 'PUT',
|
||||
'action' => route('people.debts.update', [$contact, $debt]),
|
||||
'update_or_add' =>'edit'
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
44
resources/views/people/debt/form.blade.php
Normal file
44
resources/views/people/debt/form.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<form method="POST" action="{{ $action }}">
|
||||
@method($method)
|
||||
@csrf
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
<h2>{{ trans('people.debt_add_title') }}</h2>
|
||||
|
||||
{{-- Debt direction --}}
|
||||
<fieldset class="form-group">
|
||||
<label class="form-check-inline" for="youowe">
|
||||
<input type="radio" class="form-check-input" name="in_debt" id="youowe" value="yes" @if(old('in_debt') !== 'no' || $debt->in_debt !== 'no') checked @endif>
|
||||
{{ trans('people.debt_add_you_owe', ['name' => $contact->first_name]) }}
|
||||
</label>
|
||||
|
||||
<label class="form-check-inline" for="theyowe">
|
||||
<input type="radio" class="form-check-input" name="in_debt" id="theyowe" value="no" @if(old('in_debt') === 'no' || $debt->in_debt === 'no') checked @endif>
|
||||
{{ trans('people.debt_add_they_owe', ['name' => $contact->first_name]) }}
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
{{-- Amount --}}
|
||||
<div class="form-group">
|
||||
<label for="amount">{{ trans('people.debt_add_amount') }} ({{ Auth::user()->currency->symbol }})</label>
|
||||
<input type="number" step=".01" class="form-control" name="amount" id="amount" maxlength="254" value="{{ old('amount') ?? $debt->amount }}" autofocus required>
|
||||
</div>
|
||||
|
||||
{{-- Reason --}}
|
||||
<div class="form-group">
|
||||
<label for="reason">{{ trans('people.debt_add_reason') }}</label>
|
||||
<textarea class="form-control" name="reason" id="reason" maxlength="2500">{{ old('reason') ?? $debt->reason }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group actions">
|
||||
<button type="submit" cy-name="save-debt-button" class="btn btn-primary">
|
||||
@if($update_or_add == 'add')
|
||||
{{ trans('people.debt_add_add_cta') }}
|
||||
@elseif ($update_or_add == 'edit')
|
||||
{{ trans('people.debt_edit_update_cta') }}
|
||||
@endif
|
||||
</button>
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary">{{ trans('app.cancel') }}</a>
|
||||
</div> <!-- .form-group -->
|
||||
</form>
|
||||
86
resources/views/people/debt/index.blade.php
Normal file
86
resources/views/people/debt/index.blade.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<div class="col-12 section-title">
|
||||
<img src="img/people/debt/bill.svg" class="icon-section icon-money">
|
||||
<h3>
|
||||
{{ trans('people.debt_title') }}
|
||||
|
||||
<span class="{{ htmldir() == 'ltr' ? 'fr' : 'fl' }}">
|
||||
<a href="{{ route('people.debts.create', $contact) }}" class="btn">{{ trans('people.debt_add_cta') }}</a>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@if (!$contact->hasDebt())
|
||||
|
||||
<div class="col-12" cy-name="debt-blank-state">
|
||||
<div class="section-blank">
|
||||
<h3>{{ trans('people.debts_blank_title', ['name' => $contact->first_name]) }}</h3>
|
||||
<a href="{{ route('people.debts.create', $contact) }}" cy-name="add-debt-button">{{ trans('people.debt_add_cta') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<div class="col-12 debts-list">
|
||||
|
||||
<ul class="table" cy-name="debts-body" cy-items="{{ $contact->debts->implode('id', ',') }}">
|
||||
@foreach($contact->debts as $debt)
|
||||
<li class="table-row" cy-name="debt-item-{{ $debt->id }}">
|
||||
<div class="table-cell date">
|
||||
{{ \App\Helpers\DateHelper::getShortDate($debt->created_at) }}
|
||||
</div>
|
||||
<div class="table-cell debt-nature">
|
||||
@if ($debt->in_debt == 'yes')
|
||||
{{ trans('people.debt_you_owe', [
|
||||
'amount' => $debt->displayValue
|
||||
]) }}
|
||||
@else
|
||||
{{ trans('people.debt_they_owe', [
|
||||
'name' => $contact->first_name,
|
||||
'amount' => $debt->displayValue
|
||||
]) }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="table-cell reason">
|
||||
@if (! is_null($debt->reason))
|
||||
{{ $debt->reason }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="table-cell list-actions">
|
||||
<a href="{{ route('people.debts.edit', [$contact, $debt]) }}" cy-name="edit-debt-button-{{ $debt->id }}">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
<form method="POST" action="{{ route('people.debts.destroy', [$contact, $debt]) }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<confirm message="{{ trans('people.debt_delete_confirmation') }}" cy-name="delete-debt-button-{{ $debt->id }}" :name="'delete-debt'">
|
||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
||||
</confirm>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
@endforeach
|
||||
<li class="table-row">
|
||||
<div class="table-cell"></div>
|
||||
<div class="table-cell">
|
||||
<strong>
|
||||
@if ($contact->isOwedMoney())
|
||||
{{ trans('people.debt_they_owe', [
|
||||
'name' => $contact->first_name,
|
||||
'amount' => App\Helpers\MoneyHelper::format($contact->totalOutstandingDebtAmount(), Auth::user()->currency)
|
||||
]) }}
|
||||
@else
|
||||
{{ trans('people.debt_you_owe', [
|
||||
'amount' => App\Helpers\MoneyHelper::format(-$contact->totalOutstandingDebtAmount(), Auth::user()->currency)
|
||||
]) }}
|
||||
@endif
|
||||
</strong>
|
||||
</div>
|
||||
<div class="table-cell"></div>
|
||||
<div class="table-cell"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
22
resources/views/people/documents/index.blade.php
Normal file
22
resources/views/people/documents/index.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="{{ htmldir() == 'ltr' ? 'fl' : 'fr' }} w-100 pb3 pt1 pl3 pr3">
|
||||
<div class="br2 bg-white mb4">
|
||||
|
||||
@if (config('monica.requires_subscription') && $accountHasLimitations)
|
||||
|
||||
<div class="">
|
||||
<h3>
|
||||
📄 {{ trans('people.document_list_title') }}
|
||||
</h3>
|
||||
|
||||
<div class="section-blank">
|
||||
<p>{{ trans('settings.storage_upgrade_notice') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<document-list hash="{{ $contact->hashID() }}" reach-limit="{{ \Safe\json_encode($hasReachedAccountStorageLimit) }}"></document-list>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
165
resources/views/people/edit.blade.php
Normal file
165
resources/views/people/edit.blade.php
Normal file
@@ -0,0 +1,165 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<section class="ph3 ph0-ns">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<p><a href="{{ route('people.show', $contact) }}">< {{ $contact->name }}</a></p>
|
||||
<h3 class="f3 fw5">{{ trans('people.information_edit_title', ['name' => $contact->first_name]) }}</h3>
|
||||
|
||||
@if (! $accountHasLimitations)
|
||||
<p class="import">{!! trans('people.people_add_import', ['url' => 'settings/import']) !!}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="mw7 center br3 ba b--gray-monica bg-white mb5">
|
||||
<form method="POST" action="{{ route('people.update', $contact) }}" enctype="multipart/form-data">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
{{-- Name --}}
|
||||
<div class="pa4-ns ph3 pv2 bb b--gray-monica">
|
||||
{{-- This check is for the cultures that are used to say the last name first --}}
|
||||
<div class="mb3 mb0-ns">
|
||||
@if ($formNameOrder == 'firstname')
|
||||
|
||||
<div class="dt-ns dt--fixed di">
|
||||
<div class="dtc-ns pr2-ns pb0-ns w-100 pb3">
|
||||
<form-input
|
||||
value="{{ $contact->first_name }}"
|
||||
:input-type="'text'"
|
||||
:id="'firstname'"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.people_add_firstname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="dtc-ns pr2-ns pb0-ns w-100 pb3">
|
||||
<form-input
|
||||
value="{{ $contact->middle_name }}"
|
||||
:input-type="'text'"
|
||||
:id="'middlename'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_middlename') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="dtc-ns pr2-ns pb0-ns w-100 pb3">
|
||||
<form-input
|
||||
value="{{ $contact->last_name }}"
|
||||
:input-type="'text'"
|
||||
:id="'lastname'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_lastname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="dtc-ns pb0-ns w-100">
|
||||
<form-input
|
||||
value="{{ $contact->nickname }}"
|
||||
:input-type="'text'"
|
||||
:id="'nickname'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_nickname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<div class="dt-ns dt--fixed di">
|
||||
<div class="dtc-ns pr2-ns pb0-ns w-100 pb3">
|
||||
<form-input
|
||||
value="{{ $contact->last_name }}"
|
||||
:input-type="'text'"
|
||||
:id="'lastname'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_lastname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="dtc-ns pr2-ns pb0-ns w-100 pb3">
|
||||
<form-input
|
||||
value="{{ $contact->first_name }}"
|
||||
:input-type="'text'"
|
||||
:id="'firstname'"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.people_add_firstname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="dtc-ns pb0-ns w-100">
|
||||
<form-input
|
||||
value="{{ $contact->nickname }}"
|
||||
:input-type="'text'"
|
||||
:id="'nickname'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_nickname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Gender --}}
|
||||
<div class="pa4-ns ph3 pv2 bb b--gray-monica">
|
||||
<div class="mb3 mb0-ns">
|
||||
<form-select
|
||||
:options="{{ $genders }}"
|
||||
value="{{ $contact->gender_id }}"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_gender') }}'"
|
||||
:id="'gender'">
|
||||
</form-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Description --}}
|
||||
<div class="pa4-ns ph3 pv2 bb b--gray-monica">
|
||||
<div class="mb3 mb0-ns">
|
||||
<form-input
|
||||
value="{{ $contact->description }}"
|
||||
:input-type="'text'"
|
||||
:id="'description'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.information_edit_description') }}'">
|
||||
</form-input>
|
||||
<small id="emailHelp" class="form-text text-muted">{{ trans('people.information_edit_description_help') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Birthdate --}}
|
||||
<form-specialdate
|
||||
:months="{{ $months }}"
|
||||
:days="{{ $days }}"
|
||||
:month="{{ $month }}"
|
||||
:day="{{ $day }}"
|
||||
:age="{{ $age ?: 0 }}"
|
||||
:birthdate="'{{ $birthdate }}'"
|
||||
:reminder="{{ \Safe\json_encode($hasBirthdayReminder) }}"
|
||||
:value="'{{ $birthdayState }}'"
|
||||
></form-specialdate>
|
||||
|
||||
{{-- Is the contact deceased? --}}
|
||||
<form-specialdeceased
|
||||
:value="{{ \Safe\json_encode($contact->is_dead) }}"
|
||||
:date="'{{ $deceaseddate }}'"
|
||||
:reminder="{{ \Safe\json_encode($hasDeceasedReminder) }}"
|
||||
>
|
||||
</form-specialdeceased>
|
||||
|
||||
{{-- Form actions --}}
|
||||
<div class="ph4-ns ph3 pv3 bb b--gray-monica">
|
||||
<div class="flex-ns justify-between">
|
||||
<div>
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary w-auto-ns w-100 mb2 pb0-ns" style="text-align: center;">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-primary w-auto-ns w-100 mb2 pb0-ns" name="save" type="submit">{{ trans('app.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
64
resources/views/people/food-preferences/edit.blade.php
Normal file
64
resources/views/people/food-preferences/edit.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<div class="people-show">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="breadcrumb">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="horizontal">
|
||||
<li>
|
||||
<a href="{{ route('dashboard.index') }}">{{ trans('app.breadcrumb_dashboard') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('people.index') }}">{{ trans('app.breadcrumb_list_contacts') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ $contact->name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page header -->
|
||||
@include('people._header')
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="main-content food-preferences central-form">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 offset-sm-3 offset-sm-3-right">
|
||||
<form method="POST" action="{{ route('people.food.update', $contact) }}">
|
||||
@csrf
|
||||
|
||||
<h2>{{ trans('people.food_preferences_edit_title') }}</h2>
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
<p>
|
||||
@if (is_null($contact->last_name))
|
||||
{{ trans('people.food_preferences_edit_description_no_last_name', ['firstname' => $contact->first_name]) }}</p>
|
||||
@else
|
||||
{{ trans('people.food_preferences_edit_description', ['firstname' => $contact->first_name, 'family' => $contact->last_name]) }}</p>
|
||||
@endif
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" id="food" name="food" rows="3">{{ $contact->food_preferences }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group actions">
|
||||
<button type="submit" class="btn btn-primary">{{ trans('people.food_preferences_edit_cta') }}</button>
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
18
resources/views/people/food-preferences/index.blade.php
Normal file
18
resources/views/people/food-preferences/index.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="sidebar-box">
|
||||
|
||||
<div class="sidebar-box-title">
|
||||
<h3>{{ trans('people.food_preferences_title') }}</h3>
|
||||
</div>
|
||||
|
||||
<p class="sidebar-box-paragraph">
|
||||
|
||||
@if (is_null($contact->food_preferences))
|
||||
<a href="{{ route('people.food.index', $contact) }}">{{ trans('app.add') }}</a>
|
||||
@else
|
||||
{{ $contact->food_preferences }}
|
||||
<a href="{{ route('people.food.index', $contact) }}" class="action-link">{{ trans('app.edit') }}</a>
|
||||
@endif
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
15
resources/views/people/gifts/index.blade.php
Normal file
15
resources/views/people/gifts/index.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="col-12 section-title">
|
||||
<contact-gift
|
||||
hash="{{ $contact->hashID() }}"
|
||||
:contact-id="{{ $contact->id }}"
|
||||
:gifts-active-tab="'{{ auth()->user()->gifts_active_tab }}'"
|
||||
:family-contacts="{{ $familyRelationships->map(function ($familyRelationship) {
|
||||
return [
|
||||
'id' => $familyRelationship->ofContact->id,
|
||||
'name' => $familyRelationship->ofContact->first_name,
|
||||
];
|
||||
}) }}"
|
||||
:reach-limit="{{ \Safe\json_encode($hasReachedAccountStorageLimit) }}"
|
||||
>
|
||||
</contact-gift>
|
||||
</div>
|
||||
169
resources/views/people/index.blade.php
Normal file
169
resources/views/people/index.blade.php
Normal file
@@ -0,0 +1,169 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<div class="people-list">
|
||||
@csrf
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="breadcrumb">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="horizontal">
|
||||
<li>
|
||||
<a href="{{ route('dashboard.index') }}">{{ trans('app.breadcrumb_dashboard') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
@if ($active)
|
||||
{{ trans('app.breadcrumb_list_contacts') }}
|
||||
@else
|
||||
{{ trans('app.breadcrumb_archived_contacts') }}
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="main-content">
|
||||
|
||||
@if ($contactsCount == 0)
|
||||
|
||||
@include('people.blank')
|
||||
|
||||
@else
|
||||
|
||||
<div class="{{ auth()->user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
|
||||
@if ($hasArchived and !$active)
|
||||
<div class="col-12">
|
||||
<div class="ba mb3 br3 pa3 tc b--gray-monica bg-gray-monica">
|
||||
{!! trans('people.list_link_to_active_contacts', ['url' => route('people.index')]) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-12 col-md-9 mb4">
|
||||
|
||||
@if (! is_null($tags))
|
||||
<p class="clear-filter">
|
||||
{{ trans('people.people_list_filter_tag') }}
|
||||
@foreach ($tags as $tag)
|
||||
<span class="pretty-tag">
|
||||
{{ $tag->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
<a href="{{ route('people.index') }}">{{ trans('people.people_list_clear_filter') }}</a>
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if ($tagLess)
|
||||
<p class="clear-filter">
|
||||
<span class="mr2">{{ trans('people.people_list_filter_untag') }}</span>
|
||||
<a href="{{ route('people.index') }}">{{ trans('people.people_list_clear_filter') }}</a>
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<ul class="list">
|
||||
|
||||
{{-- Sorting options --}}
|
||||
<li class="people-list-item sorting">
|
||||
{{ trans_choice('people.people_list_stats', $contactsCount, ['count' => $contactsCount]) }}
|
||||
<div class="options">
|
||||
<div class="options-dropdowns dropdown">
|
||||
<a href="" class="dropdown-btn" data-toggle="dropdown" id="dropdownSort">{{ trans('people.people_list_sort') }}</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownSort">
|
||||
<a class="dropdown-item {{ ($sort == 'firstnameAZ')?'selected':'' }}" href="{{ route('people.index') }}?sort=firstnameAZ">
|
||||
{{ trans('people.people_list_firstnameAZ') }}
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item {{ ($sort == 'firstnameZA')?'selected':'' }}" href="{{ route('people.index') }}?sort=firstnameZA">
|
||||
{{ trans('people.people_list_firstnameZA') }}
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item {{ ($sort == 'lastnameAZ')?'selected':'' }}" href="{{ route('people.index') }}?sort=lastnameAZ">
|
||||
{{ trans('people.people_list_lastnameAZ') }}
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item {{ ($sort == 'lastnameZA')?'selected':'' }}" href="{{ route('people.index') }}?sort=lastnameZA">
|
||||
{{ trans('people.people_list_lastnameZA') }}
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item {{ ($sort == 'lastactivitydateNewtoOld')?'selected':'' }}" href="{{ route('people.index') }}?sort=lastactivitydateNewtoOld">
|
||||
{{ trans('people.people_list_lastactivitydateNewtoOld') }}
|
||||
</a>
|
||||
|
||||
<a class="dropdown-item {{ ($sort == 'lastactivitydateOldtoNew')?'selected':'' }}" href="{{ route('people.index') }}?sort=lastactivitydateOldtoNew">
|
||||
{{ trans('people.people_list_lastactivitydateOldtoNew') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<div class="{{ htmldir() == 'ltr' ? 'fl' : 'fr' }} w-100">
|
||||
<div class="br2 bg-white mb4">
|
||||
<contact-list
|
||||
:show-archived="{{ \Safe\json_encode(! $active) }}"
|
||||
></contact-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-3 sidebar">
|
||||
<a href="{{ route('people.create') }}" id="button-add-contact" class="btn btn-primary sidebar-cta">
|
||||
{{ trans('people.people_list_blank_cta') }}
|
||||
</a>
|
||||
|
||||
<ul>
|
||||
@if ($hasArchived)
|
||||
@if ($active)
|
||||
<li><a href="{{ route('people.archived') }}">@lang('people.list_link_to_archived_contacts')</a></li>
|
||||
@endif
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
{{-- Only for subscriptions --}}
|
||||
@include('partials.components.people-upgrade-sidebar')
|
||||
|
||||
<ul class="mb4">
|
||||
@foreach ($tagsCount as $tag)
|
||||
@if ($tag->contact_count > 0)
|
||||
<li>
|
||||
<span class="pretty-tag"><a href="{{ route('people.index') }}?{{$url}}tags[]={{ urlencode($tag->name) }}">{{ $tag->name }}</a></span>
|
||||
<span class="number-contacts-per-tag">{{ trans_choice('people.people_list_contacts_per_tags', $tag->contact_count, ['count' => $tag->contact_count]) }}</span>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@if ($tagsCount->count() != 0)
|
||||
<li class="f7 mt3">
|
||||
<a href="{{ route('people.index') }}?no_tag=true">{{ trans('people.people_list_untagged') }}</a>
|
||||
<span class="number-contacts-without-tag">{{ trans_choice('people.people_list_contacts_per_tags', $contactsWithoutTagsCount) }}</span>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($deceasedCount > 0)
|
||||
@if ($hidingDeceased)
|
||||
<li class="f7 mt3"><a href="{{ $active ? route('people.index') : route('people.archived') }}?show_dead=true">{{ trans('people.people_list_show_dead', ['count' => $deceasedCount]) }}</a></li>
|
||||
@else
|
||||
<li class="f7 mt3"><a href="{{ $active ? route('people.index') : route('people.archived') }}?show_dead=false">{{ trans('people.people_list_hide_dead', ['count' => $deceasedCount]) }}</a></li>
|
||||
@endif
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
116
resources/views/people/introductions/edit.blade.php
Normal file
116
resources/views/people/introductions/edit.blade.php
Normal file
@@ -0,0 +1,116 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<div class="people-show introductions">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="breadcrumb">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="horizontal">
|
||||
<li>
|
||||
<a href="{{ route('dashboard.index') }}">{{ trans('app.breadcrumb_dashboard') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('people.index') }}">{{ trans('app.breadcrumb_list_contacts') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('people.show', $contact) }}">{{ $contact->name }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ trans('app.breadcrumb_edit_introductions') }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="main-content central-form">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 offset-sm-3 offset-sm-3-right">
|
||||
<h2>{{ trans('people.introductions_title_edit', ['name' => $contact->first_name]) }}</h2>
|
||||
|
||||
<form method="POST" action="{{ route('people.introductions.update', $contact) }}">
|
||||
@csrf
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
{{-- How did they meet --}}
|
||||
<div class="form-group">
|
||||
<label for="first_met_additional_info">{{ trans('people.introductions_additional_info') }}</label>
|
||||
<textarea class="form-control" id="first_met_additional_info" name="first_met_additional_info" rows="3">{{ old('first_met_additional_info') ?? $contact->first_met_additional_info }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<contact-select
|
||||
:id="'metThrough'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.introductions_edit_met_through') }}'"
|
||||
:name="'metThroughId'"
|
||||
:placeholder="'{{ trans('people.relationship_form_associate_dropdown_placeholder') }}'"
|
||||
:default-options="{{ \Safe\json_encode($contacts) }}"
|
||||
:user-contact-id="{{ $contact->id }}"
|
||||
:value="{{ $introducer !== null ? \Safe\json_encode($introducer) : 'null' }}">
|
||||
</contact-select>
|
||||
</div>
|
||||
|
||||
<label>{{ trans('people.introductions_first_met_date') }}</label>
|
||||
<fieldset class="form-group dates">
|
||||
|
||||
{{-- You don't know the date you've met --}}
|
||||
<div class="form-check">
|
||||
<label class="form-check-label" for="is_first_met_date_unknown">
|
||||
<input type="radio" class="form-check-input" name="is_first_met_date_known" id="is_first_met_date_unknown" value="unknown"
|
||||
@click="date_met_the_contact = 'unknown'"
|
||||
{{ (is_null($contact->first_met_special_date_id)) ? 'checked' : '' }}
|
||||
>
|
||||
|
||||
<div class="form-inline">
|
||||
{{ trans('people.introductions_no_first_met_date') }}
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{{-- You know the date you've met --}}
|
||||
<div class="form-check">
|
||||
<label class="form-check-label" for="is_first_met_date_known">
|
||||
<input type="radio" class="form-check-input" name="is_first_met_date_known" id="is_first_met_date_known" value="known"
|
||||
@click="date_met_the_contact = 'known'"
|
||||
{{ (! is_null($contact->first_met_special_date_id)) ? 'checked' : '' }}
|
||||
>
|
||||
|
||||
{{ trans('people.introductions_first_met_date_known') }}
|
||||
@include('partials.components.date-select', ['contact' => $contact, 'specialDate' => $contact->firstMetDate ?? now(\App\Helpers\DateHelper::getTimezone()), 'class' => 'first_met'])
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="form-group" v-if="date_met_the_contact == 'known'">
|
||||
<form-checkbox
|
||||
:name="'addReminder'"
|
||||
:dclass="'form-check form-check-label'"
|
||||
:iclass="'form-check-input'"
|
||||
>
|
||||
{{ trans('people.introductions_add_reminder') }}
|
||||
</form-checkbox>
|
||||
</fieldset>
|
||||
|
||||
<div class="form-group actions">
|
||||
<button type="submit" class="btn btn-primary">{{ trans('app.save') }}</button>
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
41
resources/views/people/introductions/index.blade.php
Normal file
41
resources/views/people/introductions/index.blade.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<div class="sidebar-box introductions">
|
||||
|
||||
<div class="sidebar-box-title">
|
||||
<h3>{{ trans('people.introductions_sidebar_title') }}</h3>
|
||||
</div>
|
||||
|
||||
@if(! $contact->hasFirstMetInformation())
|
||||
<p class="sidebar-box-paragraph">
|
||||
<a href="{{ route('people.introductions.edit', $contact) }}">{{ trans('people.introductions_blank_cta', ['name' => $contact->first_name]) }}</a>
|
||||
</p>
|
||||
@else
|
||||
<ul>
|
||||
@if ($introducer = $contact->getIntroducer())
|
||||
<li>
|
||||
<i class="fa fa-sign-language"></i>
|
||||
{!! trans('people.introductions_met_through', ['url' => route('people.show', $introducer), 'name' => $introducer->name]) !!}
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($contact->firstMetDate)
|
||||
<li>
|
||||
<i class="fa fa-hourglass-start"></i>
|
||||
{{ trans('people.introductions_met_date', ['date' => $contact->firstMetDate->toShortString()]) }}
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($contact->first_met_additional_info)
|
||||
<li>
|
||||
<i class="fa fa-id-card-o"></i>
|
||||
{{ $contact->first_met_additional_info }}
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
<p class="sidebar-box-paragraph">
|
||||
<a href="{{ route('people.introductions.edit', $contact) }}">{{ trans('app.edit') }}</a>
|
||||
</p>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
427
resources/views/people/life-events/blank.blade.php
Normal file
427
resources/views/people/life-events/blank.blade.php
Normal file
File diff suppressed because one or more lines are too long
11
resources/views/people/life-events/index.blade.php
Normal file
11
resources/views/people/life-events/index.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="{{ \App\Helpers\LocaleHelper::getDirection() == 'ltr' ? 'fl' : 'fr' }} w-100 pb3 pt1 pl3 pr3">
|
||||
<div class="br2 bg-white mb4">
|
||||
<life-event-list
|
||||
hash="{{ $contact->hashID() }}"
|
||||
:months="{{ $months }}"
|
||||
:days="{{ $days }}"
|
||||
:years="{{ $years }}"
|
||||
contact-name="{{ $contact->first_name }}">
|
||||
</life-event-list>
|
||||
</div>
|
||||
</div>
|
||||
12
resources/views/people/photos/index.blade.php
Normal file
12
resources/views/people/photos/index.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="{{ \App\Helpers\LocaleHelper::getDirection() == 'ltr' ? 'fl' : 'fr' }} w-100 pb3 pt1 pl3 pr3">
|
||||
<div class="br2 bg-white mb4">
|
||||
<photo-list
|
||||
hash="{{ $contact->hashID() }}"
|
||||
:contact-id="{{ $contact->id }}"
|
||||
contact-name="'{{ $contact->first_name }}''"
|
||||
current-photo-id-as-avatar="{{ $contact->avatar_photo_id }}"
|
||||
reach-limit="{{ \Safe\json_encode($hasReachedAccountStorageLimit) }}"
|
||||
>
|
||||
</photo-list>
|
||||
</div>
|
||||
</div>
|
||||
183
resources/views/people/profile.blade.php
Normal file
183
resources/views/people/profile.blade.php
Normal file
@@ -0,0 +1,183 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('title', $contact->name )
|
||||
|
||||
@section('content')
|
||||
<div class="people-show">
|
||||
@csrf
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="breadcrumb">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="horizontal">
|
||||
<li>
|
||||
<a href="{{ route('dashboard.index') }}">{{ trans('app.breadcrumb_dashboard') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
@if ($contact->is_active)
|
||||
<a href="{{ route('people.index') }}">{{ trans('app.breadcrumb_list_contacts') }}</a>
|
||||
@else
|
||||
<a href="{{ route('people.archived') }}">{{ trans('app.breadcrumb_archived_contacts') }}</a>
|
||||
@endif
|
||||
</li>
|
||||
<li>
|
||||
{{ $contact->name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Page header --}}
|
||||
@include('people._header')
|
||||
|
||||
{{-- Page content --}}
|
||||
<div class="main-content profile">
|
||||
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-3 profile-sidebar">
|
||||
|
||||
@if (! is_null($weather) && $weather->summary)
|
||||
<div class="ba b--near-white br2 bg-gray-monica pa3 mb3 f6">
|
||||
<div class="w-100 dt">
|
||||
<div class="dtc">
|
||||
<h3 class="f6 ttu normal">{{ trans('app.weather_current_title') }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="mb0{{ $weather->created_at->between(now()->subHours(6), now()) ? '' : ' light-silver' }}"
|
||||
title="{{ $weather->location }} — {{ $weather->date !== null ? \App\Helpers\DateHelper::getShortDateWithTime($weather->date) : '' }}">
|
||||
{{ $weather->emoji }} {{ $weather->summary }} / {{ trans('app.weather_current_temperature_'.auth()->user()->temperature_scale, ['temperature' => $weather->temperature(auth()->user()->temperature_scale)]) }}
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('people.relationship.index')
|
||||
|
||||
@include('people.sidebar')
|
||||
|
||||
<ul class="mb2">
|
||||
<li>
|
||||
<a href="{{ route('people.auditlogs', $contact) }}">{{ trans('people.auditlogs_link') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('people.vcard', $contact) }}">{{ trans('people.people_export') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<contact-archive hash="{{ $contact->hashID() }}" :active="{{ \Safe\json_encode($contact->is_active) }}"></contact-archive>
|
||||
</li>
|
||||
<li>
|
||||
<form method="POST" action="{{ route('people.destroy', $contact) }}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<confirm id="link-delete-contact" message="{{ trans('people.people_delete_confirmation', ['name' => $contact->name]) }}">
|
||||
{{ trans('people.people_delete_message') }}
|
||||
</confirm>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-9">
|
||||
|
||||
<div class="flex items-center justify-center flex-column">
|
||||
<div class='cf dib'>
|
||||
@if (! $contact->isMe())
|
||||
<span @click="updateDefaultProfileView('life-events')" :class="[global_profile_default_view == 'life-events' ? 'f6 fl bb bt br bl ph3 pv2 dib b br2 br--left bl mb4 b--gray-monica' : 'f6 fl bb bt br ph3 pv2 dib bg-gray-monica br2 br--left bl pointer mb4 b--gray-monica']">
|
||||
@if (auth()->user()->profile_new_life_event_badge_seen == false)
|
||||
<span class="bg-light-green f7 mr2 ph2 pv1 br2">{{ trans('app.new') }}</span>
|
||||
@endif
|
||||
{{ trans('people.life_event_list_tab_life_events') }} ({{ $contact->lifeEvents()->count() }})
|
||||
</span>
|
||||
@endif
|
||||
<span @click="updateDefaultProfileView('notes')" :class="[global_profile_default_view == 'notes' ? 'f6 fl bb bt ph3 pv2 dib b br--right br mb4 b--gray-monica' : 'f6 fl bb bt ph3 pv2 dib bg-gray-monica br--right br pointer mb4 b--gray-monica']">{{ trans('people.life_event_list_tab_other') }}</span>
|
||||
<span @click="updateDefaultProfileView('photos')" :class="[global_profile_default_view == 'photos' ? 'f6 fl bb bt ph3 pv2 dib b br2 br--right br mb4 b--gray-monica' : 'f6 fl bb bt ph3 pv2 dib bg-gray-monica br2 br--right br pointer mb4 b--gray-monica']">Photos</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (! $contact->isMe())
|
||||
<div v-if="global_profile_default_view == 'life-events'">
|
||||
<div class="row section">
|
||||
@include('people.life-events.index')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div v-if="global_profile_default_view == 'notes'">
|
||||
@if ($modules->contains('key', 'notes'))
|
||||
<div class="row section notes">
|
||||
<div class="col-12 section-title">
|
||||
<contact-note hash={{ $contact->hashID() }}></contact-note>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'conversations') && ! $contact->isMe())
|
||||
<div class="row section">
|
||||
@include('people.conversations.index')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'phone_calls') && ! $contact->isMe())
|
||||
<div class="row section calls">
|
||||
@include('people.calls.index')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'activities') && ! $contact->isMe())
|
||||
<div class="row section activities">
|
||||
@include('people.activities.index')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'reminders'))
|
||||
<div class="row section reminders">
|
||||
@include('people.reminders.index')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'tasks'))
|
||||
<div class="row section">
|
||||
@include('people.tasks.index')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'gifts') && ! $contact->isMe())
|
||||
<div class="row section">
|
||||
@include('people.gifts.index')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'debts') && ! $contact->isMe())
|
||||
<div class="row section debts">
|
||||
@include('people.debt.index')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'documents'))
|
||||
<div class="row section">
|
||||
@include('people.documents.index')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="global_profile_default_view == 'photos'">
|
||||
<div class="row section">
|
||||
@include('people.photos.index')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
45
resources/views/people/relationship/_relationship.blade.php
Normal file
45
resources/views/people/relationship/_relationship.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
@foreach($relationships->groupByItemsProperty('relationshipTypeLocalized') as $type => $relationshipType)
|
||||
|
||||
<div class="sidebar-box-title">
|
||||
<h3>{{ $type }}</h3>
|
||||
</div>
|
||||
|
||||
@foreach ($relationshipType as $relationship)
|
||||
@if (! $relationship->ofContact)
|
||||
@continue
|
||||
@endif
|
||||
<div class="sidebar-box-paragraph">
|
||||
{{-- NAME --}}
|
||||
@if ($relationship->ofContact->is_partial)
|
||||
<span class="{{ htmldir() == 'ltr' ? '' : 'fr' }}">{{ $relationship->ofContact->name }}</span>
|
||||
@else
|
||||
<a class="{{ htmldir() == 'ltr' ? '' : 'fr' }}" href="{{ route('people.show', $relationship->ofContact) }}">{{ $relationship->ofContact->name }}</a>
|
||||
@endif
|
||||
|
||||
{{-- AGE --}}
|
||||
@if ($relationship->ofContact->is_dead)
|
||||
@if ($relationship->ofContact->deceasedDate)
|
||||
<span class="{{ htmldir() == 'ltr' ? '' : 'fr' }}">({{ $relationship->ofContact->getAgeAtDeath() }})</span>
|
||||
@endif
|
||||
@elseif ($relationship->ofContact->birthday_special_date_id)
|
||||
@if ($relationship->ofContact->birthdate->getAge())
|
||||
<span class="{{ htmldir() == 'ltr' ? '' : 'fr' }}">({{ $relationship->ofContact->birthdate->getAge() }})</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<div class="db mt1">
|
||||
{{-- ACTIONS: EDIT/DELETE --}}
|
||||
<a href="{{ route('people.relationships.edit', [$contact, $relationship]) }}" class="action-link {{ $contact->hashID() }}-edit-relationship">{{ trans('app.edit') }}</a>
|
||||
<form method="POST" action="{{ route('people.relationships.destroy', [$contact, $relationship]) }}" class="di">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<confirm message="{{ trans('people.relationship_unlink_confirmation') }}" link-class="action-link">
|
||||
{{ trans('app.delete') }}
|
||||
</confirm>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cb"></div>
|
||||
@endforeach
|
||||
|
||||
@endforeach
|
||||
158
resources/views/people/relationship/edit.blade.php
Normal file
158
resources/views/people/relationship/edit.blade.php
Normal file
@@ -0,0 +1,158 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
|
||||
<section class="ph3 ph0-ns">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<p><a href="{{ route('people.show', $contact) }}">< {{ $contact->name }}</a></p>
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<h3 class="f3 fw5">{{ trans('people.relationship_form_edit') }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mw7 center br3 ba b--gray-monica bg-white mb6">
|
||||
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
<form action="{{ route('people.relationships.update', [$contact, $relationshipId]) }}" method="POST">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<input type="hidden" name="type" value="{{ $type }}">
|
||||
|
||||
@if ($partner->is_partial)
|
||||
{{-- Name --}}
|
||||
<div class="pa4-ns ph3 pv2 bb b--gray-monica">
|
||||
{{-- This check is for the cultures that are used to say the last name first --}}
|
||||
<div class="mb3 mb0-ns">
|
||||
@if ($formNameOrder == 'firstname')
|
||||
|
||||
<div class="dt dt--fixed">
|
||||
<div class="dtc pr2">
|
||||
<form-input
|
||||
value="{{ $partner->first_name }}"
|
||||
:input-type="'text'"
|
||||
:id="'first_name'"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.people_add_firstname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="dtc">
|
||||
<form-input
|
||||
value="{{ $partner->last_name }}"
|
||||
:input-type="'text'"
|
||||
:id="'last_name'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_lastname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<div class="dt dt--fixed">
|
||||
<div class="dtc pr2">
|
||||
<form-input
|
||||
value="{{ $partner->last_name }}"
|
||||
:input-type="'text'"
|
||||
:id="'last_name'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_lastname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="dtc">
|
||||
<form-input
|
||||
value="{{ $partner->first_name }}"
|
||||
:input-type="'text'"
|
||||
:id="'first_name'"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.people_add_firstname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Gender --}}
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<form-select
|
||||
:options="{{ $genders }}"
|
||||
:required="false"
|
||||
value="{{ $partner->gender_id }}"
|
||||
:title="'{{ trans('people.people_add_gender') }}'"
|
||||
:id="'gender_id'">
|
||||
</form-select>
|
||||
</div>
|
||||
|
||||
{{-- Birthdate --}}
|
||||
<form-specialdate
|
||||
:months="{{ $months }}"
|
||||
:days="{{ $days }}"
|
||||
:month="{{ $month }}"
|
||||
:day="{{ $day }}"
|
||||
:age="{{ $age ?: 0 }}"
|
||||
:birthdate="'{{ $birthdate }}'"
|
||||
:reminder="{{ \Safe\json_encode($hasBirthdayReminder) }}"
|
||||
:value="'{{ $birthdayState }}'"
|
||||
></form-specialdate>
|
||||
|
||||
<div class="pa4-ns ph3 pv2 bb b--gray-monica">
|
||||
{{-- Real or partial contact (false in this case) --}}
|
||||
<form-checkbox
|
||||
:name="'realContact'"
|
||||
:iclass="'pa0 ma0 lh-copy'"
|
||||
:dclass="'mb3 mb0-ns flex'"
|
||||
value="1"
|
||||
:model-value="false"
|
||||
>
|
||||
<template slot="label">
|
||||
{{ trans('people.relationship_form_also_create_contact') }}
|
||||
</template>
|
||||
<span slot="extra" class="silver">
|
||||
{{ trans('people.relationship_form_add_description') }}
|
||||
</span>
|
||||
</form-checkbox>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Nature of relationship --}}
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<form-select
|
||||
:options="{{ $relationshipTypes }}"
|
||||
value="{{ $type }}"
|
||||
:required="true"
|
||||
:title="'{{
|
||||
$partner->is_partial ?
|
||||
trans('people.relationship_form_is_with') :
|
||||
trans('people.relationship_form_is_with_name', ['name' => $partner->name])
|
||||
}}'"
|
||||
:id="'relationship_type_id'">
|
||||
</form-select>
|
||||
</div>
|
||||
|
||||
{{-- Form actions --}}
|
||||
<div class="ph4-ns ph3 pv3 bb b--gray-monica">
|
||||
<div class="flex-ns justify-between">
|
||||
<div>
|
||||
<a href="{{ route ('people.show', $contact) }}" class="btn btn-secondary w-auto-ns w-100 mb2 pb0-ns">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-primary w-auto-ns w-100 mb2 pb0-ns" v-if="global_relationship_form_new_contact" name="save" type="submit">{{ trans('app.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
43
resources/views/people/relationship/index.blade.php
Normal file
43
resources/views/people/relationship/index.blade.php
Normal file
@@ -0,0 +1,43 @@
|
||||
@if ($modules->contains('key', 'love_relationships'))
|
||||
<div class="sidebar-box">
|
||||
<div class="sidebar-box-title">
|
||||
<h3>{{ trans('app.relationship_type_group_love') }}</h3>
|
||||
</div>
|
||||
|
||||
@include('people.relationship._relationship', ['relationships' => $loveRelationships])
|
||||
|
||||
<p class="mb0 bt b--near-white f6">
|
||||
<a href="{{ route('people.relationships.create', $contact) }}?type={{ $contact->account->getRelationshipTypeByType('partner')->id }}">{{ trans('app.add') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'family_relationships'))
|
||||
<div class="sidebar-box">
|
||||
<div class="sidebar-box-title">
|
||||
<h3>{{ trans('app.relationship_type_group_family') }}</h3>
|
||||
</div>
|
||||
|
||||
@include('people.relationship._relationship', ['relationships' => $familyRelationships])
|
||||
|
||||
<p class="mb0 bt b--near-white f6">
|
||||
<a href="{{ route('people.relationships.create', $contact) }}?type={{ $contact->account->getRelationshipTypeByType('child')->id }}">{{ trans('app.add') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($modules->contains('key', 'other_relationships'))
|
||||
<div class="sidebar-box f6">
|
||||
<div class="sidebar-box-title">
|
||||
<h3>{{ trans('app.relationship_type_group_other') }}</h3>
|
||||
</div>
|
||||
|
||||
@include('people.relationship._relationship', ['relationships' => $friendRelationships])
|
||||
|
||||
@include('people.relationship._relationship', ['relationships' => $workRelationships])
|
||||
|
||||
<p class="mb0 bt b--near-white f6">
|
||||
<a href="{{ route('people.relationships.create', $contact) }}?type={{ $contact->account->getRelationshipTypeByType('friend')->id }}">{{ trans('app.add') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
187
resources/views/people/relationship/new.blade.php
Normal file
187
resources/views/people/relationship/new.blade.php
Normal file
@@ -0,0 +1,187 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
|
||||
<section class="ph3 ph0-ns">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<p><a href="{{ route('people.show', $contact) }}">< {{ $contact->name }}</a></p>
|
||||
<div class="mt4 mw7 center mb3">
|
||||
<h3 class="f3 fw5">{{ trans('people.relationship_form_add') }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mw7 center br3 ba b--gray-monica bg-white mb6">
|
||||
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
<form action="{{ route('people.relationships.store', $contact) }}" method="POST">
|
||||
@csrf
|
||||
|
||||
{{-- New contact / link existing --}}
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<p class="mb2 b">{{ trans('people.relationship_form_add_choice') }}</p>
|
||||
<div class="dt dt--fixed">
|
||||
<div class="dtc pr2">
|
||||
<input type="radio" id="new" name="relationship_type" value="new" @click="global_relationship_form_new_contact = true" checked>
|
||||
<label for="new" class="pointer">{{ trans('people.relationship_form_create_contact') }}</label>
|
||||
</div>
|
||||
<div class="dtc">
|
||||
<input type="radio" id="existing" name="relationship_type" value="existing" @click="global_relationship_form_new_contact = false">
|
||||
<label for="existing" class="pointer">{{ trans('people.relationship_form_associate_contact') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="global_relationship_form_new_contact">
|
||||
{{-- Name --}}
|
||||
<div class="pa4-ns ph3 pv2 bb b--gray-monica">
|
||||
{{-- This check is for the cultures that are used to say the last name first --}}
|
||||
<div class="mb3 mb0-ns">
|
||||
@if ($formNameOrder == 'firstname')
|
||||
|
||||
<div class="dt dt--fixed">
|
||||
<div class="dtc pr2">
|
||||
<form-input
|
||||
value=""
|
||||
:input-type="'text'"
|
||||
:id="'first_name'"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.people_add_firstname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="dtc">
|
||||
<form-input
|
||||
value=""
|
||||
:input-type="'text'"
|
||||
:id="'last_name'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_lastname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<div class="dt dt--fixed">
|
||||
<div class="dtc pr2">
|
||||
<form-input
|
||||
value=""
|
||||
:input-type="'text'"
|
||||
:id="'last_name'"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_lastname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="dtc">
|
||||
<form-input
|
||||
value=""
|
||||
:input-type="'text'"
|
||||
:id="'first_name'"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.people_add_firstname') }}'">
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Gender --}}
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<form-select
|
||||
:options="{{ $genders }}"
|
||||
:required="false"
|
||||
:title="'{{ trans('people.people_add_gender') }}'"
|
||||
:id="'gender_id'"
|
||||
:value="'{{ $defaultGender }}'">
|
||||
</form-select>
|
||||
</div>
|
||||
|
||||
{{-- Birthdate --}}
|
||||
<form-specialdate
|
||||
:months="{{ $months }}"
|
||||
:days="{{ $days }}"
|
||||
:birthdate="'{{ $birthdate }}'"
|
||||
></form-specialdate>
|
||||
|
||||
<div class="pa4-ns ph3 pv2 bb b--gray-monica">
|
||||
{{-- Real or partial contact (default true) --}}
|
||||
<form-checkbox
|
||||
:name="'realContact'"
|
||||
:iclass="'pa0 ma0 lh-copy'"
|
||||
:dclass="'mb3 mb0-ns flex'"
|
||||
value="1"
|
||||
:model-value="true"
|
||||
>
|
||||
<template slot="label">
|
||||
{{ trans('people.relationship_form_also_create_contact') }}
|
||||
</template>
|
||||
<span slot="extra" class="silver">
|
||||
{{ trans('people.relationship_form_add_description') }}
|
||||
</span>
|
||||
</form-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!global_relationship_form_new_contact">
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
@if ($existingContacts->count() == 0)
|
||||
<div class="mb1 mt2 tc">
|
||||
<img src="img/people/no_record_found.svg">
|
||||
<p>{{ trans('people.relationship_form_add_no_existing_contact', ['name' => $contact->first_name]) }}</p>
|
||||
</div>
|
||||
@else
|
||||
<contact-select
|
||||
:required="true"
|
||||
:title="'{{ trans('people.relationship_form_associate_dropdown') }}'"
|
||||
:name="'existing_contact_id'"
|
||||
:placeholder="'{{ trans('people.relationship_form_associate_dropdown_placeholder') }}'"
|
||||
:default-options="{{ \Safe\json_encode($existingContacts) }}"
|
||||
:user-contact-id="{{ $contact->id }}">
|
||||
</contact-select>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Nature of relationship --}}
|
||||
<div class="pa4-ns ph3 pv2 mb3 mb0-ns bb b--gray-monica">
|
||||
<form-select
|
||||
:options="{{ $relationshipTypes }}"
|
||||
value="{{ $type }}"
|
||||
:required="true"
|
||||
:title="'{{ trans('people.relationship_form_is_with') }}'"
|
||||
:id="'relationship_type_id'">
|
||||
</form-select>
|
||||
</div>
|
||||
|
||||
{{-- Form actions --}}
|
||||
<div class="ph4-ns ph3 pv3 bb b--gray-monica">
|
||||
<div class="flex-ns justify-between">
|
||||
<div>
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary w-auto-ns w-100 mb2 pb0-ns" style="text-align: center;">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
<div>
|
||||
@if ($existingContacts->count() == 0)
|
||||
<button class="btn btn-primary w-auto-ns w-100 mb2 pb0-ns" disabled v-if="!global_relationship_form_new_contact" name="save" type="submit">{{ trans('app.add') }}</button>
|
||||
<button class="btn btn-primary w-auto-ns w-100 mb2 pb0-ns" v-if="global_relationship_form_new_contact" name="save" type="submit">{{ trans('app.add') }}</button>
|
||||
@else
|
||||
<button class="btn btn-primary w-auto-ns w-100 mb2 pb0-ns" name="save" type="submit">{{ trans('app.add') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
46
resources/views/people/reminders/add.blade.php
Normal file
46
resources/views/people/reminders/add.blade.php
Normal file
@@ -0,0 +1,46 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<div class="people-show">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="breadcrumb">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="horizontal">
|
||||
<li>
|
||||
<a href="{{ route('dashboard.index') }}">{{ trans('app.breadcrumb_dashboard') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('people.index') }}">{{ trans('app.breadcrumb_list_contacts') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ $contact->name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page header -->
|
||||
@include('people._header')
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="main-content reminders central-form">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 offset-sm-3 offset-sm-3-right">
|
||||
@include('people.reminders.form', [
|
||||
'method' => 'POST',
|
||||
'action' => route('people.reminders.store', $contact),
|
||||
'update_or_add' =>'add'
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
46
resources/views/people/reminders/edit.blade.php
Normal file
46
resources/views/people/reminders/edit.blade.php
Normal file
@@ -0,0 +1,46 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<div class="people-show">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="breadcrumb">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="horizontal">
|
||||
<li>
|
||||
<a href="{{ route('dashboard.index') }}">{{ trans('app.breadcrumb_dashboard') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('people.index') }}">{{ trans('app.breadcrumb_list_contacts') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ $contact->name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page header -->
|
||||
@include('people._header')
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="main-content reminders central-form">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 offset-sm-3 offset-sm-3-right">
|
||||
@include('people.reminders.form', [
|
||||
'method' => 'PUT',
|
||||
'action' => route('people.reminders.update', [$contact, $reminder]),
|
||||
'update_or_add' =>'edit'
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
89
resources/views/people/reminders/form.blade.php
Normal file
89
resources/views/people/reminders/form.blade.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<form method="POST" action="{{ $action }}">
|
||||
@method($method)
|
||||
@csrf
|
||||
|
||||
<h2>{{ trans('people.reminders_add_title', ['name' => $contact->first_name]) }}</h2>
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
<p>{{ trans('people.reminders_add_description') }}</p>
|
||||
|
||||
{{-- Nature of reminder --}}
|
||||
<fieldset class="form-group nature">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="title" value="{{ old('title') ?? $reminder->title }}" required>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{{-- Date --}}
|
||||
<div class="form-group">
|
||||
<label for="initial_date">{{ trans('people.reminders_add_next_time') }}</label>
|
||||
|
||||
<input type="date" id="initial_date" name="initial_date" class="form-control"
|
||||
@if (is_null($reminder->initial_date))
|
||||
value="{{ old('initial_date') ?? now(\App\Helpers\DateHelper::getTimezone())->toDateString() }}"
|
||||
@else
|
||||
value="{{ old('initial_date') ?? $reminder->initial_date->toDateString() }}"
|
||||
@endif
|
||||
min="{{ now(\App\Helpers\DateHelper::getTimezone())->toDateString() }}"
|
||||
max="{{ now(\App\Helpers\DateHelper::getTimezone())->addYears(10)->toDateString() }}"
|
||||
>
|
||||
|
||||
<fieldset class="form-group frequency{{ $errors->has('frequency_type') ? ' has-error' : '' }}">
|
||||
|
||||
{{-- One time reminder --}}
|
||||
<div class="form-check">
|
||||
<label class="form-check-label" for="frequency_type_once">
|
||||
<input type="radio" id="frequency_type_once" class="form-check-input" name="frequency_type"
|
||||
:value="'one_time'"
|
||||
{{ $reminder->frequency_type === 'one_time' ? 'checked' : '' }}
|
||||
>
|
||||
{{ trans('people.reminders_add_once') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{{-- Recurring reminder --}}
|
||||
<div class="form-check">
|
||||
<label class="form-check-label" for="frequency_type_recurrent">
|
||||
<input type="radio" id="frequency_type_recurrent" class="form-check-input" name="frequency_type"
|
||||
:value="'recurrent'"
|
||||
{{ $reminder->frequency_type !== null && $reminder->frequency_type !== 'one_time' ? 'checked' : '' }}
|
||||
>
|
||||
|
||||
{{ trans('people.reminders_add_recurrent') }}
|
||||
|
||||
<input type="number" class="form-control frequency-type" name="frequency_number"
|
||||
value="{{ $reminder->frequency_number ?? 1 }}"
|
||||
min="1"
|
||||
max="115"
|
||||
:disabled="reminders_frequency == 'one_time'">
|
||||
|
||||
<select name="frequency_number_select" :disabled="reminders_frequency == 'one_time'">
|
||||
<option value="week"{{ $reminder->frequency_type === 'week' ? 'selected' : '' }}>{{ trans('people.reminders_type_week') }}</option>
|
||||
<option value="month"{{ $reminder->frequency_type === 'month' ? 'selected' : '' }}>{{ trans('people.reminders_type_month') }}</option>
|
||||
<option value="year"{{ $reminder->frequency_type === 'year' ? 'selected' : '' }}>{{ trans('people.reminders_type_year') }}</option>
|
||||
</select>
|
||||
|
||||
{{ trans('people.reminders_add_starting_from') }}
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description">{{ trans('people.reminders_add_optional_comment') }}</label>
|
||||
<textarea class="form-control" id="description" name="description" rows="3">{{ old('description') ?? $reminder->description }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group actions">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@if($update_or_add == 'add')
|
||||
{{ trans('people.reminders_add_cta') }}
|
||||
@elseif ($update_or_add == 'edit')
|
||||
{{ trans('people.reminders_edit_update_cta') }}
|
||||
@endif
|
||||
</button>
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary">{{ trans('app.cancel') }}</a>
|
||||
</div>
|
||||
</form>
|
||||
79
resources/views/people/reminders/index.blade.php
Normal file
79
resources/views/people/reminders/index.blade.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<div class="col-12 section-title">
|
||||
<img src="img/people/reminders.svg" class="icon-section icon-reminders">
|
||||
<h3>
|
||||
{{ trans('people.section_personal_reminders') }}
|
||||
|
||||
<span class="{{ htmldir() == 'ltr' ? 'fr' : 'fl' }}">
|
||||
<a href="{{ route('people.reminders.create', $contact) }}" class="btn">{{ trans('people.reminders_cta') }}</a>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($reminders->count() === 0)
|
||||
|
||||
<div class="col-12">
|
||||
<div class="section-blank">
|
||||
<h3>{{ trans('people.reminders_blank_title', ['name' => $contact->first_name]) }}</h3>
|
||||
<a href="{{ route('people.reminders.create', $contact) }}">{{ trans('people.reminders_blank_add_activity') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<div class="col-12 reminders-list">
|
||||
|
||||
@if (! $accountHasLimitations)
|
||||
<p>{{ trans('people.reminders_description') }}</p>
|
||||
@else
|
||||
<p>{{ trans('people.reminders_free_plan_warning') }}</p>
|
||||
@endif
|
||||
|
||||
<ul class="table">
|
||||
@foreach($reminders as $reminder)
|
||||
<li class="table-row">
|
||||
|
||||
<div class="table-cell date">
|
||||
{{ $reminder->next_expected_date_human_readable }}
|
||||
</div>
|
||||
|
||||
<div class="table-cell frequency-type">
|
||||
@if ($reminder->frequency_type != 'one_time')
|
||||
{{ trans_choice('people.reminder_frequency_'.$reminder->frequency_type, $reminder->frequency_number, ['number' => $reminder->frequency_number]) }}
|
||||
@else
|
||||
{{ trans('people.reminders_one_time') }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="table-cell title">
|
||||
{{ $reminder->title }}
|
||||
</div>
|
||||
|
||||
<div class="table-cell comment">
|
||||
@if (!is_null($reminder->description))
|
||||
{{ $reminder->description }}
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="table-cell list-actions">
|
||||
{{-- Only display this if the reminder can be deleted - ie if it's not a reminder added automatically for birthdates --}}
|
||||
@if ($reminder->delible || ! $reminder->isBirthdayReminder())
|
||||
<a href="{{ route('people.reminders.edit', [$contact, $reminder]) }}" class="edit">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
||||
</a>
|
||||
@endif
|
||||
<form method="POST" action="{{ route('people.reminders.destroy', [$contact, $reminder]) }}" class="di">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<confirm message="{{ trans('people.reminders_delete_confirmation') }}">
|
||||
<i class="fa fa-trash-o" aria-hidden="true"></i>
|
||||
</confirm>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
29
resources/views/people/sidebar.blade.php
Normal file
29
resources/views/people/sidebar.blade.php
Normal file
@@ -0,0 +1,29 @@
|
||||
{{-- Pets --}}
|
||||
@if ($modules->contains('key', 'pets'))
|
||||
<pet hash="{{ $contact->hashID() }}"></pet>
|
||||
@endif
|
||||
|
||||
{{-- Contact information --}}
|
||||
@if ($modules->contains('key', 'contact_information'))
|
||||
<contact-information hash="{{ $contact->hashID() }}"></contact-information>
|
||||
@endif
|
||||
|
||||
{{-- Address --}}
|
||||
@if ($modules->contains('key', 'addresses'))
|
||||
<contact-address hash="{{ $contact->hashID() }}"></contact-address>
|
||||
@endif
|
||||
|
||||
{{-- Introductions --}}
|
||||
@if ($modules->contains('key', 'how_you_met') && ! $contact->isMe())
|
||||
@include('people.introductions.index')
|
||||
@endif
|
||||
|
||||
{{-- Work --}}
|
||||
@if ($modules->contains('key', 'work_information'))
|
||||
@include('people.work.index')
|
||||
@endif
|
||||
|
||||
{{-- Food preferences --}}
|
||||
@if ($modules->contains('key', 'food_preferences') && ! $contact->isMe())
|
||||
@include('people.food-preferences.index')
|
||||
@endif
|
||||
3
resources/views/people/tasks/index.blade.php
Normal file
3
resources/views/people/tasks/index.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="col-12 section-title">
|
||||
<contact-task hash={{ $contact->hashID() }} :contact-id={{ $contact->id }}></contact-task>
|
||||
</div>
|
||||
62
resources/views/people/work/edit.blade.php
Normal file
62
resources/views/people/work/edit.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('layouts.skeleton')
|
||||
|
||||
@section('content')
|
||||
<div class="people-show">
|
||||
|
||||
{{-- Breadcrumb --}}
|
||||
<div class="breadcrumb">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<ul class="horizontal">
|
||||
<li>
|
||||
<a href="{{ route('dashboard.index') }}">{{ trans('app.breadcrumb_dashboard') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('people.index') }}">{{ trans('app.breadcrumb_list_contacts') }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ $contact->name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="main-content central-form">
|
||||
<div class="{{ Auth::user()->getFluidLayout() }}">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 offset-sm-3 offset-sm-3-right">
|
||||
<form method="POST" action="{{ route('people.work.update', $contact) }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
|
||||
@include('partials.errors')
|
||||
|
||||
<h2>{{ trans('people.work_edit_title', ['name' => $contact->first_name]) }}</h2>
|
||||
|
||||
{{-- Job --}}
|
||||
<div class="form-group">
|
||||
<label for="job">{{ trans('people.work_edit_job') }}</label>
|
||||
<input type="text" class="form-control" name="job" id="job" value="{{ $contact->job }}" autofocus>
|
||||
</div>
|
||||
|
||||
{{-- Company --}}
|
||||
<div class="form-group">
|
||||
<label for="company">{{ trans('people.work_edit_company') }}</label>
|
||||
<input type="text" class="form-control" name="company" id="company" value="{{ $contact->company }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group actions">
|
||||
<button type="submit" class="btn btn-primary">{{ trans('app.save') }}</button>
|
||||
<a href="{{ route('people.show', $contact) }}" class="btn btn-secondary">{{ trans('app.cancel') }}</a>
|
||||
</div> <!-- .form-group -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
35
resources/views/people/work/index.blade.php
Normal file
35
resources/views/people/work/index.blade.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="sidebar-box">
|
||||
|
||||
<div class="sidebar-box-title">
|
||||
<h3>{{ trans('people.work_information') }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="work">
|
||||
<ul>
|
||||
|
||||
{{-- Work information --}}
|
||||
<li>
|
||||
<i class="fa fa-building-o" aria-hidden="true"></i>
|
||||
@if (is_null($contact->job) and is_null($contact->company))
|
||||
{{ trans('people.information_no_work_defined') }}
|
||||
@else
|
||||
@if (!is_null($contact->job))
|
||||
{{ $contact->job }}
|
||||
|
||||
@if (!is_null($contact->company))
|
||||
{{ trans('people.information_work_at', ['company' => $contact->company]) }}
|
||||
@endif
|
||||
@else
|
||||
{{ $contact->company }}
|
||||
@endif
|
||||
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p class="sidebar-box-paragraph">
|
||||
<a href="{{ route('people.work.edit', $contact) }}">{{ trans('people.work_add_cta') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user