Draft: Resolve "Document & refactor services functions"
Compare changes
Conflict: This file was modified in both the source and target branches.
Ask someone with write access to resolve it.
@@ -8,7 +8,13 @@ import { generateContentId, graphService } from '@/src/shared/services';
@@ -8,7 +8,13 @@ import { generateContentId, graphService } from '@/src/shared/services';
@@ -21,11 +27,22 @@ export function getVerbs(type: ElementType): Verbs {
@@ -21,11 +27,22 @@ export function getVerbs(type: ElementType): Verbs {
@@ -51,6 +68,11 @@ export function getConditions(currentBadge: any): Condition[] {
@@ -51,6 +68,11 @@ export function getConditions(currentBadge: any): Condition[] {
@@ -112,7 +134,13 @@ const phraseVerb = {
@@ -112,7 +134,13 @@ const phraseVerb = {
@@ -124,6 +152,11 @@ export function createPhrase(condition: Condition, elementType: ElementType) {
@@ -124,6 +152,11 @@ export function createPhrase(condition: Condition, elementType: ElementType) {
@@ -143,12 +176,20 @@ export function getConnectedBadges(contentId: string): Badge[] {
@@ -143,12 +176,20 @@ export function getConnectedBadges(contentId: string): Badge[] {
@@ -161,6 +202,10 @@ export function deleteConnectedConditions(contentId: string) {
@@ -161,6 +202,10 @@ export function deleteConnectedConditions(contentId: string) {
@@ -168,12 +213,19 @@ export function deleteBadge(id: string) {
@@ -168,12 +213,19 @@ export function deleteBadge(id: string) {
@@ -195,7 +247,12 @@ export function addNewBadge() {
@@ -195,7 +247,12 @@ export function addNewBadge() {
@@ -204,14 +261,27 @@ export async function saveCustomIcon(icon: string) {
@@ -204,14 +261,27 @@ export async function saveCustomIcon(icon: string) {
return badge.title === '' && badge.icon === '' && badge.description === '' && badge.rule.and.length === 0;
@@ -221,7 +291,12 @@ export function deleteEmptyBadges() {
@@ -221,7 +291,12 @@ export function deleteEmptyBadges() {