Skip to content

Commit

Permalink
Rename abbr to abbreviation
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmeister committed Jun 19, 2024
1 parent 555f40b commit 792a8db
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 75 deletions.
6 changes: 3 additions & 3 deletions api/migrations/schema/Version20240507154923.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
*/
final class Version20240507154923 extends AbstractMigration {
public function getDescription(): string {
return 'Add color and abbr to camp_collaboration';
return 'Add color and abbreviation to camp_collaboration';
}

public function up(Schema $schema): void {
$this->addSql('ALTER TABLE camp_collaboration ADD color VARCHAR(8) DEFAULT NULL');
$this->addSql('ALTER TABLE camp_collaboration ADD abbr VARCHAR(2) DEFAULT NULL');
$this->addSql('ALTER TABLE camp_collaboration ADD abbreviation TEXT DEFAULT NULL');
}

public function down(Schema $schema): void {
$this->addSql('ALTER TABLE camp_collaboration DROP abbreviation');
$this->addSql('ALTER TABLE camp_collaboration DROP color');
$this->addSql('ALTER TABLE camp_collaboration DROP abbr');
}
}
6 changes: 3 additions & 3 deletions api/src/Entity/CampCollaboration.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@ class CampCollaboration extends BaseEntity implements BelongsToCampInterface {
public ?string $color = null;

/**
* The abbreviation in th avatar.
* The abbreviation in the avatar.
*/
#[InputFilter\Trim]
#[ApiProperty(example: 'AB')]
#[Groups(['read', 'write'])]
#[ORM\Column(type: 'string', length: 2, nullable: true)]
public ?string $abbr = null;
#[ORM\Column(type: 'text', nullable: true)]
public ?string $abbreviation = null;

#[ApiProperty(readable: false, writable: false)]
#[ORM\Column(type: 'text', nullable: true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"user": "escaped_value"
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -141,7 +141,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -221,7 +221,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -301,7 +301,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -381,7 +381,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -461,7 +461,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -541,7 +541,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -621,7 +621,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -701,7 +701,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -781,7 +781,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -861,7 +861,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -941,7 +941,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"user": "escaped_value"
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -47,7 +47,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -80,7 +80,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -113,7 +113,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -146,7 +146,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down Expand Up @@ -179,7 +179,7 @@
"href": "escaped_value"
}
},
"abbr": "escaped_value",
"abbreviation": "escaped_value",
"color": "escaped_value",
"id": "escaped_value",
"inviteEmail": "escaped_value",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5322,8 +5322,8 @@ components:
deprecated: false
description: 'A user participating in some way in the planning or realization of a camp.'
properties:
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
type:
- 'null'
Expand Down Expand Up @@ -5375,10 +5375,9 @@ components:
deprecated: false
description: ''
properties:
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down Expand Up @@ -5451,10 +5450,9 @@ components:
deprecated: false
description: 'A user participating in some way in the planning or realization of a camp.'
properties:
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down Expand Up @@ -5533,10 +5531,9 @@ components:
deprecated: false
description: 'A user participating in some way in the planning or realization of a camp.'
properties:
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down Expand Up @@ -5592,10 +5589,9 @@ components:
deprecated: false
description: 'A user participating in some way in the planning or realization of a camp.'
properties:
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down Expand Up @@ -5646,10 +5642,9 @@ components:
maxLength: 16
readOnly: true
type: string
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type: ['null', string]
color:
description: 'The color of the avatar as a hex color string.'
Expand Down Expand Up @@ -5731,8 +5726,8 @@ components:
type: string
type: object
type: object
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
type:
- 'null'
Expand Down Expand Up @@ -5793,10 +5788,9 @@ components:
type: string
type: object
type: object
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down Expand Up @@ -5878,10 +5872,9 @@ components:
type: string
type: object
type: object
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down Expand Up @@ -5965,10 +5958,9 @@ components:
type: string
type: object
type: object
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down Expand Up @@ -6047,8 +6039,8 @@ components:
'@type':
readOnly: true
type: string
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
type:
- 'null'
Expand Down Expand Up @@ -6123,10 +6115,9 @@ components:
'@type':
readOnly: true
type: string
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down Expand Up @@ -6222,10 +6213,9 @@ components:
'@type':
readOnly: true
type: string
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down Expand Up @@ -6300,10 +6290,9 @@ components:
deprecated: false
description: 'A user participating in some way in the planning or realization of a camp.'
properties:
abbr:
description: 'The abbreviation in th avatar.'
abbreviation:
description: 'The abbreviation in the avatar.'
example: AB
maxLength: 2
type:
- 'null'
- string
Expand Down
4 changes: 2 additions & 2 deletions common/helpers/campCollaborationInitials.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import initials from './initials.js'
* Returns two characters to display for a camp collaboration based on its user
*/
export default function (campCollaboration) {
return campCollaboration?.abbr
? campCollaboration.abbr
return campCollaboration?.abbreviation
? campCollaboration.abbreviation
: initials(campCollaborationDisplayName(campCollaboration, null, false))
}
Loading

0 comments on commit 792a8db

Please sign in to comment.