You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
3.4 KiB
JavaScript

var app = angular.module('instantQuote', []);
app.controller('PBX', function ($scope) {
$scope.options = {
callsSelection: 1,
"calls": [
{
"name": "Mostly inbound",
"description": "Most calls that come through my phone system come from external parties",
"icon": "angle double down"
},
{
"name": "Balanced",
"description": "There's a good balance of inbound and outbound calls",
"icon": "balance scale"
},
{
"name": "Mostly outbound",
"description": "We make a lot of calls compared to how many we receive.",
"icon": "angle double up"
},
{
"name": "Not sure",
"description": "Help me analyse my bill",
"icon": "question circle outline"
},
],
"accessories": [
{
"name": "Stereo wireless headset",
"tagline": "Sennheiser Impact MB Pro 2",
"description": "A comfortable, stero headset with 8 hours battery life, so you can talk all day",
"image": "mb-pro-2.png"
},
],
"phones": [
{
"name": "Softphone Only",
"tagline": "Use an app as your phone",
"description": "Use a powerful app as your office phone. For Windows, Mac, iOS and Android",
"image": "3cx-softphone.png"
},
{
"name": "Basic Deskphone",
"tagline": "Fanvil X3S Lite",
"description": "A modern, Enterprise-ready phone",
"image": "x3slite.png"
},
{
"name": "Standard Deskphone",
"tagline": "Fanvil X6U",
"description": "A high-end modern, Enterprise-ready phone",
"image": "x6u.png",
"tag": {
"color": "green",
"icon": "thumbs up outline",
"text": "Best value"
}
},
{
"name": "Advanced Deskphone",
"tagline": "Fanvil X210",
"description": "A high-end modern, Enterprise-ready phone",
"image": "x210.png"
},
{
"name": "Cordless phone",
"tagline": "Yealink W73P",
"description": "A professional, business DECT cordless phone system.",
"image": "w73p.png"
},
],
"phoneNumbers": [
{
"phone": "",
"account": "",
"carrier": ""
}
]
}
$scope.addOption = (item, increment = 1) => {
if (typeof item.count === "undefined") {
item.count = 1
} else {
item.count += increment
}
}
$scope.selectOption = (object, value) => {
$scope.options[object] = value;
}
$scope.addNumber = () => {
$scope.options.phoneNumbers.push({ phone: '', account: '', carrier: '' })
}
$scope.viewResult = () => {
$('.ui.modal')
.modal({
blurring: true
})
.modal('show');
setTimeout(()=>{
},5000);
}
});