agregar sprint, has_impairment, tabla impairments + sync pendings KAPPA
This commit is contained in:
@@ -12,6 +12,8 @@ import type {
|
||||
KappaBusinessRule,
|
||||
KappaRequirement,
|
||||
KappaEmployee,
|
||||
KappaPending,
|
||||
KappaTypeImpediment,
|
||||
PaginatedResponse,
|
||||
} from '@/types/kappa'
|
||||
|
||||
@@ -197,6 +199,14 @@ class KappaAPI {
|
||||
async createRequirement(data: KappaRequirement): Promise<unknown> {
|
||||
return this.request<unknown>('POST', '/functionalrequirements/create/', data)
|
||||
}
|
||||
|
||||
async getPendings(huId: number, page = 1): Promise<PaginatedResponse<KappaPending>> {
|
||||
return this.request<PaginatedResponse<KappaPending>>('GET', `/pendings/?hu=${huId}&page=${page}`)
|
||||
}
|
||||
|
||||
async getTypeImpediments(): Promise<KappaTypeImpediment[]> {
|
||||
return this.request<KappaTypeImpediment[]>('GET', '/typeimpediments/')
|
||||
}
|
||||
}
|
||||
|
||||
export const kappa = new KappaAPI()
|
||||
|
||||
@@ -52,9 +52,27 @@ export interface UserStoryRecord {
|
||||
estimated_hours: number | null
|
||||
actual_hours: number | null
|
||||
assigned_to: number | null
|
||||
sprint: string | null
|
||||
has_impairment: boolean
|
||||
item_type: string | null
|
||||
hierarchy_path: string | null
|
||||
parent_code: string | null
|
||||
created_at: string | null
|
||||
}
|
||||
|
||||
export interface ImpairmentRecord {
|
||||
id: number
|
||||
hu_id: number
|
||||
responsible: string | null
|
||||
pending_activity: string | null
|
||||
pending_type: string | null
|
||||
type_impediment: boolean
|
||||
delivery_date: string | null
|
||||
status: boolean
|
||||
created_at: string | null
|
||||
updated_at: string | null
|
||||
}
|
||||
|
||||
export interface WorkItemRecord {
|
||||
id: number
|
||||
project_id: number
|
||||
@@ -236,4 +254,15 @@ export const tauriDb = {
|
||||
savePerformance(snap: PerformanceRecord): Promise<number> {
|
||||
return safeInvoke('save_performance', { snap })
|
||||
},
|
||||
|
||||
// Impairments
|
||||
getImpairments(huId: number): Promise<ImpairmentRecord[]> {
|
||||
return safeInvoke('get_impairments', { huId })
|
||||
},
|
||||
saveImpairment(imp: ImpairmentRecord): Promise<number> {
|
||||
return safeInvoke('save_impairment', { imp })
|
||||
},
|
||||
deleteImpairment(id: number): Promise<void> {
|
||||
return safeInvoke('delete_impairment', { id })
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user