-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set settings per tasks and make them reactive
- Loading branch information
Showing
14 changed files
with
180 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { useViewSettings } from '@/composables/view-settings' | ||
|
||
export function useTaskProperties() { | ||
const { SORT_TYPE_KEY } = useViewSettings() | ||
|
||
const propertyItem = ({ | ||
key, | ||
icon = null, | ||
sortable = false, | ||
sortingKey = null, | ||
sortingType = SORT_TYPE_KEY.ALPHA, | ||
required = false | ||
}) => ({ | ||
key, | ||
icon, | ||
sortingKey, | ||
sortingType, | ||
sortable, | ||
required | ||
}) | ||
const propertyId = propertyItem({ | ||
key: 'id', | ||
icon: 'image', | ||
sortable: true | ||
}) | ||
const propertyName = propertyItem({ | ||
icon: 'image', | ||
key: 'name', | ||
sortable: true, | ||
required: true | ||
}) | ||
const propertyCreatedAt = propertyItem({ | ||
icon: 'image', | ||
key: 'createdAt', | ||
sortingKey: 'creationDate', | ||
sortingType: SORT_TYPE_KEY.DATE, | ||
sortable: true | ||
}) | ||
const propertyProgress = propertyItem({ | ||
icon: 'image', | ||
key: 'progress', | ||
sortingType: SORT_TYPE_KEY.NUMBER, | ||
sortable: true | ||
}) | ||
const propertyState = propertyItem({ | ||
icon: 'image', | ||
key: 'state', | ||
type: SORT_TYPE_KEY.NUMBER, | ||
sortable: false | ||
}) | ||
|
||
const propertyItems = [propertyId, propertyName, propertyCreatedAt, propertyProgress, propertyState] | ||
|
||
return { propertyItems } | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.