kanbancast-components
Advanced tools
Comparing version
@@ -37,3 +37,3 @@ import { css as P, LitElement as T, html as m } from "lit"; | ||
}; | ||
const A = (i) => new U(typeof i == "string" ? i : i + "", void 0, _), O = (i, t) => { | ||
const O = (i) => new U(typeof i == "string" ? i : i + "", void 0, _), A = (i, t) => { | ||
if (v) | ||
@@ -50,3 +50,3 @@ i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); | ||
e += s.cssText; | ||
return A(e); | ||
return O(e); | ||
})(i) : i; | ||
@@ -182,3 +182,3 @@ /** | ||
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); | ||
return O(t, this.constructor.elementStyles), t; | ||
return A(t, this.constructor.elementStyles), t; | ||
} | ||
@@ -358,3 +358,3 @@ connectedCallback() { | ||
/* Your existing statuses */ | ||
], this.projectId = 2, this.newTaskTitle = "", this.newTaskDescription = "", this.apiKey = "y01Z2px2j71o", this.selectedTab = "Active", this.showModal = !1, this.theme = "light"; | ||
], this.projectId = 4, this.newTaskTitle = "", this.newTaskDescription = "", this.apiKey = "ilfYeZiUOU9q", this.selectedTab = "Active", this.showModal = !1, this.theme = "light"; | ||
} | ||
@@ -374,3 +374,3 @@ toggleTheme() { | ||
const i = await fetch( | ||
`https://kanbancast.com/public/projects/${this.projectId}`, | ||
"https://kanbancast.com/api/projects", | ||
{ | ||
@@ -386,5 +386,5 @@ method: "GET", | ||
const t = await i.json(); | ||
console.log(t), this.statuses = t.statuses, console.log("Statuses fetched successfully"); | ||
console.log(t), this.statuses = t.project.statuses, console.log("Statuses fetched successfully"); | ||
} else | ||
console.error("Failed to fetch statuses"); | ||
console.log(i), console.error("Failed to fetch statuses"); | ||
} catch (i) { | ||
@@ -391,0 +391,0 @@ console.error("Error fetching statuses:", i); |
{ | ||
"name": "kanbancast-components", | ||
"private": false, | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "types": "dist/board-view.d.ts", |
@@ -29,6 +29,6 @@ // src/BoardView.ts | ||
@property({ type: Array }) statuses: Status[] = [/* Your existing statuses */]; | ||
@property({ type: Number }) projectId: number = 2; | ||
@property({ type: Number }) projectId: number = 4; | ||
@property({ type: String }) newTaskTitle: string = ''; | ||
@property({ type: String }) newTaskDescription: string = ''; | ||
@property({type: String}) apiKey:string='y01Z2px2j71o'; | ||
@property({type: String}) apiKey:string='ilfYeZiUOU9q'; | ||
@@ -217,3 +217,3 @@ @state() selectedTab: string = 'Active'; | ||
try { | ||
const response = await fetch(`https://kanbancast.com/public/projects/${this.projectId}`, | ||
const response = await fetch(`https://kanbancast.com/api/projects`, | ||
{ | ||
@@ -229,5 +229,6 @@ method: 'GET', | ||
console.log(data) | ||
this.statuses = data.statuses; | ||
this.statuses = data.project.statuses; | ||
console.log('Statuses fetched successfully'); | ||
} else { | ||
console.log(response); | ||
console.error('Failed to fetch statuses'); | ||
@@ -234,0 +235,0 @@ } |
Sorry, the diff of this file is not supported yet
38994
0.14%1153
0.09%