<?php

namespace App\Http\Controllers\View;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class ContractController extends Controller
{
    public function view()
    {
        /// [START] contract_show_data_view
        if (Auth::user()->can('show-contract') || Auth::user()->can('show-contract-province')) {
            return view('rmto-preview.pages.financeend');
        }
        /// [END] contract_show_data_view

        return abort(403);
    }
    public function new()
    {
        /// [START] contract_show_data_view
        if (Auth::user()->can('show-contract') || Auth::user()->can('show-contract-province')) {
            return view('rmto-preview.pages.financenew');
        }
        /// [END] contract_show_data_view

        return abort(403);
    }

    public function financeView(){
        /// [START] contract_show_data_view
        if (Auth::user()->can('show-contract') || Auth::user()->can('show-contract-province')) {
            return view('rmto-preview.pages.finance');
        }
        /// [END] contract_show_data_view

        return abort(403);
    }
}
