Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QSI_Groupe1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lydia Tarmelit
QSI_Groupe1
Commits
cdcedcd2
Commit
cdcedcd2
authored
1 year ago
by
Joe El hajj
Browse files
Options
Downloads
Patches
Plain Diff
list
parent
c4697e78
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
contracts/AssociationRegistry.jsligo
+22
-7
22 additions, 7 deletions
contracts/AssociationRegistry.jsligo
with
22 additions
and
7 deletions
contracts/AssociationRegistry.jsligo
+
22
−
7
View file @
cdcedcd2
...
...
@@ -11,8 +11,7 @@ type associationStatus =
type association = {
name: string;
coordinate: coordinate;
status: associationStatus;
description: string;
admin: option<address>;
};
...
...
@@ -74,10 +73,26 @@ const changeAdmin = (associationName: string, stor: storage): return_ => {
return [list([]), updatedStorage];
}
//List associations
/*
//details d'une associations
@view
function getAssociationDetails(associationName: string, storage: storage): option<association> {
return Big_map.find_opt(associationName, storage);
const listDetailsAssociations = (associationName:string, stor: storage): association => {
return match(Big_map.find_opt(associationName, stor)){
when(Some(value)): value;
when(None): failwith("No value.")
};
}
// Function to list details of all associations
@view
const listAllAssociations = (stor: storage): list<association> => {
const associations: list<association> = list([]);
const keys = Big_map.of_list(stor);
for (const name of keys) {
const association = Big_map.find_opt(name, stor);
if (Option.is_some(association)) {
associations.push(Option.unopt(association));
}
*/
}
return associations;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment