@extends('layouts.master') @section('page_title', (!$business_ticket->business_ticket ? "Add" : "Edit"). " Ticket") @section('content') @if($business_ticket->business_ticket) @if(!$nobusiness) {{ Form::open(['id' => 'business_ticket_form', 'url' => action('BusinessTicketController@update_ticket', compact('business','business_ticket'))]) }} @else {{ Form::open(['id' => 'business_ticket_form', 'url' => action('BusinessTicketController@update_ticket_no_business', compact('business_ticket'))]) }} @endif @elseif(isset($from_admin_grid)) {{ Form::open(['url' => action('SuperAdminController@post_ticket')]) }} @else {{ Form::open(['url' => action('BusinessTicketController@save_ticket', compact('business'))]) }} @endif
@if (sizeof(session()->getOldInput()) > 0) {{ $business_ticket->init_with_old_request(session()->getOldInput()) }} @endif {{ Form::page_header((!$business_ticket->business_ticket ? "Add" : "Edit"). " Ticket".(isset($business) ? ' - '.$business->company : ''), "business") }} {{ Form::hidden('business_ticket', $business_ticket->business_ticket ?: '') }} {{ Form::hidden('nobusiness', $nobusiness) }} @if(!$business_ticket->business_ticket) {{ Form::hidden('parent_business_ticket', $business_ticket->parent_business_ticket) }} @endif
@if(isset($prev_ticket_link)) {{ Form::button_link('Previous Ticket', $prev_ticket_link) }} @endif @if(isset($next_ticket_link)) {{ Form::button_link('Next Ticket', $next_ticket_link) }} @endif
@if($business_ticket->business_ticket)
{{ Form::label_title("Org Number") }}
{{ Form::label_grey($business->x_org) }}
{{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::label_title("Org ID") }}
{{ Form::label_grey($email_org_id) }}
{{ Form::separator_row('grey-divider thin-divider') }} @if ($business_ticket->_parent_business_ticket)
{{ Form::label_title("Ticket") }}
{{ Form::label_grey("Number: " .$business_ticket->business_ticket) }}
{{ Form::label_grey("Created from:") }} {{ Form::label_link($business_ticket->_parent_business_ticket->get_edit_url($nobusiness), $business_ticket->_parent_business_ticket->business_ticket, \App\Helpers\FormComponentHelper::SIZE_SMALL, 'label-grey new-tab-link link-label') }} @else
{{ Form::label_title("Ticket Number") }}
{{ Form::label_grey($business_ticket->business_ticket) }}
@endif {{ Form::separator_row('grey-divider thin-divider') }} @else @if ($business_ticket->_parent_business_ticket)
{{ Form::label_title("Ticket") }}
{{ Form::label_grey("Created from:") }} {{ Form::label_link($business_ticket->_parent_business_ticket->get_edit_url($nobusiness), $business_ticket->_parent_business_ticket->business_ticket, \App\Helpers\FormComponentHelper::SIZE_SMALL, 'label-grey new-tab-link link-label') }}
{{ Form::separator_row('grey-divider thin-divider') }} @endif @endif @if(isset($from_admin_grid))
{{ Form::label_title("Business") }}
{{ Form::select_ex('business', $business ? $business->business : null, \App\Models\Business::business_select() ,12, null, null, null, 'Select', 'business-search-select') }}
{{ Form::separator_row('grey-divider thin-divider') }} @else {{ Form::hidden('business', $business->business) }} @endif
{{ Form::label_title("Milestone") }}
@include('business.ticket._milestone_select', compact('business_ticket', 'business'))
{{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::label_title("Type") }}
@if($business_ticket->can_change_ticket_type() || !$business_ticket->business_ticket)
{{ Form::select_ex('ticket_type', $business_ticket->ticket_type, \App\Models\Ticket_Type::ticket_type_select(), 12, null, null, null, 'Select') }}
@else
{{ Form::label_grey($business_ticket->type_label) }}
{{ Form::hidden('ticket_type', $business_ticket->ticket_type) }} @endif {{ Form::label_link($business_ticket->business_ticket ? $business_ticket->type_wiki_link : null, 'boomwiki Documentation', \App\Helpers\FormComponentHelper::SIZE_SMALL, 'link-label boomwiki-link') }} {{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::label_title("Priority") }}
{{ Form::select_ex('priority', $business_ticket->priority, \App\Models\Business_Ticket::$business_ticket_priority_map,12, null, null, null) }}
{{ Form::separator_row('grey-divider thin-divider') }} @if($business_ticket->business_ticket)
{{ Form::label_title("Created By") }}
{{ Form::label_grey($business_ticket->_user_created->full_name) }}
{{ Form::separator_row('grey-divider thin-divider') }} @endif
{{ Form::label_title("Assign To") }}
{{ Form::select_ex('assigned_user', $business_ticket->assigned_user, $users, 12, null, null, null, 'Select') }}
{{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::label_title("Due Date") }}
{{ Form::date_ex('due_date', $business_ticket->due_date ? \Carbon\Carbon::parse($business_ticket->due_date)->setTimezone(config('fuse.bt_timezone')) : '', 11, 'date-picker') }}
{{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::label_title("Status") }}
{{ Form::select_ex('status',$business_ticket->status, \App\Models\Business_Ticket::$business_ticket_status_map,12, null, null, null) }}
{{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::label_title("Estimated Hours") }}
{{ Form::number_ex('estimated_hours', $business_ticket->estimated_hours, 11, null, true) }}
{{ Form::label_grey($business_ticket->business_ticket ? $business_ticket->_ticket_type->average_time_label : '') }}
{{ Form::separator_row('grey-divider thin-divider') }} @if($business_ticket->business_ticket)
{{ Form::label_title("Total Hours") }}
{{ Form::label_grey($total_hours) }}
{{ Form::separator_row('grey-divider thin-divider') }} @endif
{{ Form::label_styled('Subject Line', null, \App\Helpers\FormComponentHelper::SIZE_LARGE, 3) }} {{ Form::text_ex('subject_line', $business_ticket->subject_line, 9) }}
{{ Form::label_styled('Issue Text', null, \App\Helpers\FormComponentHelper::SIZE_LARGE, 3) }} @if(!$business_ticket->business_ticket)
{{ Form::tinymce('issue', $business_ticket->issue, 'issue') }}
@else @if(!$business_ticket->can_edit_issue())
{{ Form::tinymce('sample', $business_ticket->issue, 'issue_readonly') }}
@endif
can_edit_issue() ? "style=display:none!important" : '') }}> {{ Form::tinymce('issue', $business_ticket->issue, 'issue') }}
@endif
{{ Form::label_styled('Code Snippet', null, \App\Helpers\FormComponentHelper::SIZE_LARGE, 3) }} {{ Form::textarea_ex('code_snippet', $business_ticket->code_snippet, 9) }}
@if(!$business_ticket->code_snippet)
{{ Form::button_click_col('Code Snippet', null, 'snippet_btn') }}
@endif
@if(isset($additional_view_name) && $additional_view_name) @include($additional_view_name, $additional_view_data) @endif
{{--// DISABLED PIPEDRIVE 4/20/20--}} {{--@if(!$business_ticket->business_ticket && isset($business) && $business->pipedrive_id)--}} {{--
--}} {{--
--}} {{--{{ Form::checkbox_row('pipedrive', 1, 'Pipedrive', null, null, 9) }}--}} {{--
--}} {{--
--}} {{--@endif--}} @if($business_ticket->business_ticket && $business_ticket->type_has_feedback)
@if(isset($feedbacks) && count($feedbacks)) {{ Form::button_ex("Add Feedback", "window.scrollTo(0, 0); feedback_list_manager.add_one( '". $business_ticket->get_create_feedback_url()."', feedback_selector.calc_new_handle_id('".$business_ticket->business_ticket."') );", 'add_child_btn_top') }} @endif
@foreach($feedbacks as $feedback) @include('business.ticket._ticket_feedback', ['feedback' => $feedback, 'is_read_only' => $feedback->read_only_review]) @endforeach {{ Form::button_ex("Add Feedback", "window.scrollTo(0, 0); feedback_list_manager.add_one( '". $business_ticket->get_create_feedback_url()."', feedback_selector.calc_new_handle_id('".$business_ticket->business_ticket."') );", 'add_child_btn') }}
@if(isset($business_ticket_comments) && count($business_ticket_comments))
{{ Form::label_title('Previous Comments') }}
@include('business.ticket._business_tickets_comments', ['business_ticket_comments' => $business_ticket_comments]) @endif @else
{{ Form::label_styled('New Comment', null, \App\Helpers\FormComponentHelper::SIZE_LARGE, 3) }}
{{ Form::tinymce('comment', '', 'comment') }}
{{ Form::number_ex('hours', null, 3, null, true, null, null, null, 'Hours') }} {{ Form::number_ex('minutes', null, 3, null, null, null, null, null, 'Minutes') }} {{ Form::select_ex('time_type', null, \App\Models\Time_Type::time_type_select(), 6, null, null, null, 'Select') }}
@if(isset($business_ticket_comments) && count($business_ticket_comments))
{{ Form::button_ex('Add Comment', '', 'add_comment_top') }} {{ Form::button_ex('Update', "update_business_ticket()", 'update_ticket_top') }}
@endif @include('business.ticket._business_tickets_comments', ['business_ticket_comments' => $business_ticket_comments]) @if($business_ticket->business_ticket)
{{ Form::button_ex('Add Comment', '', 'add_comment') }}
@endif @endif @if($business_ticket->business_ticket) @if (sizeof($related_tickets) > 0) {{ Form::separator_row_empty('') }}
{{ Form::label_title("Related To") }}
@foreach($related_tickets as $related_ticket)
{{ Form::label_link($related_ticket->get_edit_url($nobusiness), $related_ticket->related_to_label, \App\Helpers\FormComponentHelper::SIZE_SMALL, 'new-tab-link link-label') }}
@endforeach
@endif
{{ Form::separator_row('grey-divider thin-divider history') }}
{!! $business_ticket->change_history !!}
@endif
@if($business_ticket->business_ticket) {{ Form::button_ex('Save', "update_business_ticket()", 'update_ticket') }} @else {{ Form::button_ex('Save', "post_ticket_add_links()", 'add_comment_feedback') }} @endif {{ Form::button_save('Save & Return', null, 'save_ticket_btn') }} {{-- Input::get('from_lightbox_collect') is true if the user came from lightbox collect and used the update button to stay on the ticket --}} @if(isset($from_lightbox_collect) && $from_lightbox_collect || Input::get('from_lightbox_collect')) {{ Form::hidden('from_lightbox_collect', true) }} {{ Form::button_link('Cancel', action('OptinMonsterController@view', ['business' => $business, 'optin_monster' => $additional_fields->optin_monster]), 'back_to_lightbox') }} @else {{ Form::hidden('from_lightbox_collect', false) }} {{ Form::button_link('Cancel', !$nobusiness ? action('BusinessTicketController@business_tickets', compact('business')) : action('SuperAdminController@tickets'), 'cancel_btn') }} @endif @if($business_ticket->can_create_related()) {{ Form::hidden('create_related_ticket', false, ['id' => 'create_related_ticket']) }} @endif @if($business_ticket->can_copy) {{ Form::hidden('is_copy_ticket', false, ['id' => 'is_copy_ticket']) }} @endif @if($business_ticket->can_delete()) {{ Form::button_ex('Delete', "delete_ticket('". action('BusinessTicketController@delete', ['business_ticket' => $business_ticket->business_ticket,'nobusiness' => $nobusiness]) . "')", 'delete_btn') }} @endif
Notice: Undefined variable: business_ticket in /var/www/html/fuse2/resources/views/business/ticket/add_edit_ticket.blade.php on line 288

Fatal error: Uncaught Error: Call to a member function can_create_related() on null in /var/www/html/fuse2/resources/views/business/ticket/add_edit_ticket.blade.php:288 Stack trace: #0 {main} thrown in /var/www/html/fuse2/resources/views/business/ticket/add_edit_ticket.blade.php on line 288