mirror of
https://github.com/FranP-code/Pomodoro-Timer-with-Clockify-integration.git
synced 2025-10-12 23:52:30 +00:00
changed the archived logic and incresed the project limits to 5000
This commit is contained in:
@@ -108,14 +108,14 @@ const ClockifyTaskForm = ({timerOn, setTimerOn, signedIn, apiKey, setApiKey, tas
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
'X-Api-Key': apiKey,
|
'X-Api-Key': apiKey,
|
||||||
"content-type": "application/json"
|
'content-type': "application/json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const response = await fetch(`https://api.clockify.me/api/v1/workspaces/${e}/projects`, request)
|
const response = await fetch(`https://api.clockify.me/api/v1/workspaces/${e}/projects?archived=false&page-size=5000`, request)
|
||||||
const data = await response.json()
|
const data = await response.json()
|
||||||
data.clients = {}
|
data.clients = {}
|
||||||
data.forEach((project) => {
|
data.forEach((project) => {
|
||||||
if (project.clientName.length && !project.archived) {
|
if (project.clientName.length) {
|
||||||
const isClientDefined = !!data.clients[project.clientName]
|
const isClientDefined = !!data.clients[project.clientName]
|
||||||
if (!isClientDefined) {
|
if (!isClientDefined) {
|
||||||
data.clients[project.clientName] = []
|
data.clients[project.clientName] = []
|
||||||
@@ -220,7 +220,7 @@ const ClockifyTaskForm = ({timerOn, setTimerOn, signedIn, apiKey, setApiKey, tas
|
|||||||
{
|
{
|
||||||
clockifyData.projects &&
|
clockifyData.projects &&
|
||||||
clockifyData.projects.map((project) => (
|
clockifyData.projects.map((project) => (
|
||||||
!project.archived && !project.hide &&
|
!project.hide &&
|
||||||
<option value={project.id} key={project.id} style={{color: project.color}}>{project.name}</option>
|
<option value={project.id} key={project.id} style={{color: project.color}}>{project.name}</option>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user