Skip to content

Commit

Permalink
add: Clio non billable tickbox
Browse files Browse the repository at this point in the history
  • Loading branch information
DaKingKong committed Jan 21, 2025
1 parent cd9783e commit 17f284f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/adapters/clio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function getUserInfo({ authHeader }) {
returnMessage: {
messageType: 'warning',
message: 'Could not load user information',
details:[
details: [
{
title: 'Details',
items: [
Expand Down Expand Up @@ -136,7 +136,15 @@ async function findContact({ user, authHeader, phoneNumber, overridingFormat })
title: result.title ?? "",
company: result.company?.name ?? "",
phone: numberToQuery,
additionalInfo: returnedMatters.length > 0 ? { matters: returnedMatters, logTimeEntry: user.userSettings?.clioDefaultTimeEntryTick ?? true } : { logTimeEntry: user.userSettings?.clioDefaultTimeEntryTick ?? true }
additionalInfo: returnedMatters.length > 0 ?
{
matters: returnedMatters,
logTimeEntry: user.userSettings?.clioDefaultTimeEntryTick ?? true,
nonBillable: user.userSettings?.clioDefaultNonBillableTick ?? false
} :
{
logTimeEntry: user.userSettings?.clioDefaultTimeEntryTick ?? true
}
})
}
}
Expand Down Expand Up @@ -245,7 +253,8 @@ async function createCallLog({ user, contactInfo, authHeader, callLog, note, add
},
quantity: callLog.duration,
date: moment(callLog.startTime).toISOString(),
type: 'TimeEntry'
type: 'TimeEntry',
non_billable: additionalSubmission.nonBillable
}
}
const addTimerRes = await axios.post(
Expand Down
21 changes: 21 additions & 0 deletions src/adapters/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,12 @@
"type": "boolean",
"name": "Log time entry",
"defaultValue": true
},
{
"id": "clioDefaultNonBillableTick",
"type": "boolean",
"name": "Non-billable",
"defaultValue": false
}
]
},
Expand Down Expand Up @@ -533,6 +539,21 @@
"settingId": "clioDefaultTimeEntryTick"
}
}
},
{
"const": "nonBillable",
"title": "Non-billable",
"type": "checkbox",
"contactDependent": false,
"defaultSettingId": "clioDefaults",
"defaultSettingValues": {
"inboundCall": {
"settingId": "clioDefaultNonBillableTick"
},
"outboundCall": {
"settingId": "clioDefaultNonBillableTick"
}
}
}
]
},
Expand Down

0 comments on commit 17f284f

Please sign in to comment.