Subversion Repository Public Repository

ChrisCompleteCodeTrunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<%@ Page Title="Action Tire CRM" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="CRMPortal._Default" %>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <input type="hidden" id="UID" runat="server" />
    <asp:Label ID="lblError" runat="server" ForeColor="Red" Text="Error" 
        Visible="False"></asp:Label>
    <br />
    <style>
        a
        {
            text-decoration: none;
        }
        .splashlist li
        {
            list-style: none;
            padding-bottom: 10px;
        }
        .splashlist li strong
        {
            color: #f00;
            font-size: 1.25em;
        }

        .splashlist li strong a
        {
            color: #f00;
            text-decoration: none;
        }
    </style>
    
    <div class="container-fluid">
            <div class="row">
                <img src="./images/logo.png" style="max-width: 150px; display: inline;" />
                <p style="display:inline;">Welcome to the Action Tire Company CRM Portal</p>
                <img src="./images/logo-30y.png" class="pull-right" style="max-width: 150px; display: inline; margin-top: -40px;" />
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <ul class="list-group">
                    <li class="row list-group-item"><div class="col-md-5"><strong><a class="btn btn-primary" style="width: 100%;" href="SearchNearby.aspx">Nearby Customers</a></strong></div><div class="col-md-7">Search for customers near your location</div></li>
                    <li class="row list-group-item"><div class="col-md-5"><strong><a class="btn btn-primary" style="width: 100%;" href="SearchProspects.aspx">Prospects</a></strong></div><div class="col-md-7">Search through the list of all new customer prospects</div></li>
                    <li class="row list-group-item"><div class="col-md-5"><strong><a class="btn btn-primary" style="width: 100%;" href="SearchCustomers.aspx">Customers</a></strong></div><div class="col-md-7">Search through the list of all existing Action Tire customers</div></li>
                    <li class="row list-group-item"><div class="col-md-5"><strong><a class="btn btn-primary" style="width: 100%;" href="CheckInventory.aspx">Check Inventory</a></strong></div><div class="col-md-7">Check store inventories</div></li>
                    <li class="row list-group-item"><div class="col-md-5"><strong><a class="btn btn-primary" style="width: 100%;" href="QuickCall.aspx">Enter Sales Call</a></strong></div><div class="col-md-7">Enter a new sales call</div></li>
                    <li class="row list-group-item"><div class="col-md-5"><strong><a class="btn btn-primary" style="width: 100%;" href="https://mobile.actiontireco.com/ATC_Forms/default.aspx">Do Quote</a></strong></div><div class="col-md-7">Send a quote</div></li>
                    <li class="row list-group-item"><div class="col-md-5"><strong><a class="btn btn-primary" style="width: 100%;" href="ViewProspect.aspx">View Prospect</a></strong></div><div class="col-md-7">Create a new customer prospect, or view an existing one using the associated Prospect ID number</div></li>
                    <li class="row list-group-item"><div class="col-md-5"><strong><a class="btn btn-primary" style="width: 100%;" href="ViewCustomer.aspx">View Customer</a></strong></div><div class="col-md-7">View an existing customer using their Customer ID number</div></li>
                    <li class="row list-group-item"><div class="col-md-5"><strong><a class="btn btn-primary" style="width: 100%;" href="#" disabled="disabled">Enter Service Call</a></strong></div><div class="col-md-7">Create a dispatch service call</div></li>
                </ul>
            </div>
            <div class="col-md-6">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">Quote of the Week</h3>
                    </div>
                    <div class="panel-body">
                        <p id="QOTW">Quote Here</p>
                    </div>
                </div>
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">ATC University</h3>
                    </div>
                    <div class="panel-body">
                        <div id="universityFrame" runat="server"></div>
                    </div>
                </div>
                <div class="panel panel-primary hide" id="upcoming_appointments_panel">
                    <div class="panel-heading">
                        <h3 class="panel-title">Upcoming Appointments</h3>
                    </div>
                    <div class="panel-body">
                        <div id="upcoming_appointments"></div>
                        <div id="upcoming_prospect_appointments"></div>
                    </div>
                </div>

                <div class="panel panel-primary hide" id="upcoming_recurring_panel">
                    <div class="panel-heading">
                        <h3 class="panel-title">Recurring Calls</h3>
                    </div>
                    <div class="panel-body">
                        <div id="upcoming_recurring"></div>
                        <div id="upcoming_prospect_recurring"></div>
                    </div>
                </div>
            </div>
            <script>
                $('.atcNav').removeClass('active');
                $('#homeNav').addClass('active');

                function GetQOTW() {
                    $.ajax({
                        type: "POST",
                        url: "Default.aspx/GetQOTW",
                        data: '{}',
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (msg) {
                            $('#QOTW').text(msg.d);
                            //$('#QOTW').val(jQuery.parseJSON(msg.d))
                        }
                    });
                }

                var UpcomingAppointments = [];
                var UpcomingProspectAppointments = [];
                var UpcomingRecurring = [];
                var UpcomingProspectRecurring = [];

                function get_upcoming_appointments()
                {
                    $.ajax({
                        type: "POST",
                        url: "AJAX.aspx/GetUpcomingAppointments",
                        data: '{"uid":"'+$('#MainContent_UID').val()+'", "asa":"1"}',
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (msg) {
                            UpcomingAppointments = jQuery.parseJSON(msg.d);
                            if (!(UpcomingAppointments.length + UpcomingProspectAppointments.length))
                            {
                                $('#upcoming_appointments_panel').fadeOut('fast');
                                return;
                            }
                            if (UpcomingAppointments.length) {
                                var html = '<ul class="list-group"><h3>Customers</h3>';
                                for (var i = 0; i < UpcomingAppointments.length; i++) {
                                    html += '<li onmouseout="this.style.backgroundColor=\'white\';" onmouseover="this.style.backgroundColor=\'#ffff99\';" onclick="window.location=(\'QuickCall.aspx?CUST=' + UpcomingAppointments[i]['cust'] + '\')" class="list-group-item"><b>' + UpcomingAppointments[i]['when'] + '</b>: ' + UpcomingAppointments[i]['customer'] + '</li>';
                                }
                                html += '</ul>';
                                $('#upcoming_appointments').html(html);
                            }
                            $('#upcoming_appointments_panel').removeClass('hide');
                            $('#upcoming_appointments_panel').fadeIn('slow');
                        }
                    });
                    $.ajax({
                        type: "POST",
                        url: "AJAX.aspx/GetUpcomingAppointments",
                        data: '{"uid":"' + $('#MainContent_UID').val() + '", "asa":"0"}',
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (msg) {
                            UpcomingProspectAppointments = jQuery.parseJSON(msg.d);
                            if (!(UpcomingAppointments.length+UpcomingProspectAppointments.length)) {
                                $('#upcoming_appointments_panel').fadeOut('fast');
                                return;
                            }
                            if (UpcomingProspectAppointments.length) {
                                var html = '<ul class="list-group"><h3>New Prospects</h3>';
                                for (var i = 0; i < UpcomingProspectAppointments.length; i++) {
                                    html += '<li onmouseout="this.style.backgroundColor=\'white\';" onmouseover="this.style.backgroundColor=\'#ffff99\';" onclick="window.location=(\'QuickCall.aspx?PROSPECT=' + UpcomingProspectAppointments[i]['prospect'] + '\')" class="list-group-item"><b>' + UpcomingProspectAppointments[i]['when'] + '</b>: ' + UpcomingProspectAppointments[i]['customer'] + '</li>';
                                }
                                html += '</ul>';
                            }
                            $('#upcoming_prospect_appointments').html(html);
                            $('#upcoming_appointments_panel').removeClass('hide');
                            $('#upcoming_appointments_panel').fadeIn('slow');
                        }
                    });
                }

                function get_upcoming_recurring() {
                    $.ajax({
                        type: "POST",
                        url: "AJAX.aspx/GetUpcomingRecurring",
                        data: '{"uid":"' + $('#MainContent_UID').val() + '", "asa":"1"}',
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (msg) {
                            UpcomingRecurring = jQuery.parseJSON(msg.d);
                            if (!(UpcomingRecurring.length + UpcomingProspectRecurring.length)) {
                                $('#upcoming_recurring_panel').fadeOut('fast');
                                return;
                            }
                            if (UpcomingRecurring.length) {
                                var html = '<ul class="list-group"><h2>Customers</h2>';
                                for (var i = 0; i < UpcomingRecurring.length; i++) {
                                    html += '<li onmouseout="this.style.backgroundColor=\'white\';" onmouseover="this.style.backgroundColor=\'#ffff99\';" onclick="window.location=(\'QuickCall.aspx?CUST=' + UpcomingRecurring[i]['cust'] + '\')" class="list-group-item"><b>' + UpcomingRecurring[i]['when'] + '</b>: ' + UpcomingRecurring[i]['customer'] + '</li>';
                                }
                                html += '</ul>';
                            }
                            $('#upcoming_recurring').html(html);
                            $('#upcoming_recurring_panel').removeClass('hide');
                            $('#upcoming_recurring_panel').fadeIn('slow');
                        }
                    });
                    $.ajax({
                        type: "POST",
                        url: "AJAX.aspx/GetUpcomingRecurring",
                        data: '{"uid":"' + $('#MainContent_UID').val() + '", "asa":"0"}',
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (msg) {
                            UpcomingProspectRecurring = jQuery.parseJSON(msg.d);
                            if (!(UpcomingRecurring.length + UpcomingProspectRecurring.length)) {
                                $('#upcoming_recurring_panel').fadeOut('fast');
                                return;
                            }
                            if (UpcomingProspectRecurring.length) {
                                var html = '<ul class="list-group"><h2>New Prospects</h2>';
                                for (var i = 0; i < UpcomingProspectRecurring.length; i++) {
                                    html += '<li onmouseout="this.style.backgroundColor=\'white\';" onmouseover="this.style.backgroundColor=\'#ffff99\';" onclick="window.location=(\'QuickCall.aspx?PROSPECT=' + UpcomingProspectRecurring[i]['prospect'] + '\')" class="list-group-item"><b>' + UpcomingProspectRecurring[i]['when'] + '</b>: ' + UpcomingProspectRecurring[i]['customer'] + '</li>';
                                }
                                html += '</ul>';
                            }
                            $('#upcoming_prospect_recurring').html(html);
                            $('#upcoming_recurring_panel').removeClass('hide');
                            $('#upcoming_recurring_panel').fadeIn('slow');
                        }
                    });
                }

                $(document).ready(function () {
                    GetQOTW();
                    get_upcoming_appointments();
                    get_upcoming_recurring();
                });
            </script>
        </div>
</asp:Content>

Commits for ChrisCompleteCodeTrunk/ATCCRMPortal/CRMPortal/Default.aspx

Diff revisions: vs.
Revision Author Commited Message
1 BBDSCHRIS picture BBDSCHRIS Wed 22 Aug, 2018 20:08:03 +0000