123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849 |
- @extends('layouts.master')
- @section('style')
- <link href='{{ asset('assets\dropzone\dropzone.css') }}' type='text/css' rel='stylesheet'>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css"/>
- <link rel="stylesheet" href="{{ URL::asset('assets/css/jquery.datetimepicker.css') }}">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/pnotify.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweetalert.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweet-alert-animations.css">
- <style>
- .dz-message{
- text-align: center;
- font-size: 28px;
- }
- .activity-btn:hover{
- color: #48C2A9;
- border-color: #48C2A9;
- }
- .remarks-div {
- height: 250px;
- /*background-color: #eee;*/
- overflow-y: auto;
- }
- .activity-div {
- height: 250px;
- overflow-y: auto;
- }
- .panel-service .panel-body{
- height:350px;
- overflow-y: auto;
- }
- .bg-grey{background: #ddd;}
- .table{font-size: 12px;}
- .table-company tr th,.table-company tr td{font-size: 12px;}
- .table-company tr th{ width: 25% !important; }
- .table-company tr td{ width:auto !important; }
- .table-service tr th,.table-service tr td{font-size: 12px;vertical-align: middle !important;}
- @media screen and (min-width: 768px){
- #modalUpload .modal-content{ top:10%;width: 30%;margin: 0 auto; }
- }
- .remarks-footer{
- padding-top: 8px;
- font-size: 11px;
- color: #616A75;
- }
- #modalCompanyEdit .modal-content{width: 50%;margin: 0 auto;}
- .panel-default>.panel-heading {
- background-color: #ddd !important;
- }
- </style>
- @endsection
- @section('content')
- <!-- Main content -->
- <section class="content">
- <!-- Main row -->
- <div class="row">
- <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
- <div class="panel panel-default">
- <div class="panel-heading">
- Company Info
- <a href="{{ route('edit_company',['id'=>$all->id]) }}" data-toggle='modal' data-target='#modalCompanyEdit' class='btn btn-xs btn-primary pull-right'><i style="padding-left: 2px;" class="fa fa-edit"></i></a>
- </div>
- <table class="table table-company">
- <tr>
- <th>
- Company Name
- </th>
- <td>
- {{$all->name}}
- <input type="hidden" value="{{$all->id}}" id="company_id">
- </td>
- </tr>
- <?php
- $ary_industry = [
- 1=>"Recreation",2=>"Food",3=>"Training",
- 4=>"Professionals",5=>"Industry",6=>"Agriculture",7=>"Germents",8=>"Health",9=>"Apperal",10=>"E-Commerce"
- ];
- ?>
- <tr>
- <th>Industry</th>
- <td>
- @foreach($ary_industry as $key=>$indus)
- @if($key == $all->industry)
- {{$indus}}
- @endif
- @endforeach
- </td>
- </tr>
- <tr>
- <th>Mobile</th>
- <td>{{$all->mob1}}, {{$all->mob2}}</td>
- </tr>
- <tr>
- <th>Email</th>
- <td>{{$all->email1}}, {{$all->email2}}</td>
- <input type="hidden" class="hdn-email1" value="{{$all->email1}}">
- <input type="hidden" class="hdn-email2" value="{{$all->email2}}">
- </tr>
- <tr>
- <th>Website</th>
- <td>{{$all->web}}</td>
- </tr>
- <tr>
- <th>Address</th>
- <td>{{$all->address}}</td>
- </tr>
- <tr>
- <th>Remarks</th>
- <td>{{$all->remarks}}</td>
- </tr>
- </table>
- </div>
- <div class="panel panel-default">
- <!-- Default panel contents -->
- <div class="panel-heading">Address Book <button class="btn btn-success btn-xs pull-right" data-toggle="modal" data-target=".add-modal">Add Contract Person</button></div>
- <table class="table table-bordered">
- <tr>
- <th width="20%">Name</th>
- <th width="20%">Designation</th>
- <th width="20%">Mobile</th>
- <th width="20%">Email</th>
- <th width="20%">Action</th>
- </tr>
- @foreach($all->contact_persons as $cp)
- <tr>
- <td>
-
- {{$cp->name}}
- </td>
- <td>
- {{$cp->designation}}
- </td>
- <td>
- {{$cp->mob1}}<br>{{$cp->mob2}}
- </td>
- <td>
- {{$cp->email1}}<br>{{$cp->email2}}
- </td>
- <td>
- @if($cp->system_user==0)
- <?php
- $add1=$all->address?$all->address:'N/A';
- $web1=$all->web?$all->web:'N/A';
- ?>
- {{-- <span class="btn btn-sm btn-primary sub_btn" data-name="{{$cp->name}}" data-cp_id="{{$cp->id}}" data-phone="{{$cp->mob1}}" data-email="{{$cp->email1}}" data-address="{{$add1}}" data-web="{{$web1}}" data-company="{{$cp->company_id}}" data-designation="{{$cp->designation}}">Add As User</span> --}}
- <a href="{{url('admin/company/add_user/'.$cp->id)}}" class="btn btn-sm btn-primary sub_btn">Add As User</a>
- @else
- {{ "N/A" }}
- @endif
- </td>
- </tr>
- @endforeach
- </table>
- </div>
- <div class="panel panel-default">
- <!-- Default panel contents -->
- <div class="panel-heading">Account Manager</div>
- @if($manager)
- <table class="table table-bordered" id="table_div">
- <tr>
- <th>Name</th>
- <th>Designation</th>
- <th>Mobile</th>
- <th>Email</th>
- <th>Action</th>
- </tr>
- <tr>
- <td>
- {{$manager->name}}
- </td>
- <td>
- {{$manager->designation}}
- </td>
- <td>
- {{$manager->mob}}
- </td>
- <td>
- {{$manager->email}}
- </td>
- <td>
- <span class="btn btn-success btn-xs pull-right" id="change_manager">Change Manager</span>
- </td>
- </tr>
- </table>
- @endif
- <div class="row" @if($manager) style="display: none;" @endif id="select_div">
- <div class="col-md-8">
- <div class="form-group" style="margin-top: 15px;">
- <select class="form-control" name="manager" placeholder="manager" id="manager">
- <option>Select Account Manager</option>
- @foreach($managers_all as $m_all)
- <option value="{{ $m_all->id }}">{{ $m_all->name }}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="col-md-4">
- <span class="btn btn-success btn-block pull-right" style="margin-top: 15px;" id="add_manager">Add Manager</span>
- </div>
- </div>
- </div>
- <div class="panel panel-default">
- <div class="panel-heading">Remarks</div>
- <div class="panel-body">
- <textarea class="form-control" name="" id="remarkss" placeholder="Write down remarks"></textarea>
- <button class="btn btn-success btn-xs remarks-btn" style="margin-top:10px;margin-bottom: 20px;"><i class="fa fa-comment-o"></i> Remark</button>
- <div class="remarks-div"></div>
- </div>
- </div>
- <div class="panel panel-default">
- <div class="panel-heading">Invoice <a href="{{url('invoice/new')}}" class="btn btn-success btn-xs pull-right">New Invoice</a></div>
- <div class="panel-body">
- @if(!empty($invoice))
- <table class="table table-bordered" id="table_div">
- <tr>
- <th>Company Name</th>
- <th>Service</th>
- <th>Date</th>
- <th>Amount</th>
- <th>Status</th>
- </tr>
- @foreach($invoice as $row)
- <tr>
- <td>{{$row->company->name}}</td>
- <td>
- @foreach($row->items as $item)
- {{ $item->service?$item->service->name:'' }} <br>
- @endforeach
- </td>
- <td>{{ date('d-m-Y',strtotime($row->invoice_date)) }}</td>
- <td>
- <?php
- $total=$row->items?$row->items->sum('payable_amount'):0;;
- $total1=$row->items?$row->items->sum('payable_amount'):0;
- $total2=$row->items?$row->items->sum('payable_amount'):0;
- $total_vat=($total1*$row->vat)/100;
- $total_tax=($total2*$row->tax)/100;
- $payable=$total+$total_vat+$total_tax;;
- $paid=$row->items?$row->items->sum('paid_amount'):0;
- $due=$payable-$paid;
- ?>
- {{ $payable }}
- </td>
- <td>
- @if($row->status==0)
- <span class='label label-danger'>Due</span>
- @elseif($row->status==1)
- <span class='label label-success'>Paid</span>
- @endif
- </td>
- </tr>
- @endforeach
- </table>
- @else
- <p class="text-center"> Invoice Not Found! </p>
- @endif
- </div>
- </div>
-
- </div>
-
- <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
-
- <div class="panel panel-default panel-service">
- <!-- Default panel contents -->
- <div class="panel-heading">
- Sevices Of {{$all->name}}
- <a href="#" id="lnkAssignService" data-company_id='{{ $all->id }}' data-company_name='{{ $all->name }}' class='btn btn-info btn-xs pull-right'>
- <i class="fa fa-plus"></i> Add New Service
- </a>
- </div>
- <!-- Table -->
- <div class="panel-body">
-
- <table class="table table-bordered table-service">
- <thead>
- <tr>
- <th>Name Of Service</th>
- <th>Deployment Unit</th>
- <th>Start Date</th>
- <th style='width:30% !important'>Contact Info</th>
- <th>Upload</th>
- </tr>
- </thead>
- <tbody>
- @if($company_services)
- @foreach($company_services as $service)
- <tr>
- <td><a target="_blank" href="{{ url('admin/company/service/details') }}/{{ $service->id }}">{{ $service->services?$service->services->name:'--' }}</a></td>
- <td>{{ $service->deployment_unit_details }}</td>
- <td>{{ date('d M, Y',strtotime($service->start_date)) }}</td>
- <td>
- <strong>Name : </strong> {{ $service->contact_person }} <br>
- <strong>Phone : </strong> {{ $service->contact_number }}
- </td>
- <td align="center">
- <a class='btn btn-info btn-xs' data-toggle='modal' data-target='#modalUpload' href="{{ url('admin/company/service/upload') }}/{{ $service->id }}">
- <i class="fa fa-cloud-upload"></i>
- </a>
- </td>
- </tr>
- @endforeach
- @else
- <tr>
- <td colspan="4">No Service Found !!</td>
- </tr>
- @endif
- </tbody>
- </table>
- </div>
-
- </div>
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">Add Task</h3>
- </div>
- <div class="panel-body">
- <div class="nav-tabs-custom">
- <ul class="nav nav-tabs">
- <li class="active">
- <a href="#new_task" data-toggle="tab">
- <i class="fa fa-list" style="margin-right: 5px;"></i>
- New Task
- </a>
- </li>
- <li>
- <a href="#appointment" data-toggle="tab">
- <i class="fa fa-calendar" style="margin-right: 5px;"></i>
- Appointment
- </a>
- </li>
- <li>
- <a href="#phone" data-toggle="tab">
- <i class="fa fa-phone" style="margin-right: 5px;"></i>
- Phone
- </a>
- </li>
- <li>
- <a href="#email" data-toggle="tab">
- <i class="fa fa-envelope" style="margin-right: 5px;"></i>
- Email
- </a>
- </li>
- </ul>
- <div class="tab-content">
- <div class="active tab-pane" id="new_task">
- <form role="form" action="{{url('admin/company_task/manager_task')}}" method="POST">
- {!! csrf_field() !!}
- <input type="hidden" name="company_id" value="{{$all->id}}">
- <div class="form-group">
- <label>
- Title
- </label>
- <input name="name" class="form-control" placeholder="Title" required="">
- </input>
- </div>
- <div class="form-group">
- <label>
- Description
- </label>
- <textarea name="description" class="form-control" id="task_editor" placeholder="Description" rows="5"></textarea>
- </div>
- <div class="form-group">
- <label>
- Priority
- </label>
- <select name="priority" class="form-control">
- <option value="1">Low</option>
- <option value="2">Mid</option>
- <option value="3">High</option>
- </select>
- </div>
- <div class="form-group">
- <label>
- Dead Line
- </label>
- <input name="date" type="text" class="form-control date" placeholder="Select Date and Time" required="">
- </input>
- </div>
- <button type="submit" class="btn btn-primary">Add</button>
- </form>
- </div>
- <div class="tab-pane" id="appointment">
- <form role="form" action="{{url('admin/company_task/manager_appointment')}}" method="POST">
- {!! csrf_field() !!}
- <input type="hidden" name="company_id" value="{{$all->id}}">
- <div class="form-group">
- <label>
- Title
- </label>
- <input name="name" class="form-control" placeholder="Title" required="">
- </input>
- </div>
- <div class="form-group">
- <label>
- Description
- </label>
- <textarea name="description" class="form-control" id="task_editor" placeholder="Description" rows="5"></textarea>
- </div>
- <div class="form-group">
- <label>
- Priority
- </label>
- <select name="priority" class="form-control">
- <option value="1">Low</option>
- <option value="2">Mid</option>
- <option value="3">High</option>
- </select>
- </div>
- <div class="form-group">
- <label>
- Appointment Date
- </label>
- <input name="date" type="text" class="form-control date" placeholder="Select Date and Time" required="">
- </input>
- </div>
- <button type="submit" class="btn btn-primary">Add</button>
- </form>
- </div>
- <div class="tab-pane" id="phone">
- <form role="form" action="{{url('admin/company_task/manager_phone')}}" method="POST">
- {!! csrf_field() !!}
- <input type="hidden" name="company_id" value="{{$all->id}}">
- <div class="form-group">
- <label>
- Title
- </label>
- <input name="name" class="form-control" placeholder="Title" required="">
- </input>
- </div>
- <div class="form-group">
- <label>
- Description
- </label>
- <textarea name="description" class="form-control" id="task_editor" placeholder="Description" rows="5"></textarea>
- </div>
- <div class="form-group">
- <label>
- Priority
- </label>
- <select name="priority" class="form-control">
- <option value="1">Low</option>
- <option value="2">Mid</option>
- <option value="3">High</option>
- </select>
- </div>
- <div class="form-group">
- <label>
- Call Date
- </label>
- <input name="date" type="text" class="form-control date" placeholder="Select Date and Time" required="">
- </input>
- </div>
- <button type="submit" class="btn btn-primary">Add</button>
- </form>
- </div>
- <div class="tab-pane" id="email">
- <form role="form" action="{{url('admin/company_task/send_email')}}" method="POST">
- {!! csrf_field() !!}
- <input type="hidden" name="company_id" value="{{$all->id}}">
- <div class="form-group">
- <label>
- To
- </label>
- <select name="mail_to" class="form-control">
- @if(count($all->contact_persons))
- <option disabled="" selected="">Select One..</option>
- @foreach($cilents as $clnt)
- <option value="{{ $clnt->id }}">{{ $clnt->name }}</option>
- @endforeach
- @else
- <option disabled="" selected="">No Contact Person Added Yet.</option>
- @endif
- </select>
- </div>
- <div class="form-group">
- <label>
- Subject
- </label>
- <input name="subject" class="form-control" placeholder="Subject" required="">
- </input>
- </div>
- <div class="form-group">
- <label>
- Message
- </label>
- <textarea name="message" class="form-control" id="task_editor" placeholder="Message" rows="5"></textarea>
- </div>
- <button type="submit" class="btn btn-primary">Send</button>
- </form>
- </div>
- </div>
- <!-- /.tab-content -->
- </div>
- </div>
- </div>
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">Activity</h3>
- </div>
- <div class="panel-body">
- <div style="min-height: 250px;" class="activity-div"></div>
- </div>
-
- <div class="panel-footer">
- <button class="btn btn-xs activity-btn" data-fullText="Already called.">
- Mobile
- <i class="fa fa-mobile" aria-hidden="true"></i>
- </button>
- <button class="btn btn-xs activity-btn" data-toggle="modal" data-target=".modal-email" data-fullText="mail">
- Email
- <i class="fa fa-envelope-o" aria-hidden="true"></i>
- </button>
- <button class="btn btn-xs activity-btn" data-fullText="Already send a sms.">
- SMS
- <i class="fa fa-comments-o" aria-hidden="true"></i>
- </button>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- Modal to add services -->
- @include('admin.company_info.service_modal')
- <!-- end modal to add services -->
- <!-- Modal Add Contract person -->
- @include('admin.company_info.add_contact_info')
- <!-- /.modal -->
- <!-- Modal Email -->
- @include('admin.company_info.modal_email')
- <!-- /.modal -->
- <!-- Modal File Upload -->
- <div class="modal fade" id="modalUpload">
- <div class="modal-dialog modal-md">
-
- </div>
- </div>
- <!-- /.modal -->
- <!--Edit Company Modal File Upload -->
- <div class="modal fade" id="modalCompanyEdit">
- <div class="modal-dialog modal-md">
-
- </div>
- </div>
- <!-- /.modal -->
- @endsection
- @section('script')
- <script src="{{URL::asset('assets/ckeditor/ckeditor.js')}}"></script>
- <script type="text/javascript" src="{{ URL::asset('assets/js/jquery.datetimepicker.full.min.js') }}"></script>
- <script src="{{URL::asset('assets/front_end/js/plugins/timepicker/bootstrap-timepicker.js')}}"></script>
- <script src="{{ asset('/assets/') }}/alert/sweetalert.min.js"></script>
- <script src="{{ asset('/assets/') }}/alert/pnotify.js"></script>
- <script src="{{ asset('/assets/') }}/alert/notify.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $( ".date" ).datetimepicker({
- dateFormat: 'dd/mm/yy',
- timeFormat: 'HH:mm',
- });
- /*$('.date').timepicker({
- timeFormat: 'H:i',
- template: false,
- //showInputs: true,
- });*/
- CKEDITOR.replace( 'task_editor' );
- /*$( ".date" ).datepicker({
- changeMonth: true,
- changeYear: true,
- dateFormat:"dd-mm-yy",
- timeFormat: 'hh:mm'
- });*/
- $('body').on('click','.sub_btn',function(){
- var user_name=$(this).data('name');
- var phone=$(this).data('phone');
- var email=$(this).data('email');
- var address=$(this).data('address');
- var web=$(this).data('web');
- var company=$(this).data('company');
- var designation=$(this).data('designation');
- var cp_id=$(this).data('cp_id')
- $.ajax({
- url: "{{url('admin/company/add_user')}}",
- type: 'POST',
- data: {user_name: user_name, mob: phone, email: email, address: address, website: web, company: company, designation:designation, cp_id:cp_id},
- })
- console.log(data)
- .done(function(data) {
- alert(data);
- location.reload();
- });
- });
- $('body').on('click','#add_manager',function(){
- var user_id = $( "#manager option:selected" ).val();;
- var company = $('#company_id').val();
- $.ajax({
- url: "{{url('admin/company/add_manager')}}",
- type: 'POST',
- data: {user_id: user_id,company: company},
- })
- .done(function(data) {
- alert(data);
- location.reload();
- });
- });
- $('body').on('click','#change_manager',function(){
- $('#table_div').hide('fast');
- $('#select_div').show('slow');
- });
- $('body').on('hidden.bs.modal', '.modal', function () {
- $(this).removeData('bs.modal');
- });
- $('#lnkAssignService').click(function(e){
- e.preventDefault();
- var com_id=$(this).data('company_id');
- var com_name=$(this).data('company_name');
- $('span#company_name').text(com_name);
- $('input[name="hdn_com_id"]').val(com_id);
- $('#modalService').modal('show');
- });
- $('#btn_assign_service').click(function(){
- var com_id=$('input[name="hdn_com_id"]').val();
- var service=$('#ddlService').val();
- var contact_person=$('#contact_person').val();
- var contact_number=$('#contact_number').val();
- var deployement_unit=$('#deployement_unit').val();
- var po_details=$('#po_details').val();
- var renewal_cycle=$('#renewal_cycle').val();
- var free_session=$('#free_session').val();
- var start_date=$('#start_date').val();
- var token='{{ csrf_token() }}';
- if(com_id.length==0 || service.length==0){
- $('#spn_msg').text('Service name must be selected !');
- return false;
- }
- $.ajax({
- url: '{{ url('admin/company/service/assign') }}',
- type: 'POST',
- dataType: 'json',
- data: {com_id:com_id,service:service,contact_person:contact_person,contact_number:contact_number,deployement_unit:deployement_unit,po_details:po_details,renewal_cycle:renewal_cycle,free_session:free_session,start_date:start_date,_token:token}
- })
- .done(function(res) {
- if(res.ok)
- {
- alert(res.msg);
- $('#modalService').modal('hide');
- }
- });
-
- });
- var company_id = $('#company_id').val();
- //fetch remarks
- $.ajax({
- url: "{{url('admin/save_remarks')}}",
- type: 'POST',
- data: {remarks: '0', company_id: company_id},
- })
- .done(function(data) {
-
- $('.remarks-div').html(data);
- });
- //fetch activity
- $.ajax({
- url: "{{url('admin/save_activity')}}",
- type: 'POST',
- data: {val: '0', company_id: company_id},
- })
- .done(function(data) {
-
- $('.activity-div').html(data);
- });
- //ck editor
- CKEDITOR.replace( 'editor1' );
- CKEDITOR.replace( 'comment_txt' );
- });
- $('.activity-btn').click(function(event) {
-
- var email1 = $('.hdn-email1').val();
- var email2 = $('.hdn-email2').val();
-
- $('.to-email').val(email1+', '+email2);
- var val = $(this).attr("data-fullText");
-
- if(val != 'mail'){
- if(confirm('Want to add in activity list ?')){
- var company_id = $('#company_id').val();
- $.ajax({
- url: "{{url('admin/save_activity')}}",
- type: 'POST',
- data: {val: val, company_id: company_id},
- })
- .done(function(data) {
-
- $('.activity-div').html(data);
- });
- }
- }
- });
- $('.email-send').click(function(event){
- var val = "An email sent.";
- var company_id = $('#company_id').val();
- var email1 = $('.hdn-email1').val();
- var email2 = $('.hdn-email2').val();
- var email_subj = $('.email_subj').val();
- var attachment_id = $('.attachment_id').val();
- var email_body = CKEDITOR.instances.editor1.getData();
- if(email1.length > 0){
- $.ajax({
- url: "{{url('admin/send_email_to_company')}}",
- type: 'POST',
- data: {email1: email1,email2: email2, subj: email_subj, email_body:email_body,attachment_id: attachment_id},
- })
- .done(function(data){
-
- if(data == 'success'){
- $.ajax({
- url: "{{url('admin/save_activity')}}",
- type: 'POST',
- data: {val: val, company_id: company_id},
- })
- .done(function(data) {
-
- $('.activity-div').html(data);
- });
- alert('Email Send successfully!!');
- }
- else{
- alert('Sorry! email not send ...');
- }
- });
- }
- else{
- alert('Email 01 filed is mendatory. Email address not available!');
- }
- });
- $( ".activity-div" ).on( "click",".remove-activity",function() {
-
- var id = $(this).attr("data-id");
- var company_id = $('#company_id').val();
- if(confirm('Want to delete?'))
- {
- $.ajax({
- url: "{{url('admin/remove_activity')}}",
- type: 'POST',
- data: {id: id,company_id: company_id},
- })
- .done(function(data) {
-
- $('.activity-div').html(data);
- alert('Data removed successfully!');
- });
- }
- });
-
- $('.remarks-btn').click(function(event) {
-
- var remarks = $('#remarkss').val();
- var company_id = $('#company_id').val();
- if(remarks.length > 0){
- $.ajax({
- url: "{{url('admin/save_remarks')}}",
- type: 'POST',
- data: {remarks: remarks, company_id: company_id},
- })
- .done(function(data) {
-
- $('.remarks-div').html(data);
- $('#remarkss').val('');
- });
- }
- else{
- alert('Please fill up remarks field');
- }
- });
- $( ".remarks-div" ).on( "click",".remove-remarks",function() {
-
- var id = $(this).attr("data-id");
- var company_id = $('#company_id').val();
- if(confirm('Want to delete?'))
- {
- $.ajax({
- url: "{{url('admin/remove_remarks')}}",
- type: 'POST',
- data: {id: id,company_id: company_id},
- })
- .done(function(data) {
-
- $('.remarks-div').html(data);
- alert('Data removed successfully!');
- });
- }
- });
- </script>
- @endsection
- @if(Session::has('msg'))
- <div class="alert alert-success center-block msg_alt" >
- <a class="close" data-dismiss="alert" href="#">×</a>
- <strong><i class="fa fa-check"></i></strong>
- {{Session::get('msg')}}
- </div>
- @endif
|