Compare commits

...

3 Commits

Author SHA1 Message Date
48e1b02e0e
allow all item profile edit 2024-12-02 20:50:21 +03:00
3e0bbe5ffe
add handler to update profile items 2024-12-02 20:35:56 +03:00
fd586d09c3
add required profile edit flags 2024-12-02 20:35:04 +03:00
13 changed files with 39 additions and 19 deletions

View File

@ -121,6 +121,7 @@ func (ls *LocalHandlerService) GetHandler(accountService remote.AccountServiceIn
ls.DbRs.AddLocalFunc("check_transactions", ussdHandlers.CheckTransactions)
ls.DbRs.AddLocalFunc("get_transactions", ussdHandlers.GetTransactionsList)
ls.DbRs.AddLocalFunc("view_statement", ussdHandlers.ViewTransactionStatement)
ls.DbRs.AddLocalFunc("update_all_profile_items", ussdHandlers.UpdateAllProfileItems)
return ussdHandlers, nil
}

View File

@ -1,10 +1,11 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_familyname flag_allow_update 1
LOAD get_current_profile_info 0
RELOAD get_current_profile_info
MAP get_current_profile_info
MOUT back 0
LOAD save_familyname 64
HALT
LOAD save_familyname 0
RELOAD save_familyname
INCMP _ 0
INCMP pin_entry *
CATCH pin_entry flag_familyname_set 1
INCMP select_gender *

View File

@ -1,11 +1,11 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_firstname flag_allow_update 1
LOAD get_current_profile_info 0
RELOAD get_current_profile_info
MAP get_current_profile_info
LOAD save_firstname 128
MOUT back 0
HALT
LOAD save_firstname 0
RELOAD save_firstname
INCMP _ 0
INCMP pin_entry *
CATCH pin_entry flag_firstname_set 1
INCMP edit_family_name *

View File

@ -2,9 +2,10 @@ CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_location flag_allow_update 1
LOAD get_current_profile_info 0
RELOAD get_current_profile_info
LOAD save_location 16
MOUT back 0
HALT
LOAD save_location 0
RELOAD save_location
INCMP _ 0
INCMP pin_entry *
CATCH pin_entry flag_location_set 1
INCMP edit_offerings *

View File

@ -2,9 +2,10 @@ CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_offerings flag_allow_update 1
LOAD get_current_profile_info 0
RELOAD get_current_profile_info
LOAD save_offerings 0
LOAD save_offerings 8
MOUT back 0
HALT
RELOAD save_offerings
INCMP _ 0
INCMP pin_entry *
CATCH pin_entry flag_offerings_set 1
INCMP update_profile_items *

View File

@ -11,7 +11,7 @@ MOUT edit_offerings 6
MOUT view 7
MOUT back 0
HALT
INCMP my_account 0
INCMP ^ 0
INCMP edit_first_name 1
INCMP edit_family_name 2
INCMP select_gender 3

View File

@ -8,7 +8,9 @@ HALT
LOAD verify_yob 6
RELOAD verify_yob
CATCH incorrect_date_format flag_incorrect_date_format 1
LOAD save_yob 0
LOAD save_yob 32
RELOAD save_yob
INCMP _ 0
INCMP pin_entry *
CATCH pin_entry flag_yob_set 1
INCMP edit_location *

View File

@ -21,3 +21,9 @@ flag,flag_admin_privilege,27,this is set when a user has admin privileges.
flag,flag_unregistered_number,28,this is set when an unregistered phonenumber tries to perform an action
flag,flag_no_transfers,29,this is set when a user does not have any transactions
flag,flag_incorrect_statement,30,this is set when the selected statement is invalid
flag,flag_firstname_set,31,this is set when the first name of the profile is set
flag,flag_familyname_set,32,this is set when the family name of the profile is set
flag,flag_yob_set,33,this is set when the yob of the profile is set
flag,flag_gender_set,34,this is set when the gender of the profile is set
flag,flag_location_set,35,this is set when the location of the profile is set
flag,flag_offerings_set,36,this is set when the offerings of the profile is set

1 flag flag_language_set 8 checks whether the user has set their prefered language
21 flag flag_unregistered_number 28 this is set when an unregistered phonenumber tries to perform an action
22 flag flag_no_transfers 29 this is set when a user does not have any transactions
23 flag flag_incorrect_statement 30 this is set when the selected statement is invalid
24 flag flag_firstname_set 31 this is set when the first name of the profile is set
25 flag flag_familyname_set 32 this is set when the family name of the profile is set
26 flag flag_yob_set 33 this is set when the yob of the profile is set
27 flag flag_gender_set 34 this is set when the gender of the profile is set
28 flag flag_location_set 35 this is set when the location of the profile is set
29 flag flag_offerings_set 36 this is set when the offerings of the profile is set

View File

@ -1,3 +1,5 @@
LOAD update_all_profile_items 0
RELOAD update_all_profile_items
MOUT back 0
MOUT quit 9
HALT

View File

@ -1,4 +1,5 @@
LOAD save_gender 0
LOAD save_gender 32
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_gender flag_allow_update 1
MOVE pin_entry
CATCH pin_entry flag_gender_set 1
MOVE edit_yob

View File

@ -1,4 +1,5 @@
LOAD save_gender 0
LOAD save_gender 16
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_gender flag_allow_update 1
MOVE pin_entry
CATCH pin_entry flag_gender_set 1
MOVE edit_yob

View File

@ -1,4 +1,5 @@
LOAD save_gender 0
LOAD save_gender 8
CATCH incorrect_pin flag_incorrect_pin 1
CATCH update_gender flag_allow_update 1
MOVE pin_entry
CATCH pin_entry flag_gender_set 1
MOVE edit_yob

View File

@ -0,0 +1,3 @@
CATCH incorrect_pin flag_incorrect_pin 1
CATCH profile_update_success flag_allow_update 1
MOVE pin_entry