Merge pull request #353 from Oloodi/seed_delete_dataconnet

Seed delete dataconnet
This commit is contained in:
José Salazar
2026-02-03 11:09:21 -05:00
committed by GitHub
9 changed files with 2036 additions and 67 deletions

View File

@@ -31,10 +31,10 @@
"client_type": 3 "client_type": 3
}, },
{ {
"client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com", "client_id": "933560802882-29olj9ku64jbe9h7flinha6hbi8qrluh.apps.googleusercontent.com",
"client_type": 2, "client_type": 2,
"ios_info": { "ios_info": {
"bundle_id": "com.krow.app.staff.dev" "bundle_id": "com.krowwithus.staff"
} }
} }
] ]
@@ -67,10 +67,10 @@
"client_type": 3 "client_type": 3
}, },
{ {
"client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com", "client_id": "933560802882-29olj9ku64jbe9h7flinha6hbi8qrluh.apps.googleusercontent.com",
"client_type": 2, "client_type": 2,
"ios_info": { "ios_info": {
"bundle_id": "com.krow.app.staff.dev" "bundle_id": "com.krowwithus.staff"
} }
} }
] ]
@@ -85,6 +85,14 @@
} }
}, },
"oauth_client": [ "oauth_client": [
{
"client_id": "933560802882-fbqg2icq24bmci3f84evjrbth5huh87f.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.krowwithus.client",
"certificate_hash": "c3efbe1642239c599c16ad04c7fac340902fe280"
}
},
{ {
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
@@ -103,10 +111,10 @@
"client_type": 3 "client_type": 3
}, },
{ {
"client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com", "client_id": "933560802882-29olj9ku64jbe9h7flinha6hbi8qrluh.apps.googleusercontent.com",
"client_type": 2, "client_type": 2,
"ios_info": { "ios_info": {
"bundle_id": "com.krow.app.staff.dev" "bundle_id": "com.krowwithus.staff"
} }
} }
] ]
@@ -121,14 +129,6 @@
} }
}, },
"oauth_client": [ "oauth_client": [
{
"client_id": "933560802882-ikdfv3o5f47g36qqgvfq55o4m19n7gk4.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.krowwithus.staff",
"certificate_hash": "ac917ae8470ab29f1107c773c6017ff5ea5d102d"
}
},
{ {
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
@@ -147,10 +147,10 @@
"client_type": 3 "client_type": 3
}, },
{ {
"client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com", "client_id": "933560802882-29olj9ku64jbe9h7flinha6hbi8qrluh.apps.googleusercontent.com",
"client_type": 2, "client_type": 2,
"ios_info": { "ios_info": {
"bundle_id": "com.krow.app.staff.dev" "bundle_id": "com.krowwithus.staff"
} }
} }
] ]

View File

@@ -0,0 +1,162 @@
{
"project_info": {
"project_number": "933560802882",
"project_id": "krow-workforce-dev",
"storage_bucket": "krow-workforce-dev.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:933560802882:android:edcddb83ea4bbb517757db",
"android_client_info": {
"package_name": "com.krow.app.business.dev"
}
},
"oauth_client": [
{
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDBYhflhK6DThKnS7RM-9raKdvyKzLUjY4"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.krow.app.staff.dev"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:933560802882:android:d49b8c0f4d19e95e7757db",
"android_client_info": {
"package_name": "com.krow.app.staff.dev"
}
},
"oauth_client": [
{
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDBYhflhK6DThKnS7RM-9raKdvyKzLUjY4"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.krow.app.staff.dev"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:933560802882:android:da13569105659ead7757db",
"android_client_info": {
"package_name": "com.krowwithus.client"
}
},
"oauth_client": [
{
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDBYhflhK6DThKnS7RM-9raKdvyKzLUjY4"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.krow.app.staff.dev"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:933560802882:android:1ae05d85c865f77c7757db",
"android_client_info": {
"package_name": "com.krowwithus.staff"
}
},
"oauth_client": [
{
"client_id": "933560802882-ikdfv3o5f47g36qqgvfq55o4m19n7gk4.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.krowwithus.staff",
"certificate_hash": "ac917ae8470ab29f1107c773c6017ff5ea5d102d"
}
},
{
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDBYhflhK6DThKnS7RM-9raKdvyKzLUjY4"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.krow.app.staff.dev"
}
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -27,6 +27,7 @@ class PhoneVerificationPage extends StatelessWidget {
required BuildContext context, required BuildContext context,
required String phoneNumber, required String phoneNumber,
}) { }) {
print('Phone verification input: "$phoneNumber" len=${phoneNumber.length}');
if (phoneNumber.length == 10) { if (phoneNumber.length == 10) {
BlocProvider.of<AuthBloc>( BlocProvider.of<AuthBloc>(
context, context,

View File

@@ -159,7 +159,7 @@ class _FormI9PageState extends State<FormI9Page> {
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
child: ElevatedButton( child: ElevatedButton(
onPressed: () => Modular.to.pop(), onPressed: () => Modular.to.pop(true),
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: UiColors.primary, backgroundColor: UiColors.primary,
foregroundColor: UiColors.bgPopup, foregroundColor: UiColors.bgPopup,
@@ -513,23 +513,23 @@ class _FormI9PageState extends State<FormI9Page> {
_buildRadioOption( _buildRadioOption(
context, context,
state, state,
'citizen', 'CITIZEN',
'1. A citizen of the United States', '1. A citizen of the United States',
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
_buildRadioOption( _buildRadioOption(
context, context,
state, state,
'noncitizen_national', 'NONCITIZEN',
'2. A noncitizen national of the United States', '2. A noncitizen national of the United States',
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
_buildRadioOption( _buildRadioOption(
context, context,
state, state,
'permanent_resident', 'PERMANENT_RESIDENT',
'3. A lawful permanent resident', '3. A lawful permanent resident',
child: state.citizenshipStatus == 'permanent_resident' child: state.citizenshipStatus == 'PERMANENT_RESIDENT'
? Padding( ? Padding(
padding: const EdgeInsets.only(top: 12), padding: const EdgeInsets.only(top: 12),
child: _buildTextField( child: _buildTextField(
@@ -545,9 +545,9 @@ class _FormI9PageState extends State<FormI9Page> {
_buildRadioOption( _buildRadioOption(
context, context,
state, state,
'alien_authorized', 'ALIEN',
'4. An alien authorized to work', '4. An alien authorized to work',
child: state.citizenshipStatus == 'alien_authorized' child: state.citizenshipStatus == 'ALIEN'
? Padding( ? Padding(
padding: const EdgeInsets.only(top: 12), padding: const EdgeInsets.only(top: 12),
child: Column( child: Column(
@@ -765,13 +765,13 @@ class _FormI9PageState extends State<FormI9Page> {
String _getReadableCitizenship(String status) { String _getReadableCitizenship(String status) {
switch (status) { switch (status) {
case 'citizen': case 'CITIZEN':
return 'US Citizen'; return 'US Citizen';
case 'noncitizen_national': case 'NONCITIZEN':
return 'Noncitizen National'; return 'Noncitizen National';
case 'permanent_resident': case 'PERMANENT_RESIDENT':
return 'Permanent Resident'; return 'Permanent Resident';
case 'alien_authorized': case 'ALIEN':
return 'Alien Authorized to Work'; return 'Alien Authorized to Work';
default: default:
return 'Unknown'; return 'Unknown';

View File

@@ -205,7 +205,7 @@ class _FormW4PageState extends State<FormW4Page> {
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
child: ElevatedButton( child: ElevatedButton(
onPressed: () => Modular.to.pop(), onPressed: () => Modular.to.pop(true),
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: UiColors.primary, backgroundColor: UiColors.primary,
foregroundColor: UiColors.bgPopup, foregroundColor: UiColors.bgPopup,
@@ -460,7 +460,7 @@ class _FormW4PageState extends State<FormW4Page> {
_buildRadioOption( _buildRadioOption(
context, context,
state, state,
'single', 'SINGLE',
'Single or Married filing separately', 'Single or Married filing separately',
null, null,
), ),
@@ -468,7 +468,7 @@ class _FormW4PageState extends State<FormW4Page> {
_buildRadioOption( _buildRadioOption(
context, context,
state, state,
'married', 'MARRIED',
'Married filing jointly or Qualifying surviving spouse', 'Married filing jointly or Qualifying surviving spouse',
null, null,
), ),
@@ -476,7 +476,7 @@ class _FormW4PageState extends State<FormW4Page> {
_buildRadioOption( _buildRadioOption(
context, context,
state, state,
'head_of_household', 'HEAD',
'Head of household', 'Head of household',
'Check only if you\'re unmarried and pay more than half the costs of keeping up a home', 'Check only if you\'re unmarried and pay more than half the costs of keeping up a home',
), ),

View File

@@ -75,7 +75,7 @@ class TaxFormsPage extends StatelessWidget {
spacing: UiConstants.space6, spacing: UiConstants.space6,
children: <Widget>[ children: <Widget>[
_buildProgressOverview(state.forms), _buildProgressOverview(state.forms),
...state.forms.map(_buildFormCard), ...state.forms.map((TaxForm form) => _buildFormCard(context, form)),
_buildInfoCard(), _buildInfoCard(),
], ],
), ),
@@ -138,16 +138,22 @@ class TaxFormsPage extends StatelessWidget {
); );
} }
Widget _buildFormCard(TaxForm form) { Widget _buildFormCard(BuildContext context, TaxForm form) {
// Helper to get icon based on type (could be in entity or a mapper) // Helper to get icon based on type (could be in entity or a mapper)
final String icon = form is I9TaxForm ? '🛂' : '📋'; final String icon = form is I9TaxForm ? '🛂' : '📋';
return GestureDetector( return GestureDetector(
onTap: () { onTap: () async {
if (form is I9TaxForm) { if (form is I9TaxForm) {
Modular.to.pushNamed('i9', arguments: form); final result = await Modular.to.pushNamed('i9', arguments: form);
if (result == true && context.mounted) {
BlocProvider.of<TaxFormsCubit>(context).loadTaxForms();
}
} else if (form is W4TaxForm) { } else if (form is W4TaxForm) {
Modular.to.pushNamed('w4', arguments: form); final result = await Modular.to.pushNamed('w4', arguments: form);
if (result == true && context.mounted) {
BlocProvider.of<TaxFormsCubit>(context).loadTaxForms();
}
} }
}, },
child: Container( child: Container(

View File

@@ -0,0 +1,67 @@
mutation unseedAll @auth(level: USER) {
# ----------------------------------
# Leaf/Join tables
# ----------------------------------
taskComment_deleteMany(all: true)
memberTask_deleteMany(all: true)
assignment_deleteMany(all: true)
application_deleteMany(all: true)
message_deleteMany(all: true)
userConversation_deleteMany(all: true)
conversation_deleteMany(all: true)
activityLog_deleteMany(all: true)
clientFeedback_deleteMany(all: true)
recentPayment_deleteMany(all: true)
invoice_deleteMany(all: true)
invoiceTemplate_deleteMany(all: true)
customRateCard_deleteMany(all: true)
vendorRate_deleteMany(all: true)
vendorBenefitPlan_deleteMany(all: true)
staffCourse_deleteMany(all: true)
staffDocument_deleteMany(all: true)
staffRole_deleteMany(all: true)
staffAvailability_deleteMany(all: true)
staffAvailabilityStats_deleteMany(all: true)
emergencyContact_deleteMany(all: true)
taxForm_deleteMany(all: true)
certificate_deleteMany(all: true)
# ----------------------------------
# Tasks / Shifts / Orders
# ----------------------------------
task_deleteMany(all: true)
shiftRole_deleteMany(all: true)
shift_deleteMany(all: true)
order_deleteMany(all: true)
# ----------------------------------
# Teams / Hubs / Org
# ----------------------------------
teamMember_deleteMany(all: true)
teamHudDepartment_deleteMany(all: true)
team_deleteMany(all: true)
teamHub_deleteMany(all: true)
hub_deleteMany(all: true)
# ----------------------------------
# Catalog / Config
# ----------------------------------
roleCategory_deleteMany(all: true)
role_deleteMany(all: true)
category_deleteMany(all: true)
level_deleteMany(all: true)
course_deleteMany(all: true)
faqData_deleteMany(all: true)
benefitsData_deleteMany(all: true)
attireOption_deleteMany(all: true)
document_deleteMany(all: true)
# ----------------------------------
# Core entities
# ----------------------------------
staff_deleteMany(all: true)
vendor_deleteMany(all: true)
business_deleteMany(all: true)
account_deleteMany(all: true)
user_deleteMany(all: true)
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
# --- Data Connect / Backend --- # --- Data Connect / Backend ---
.PHONY: dataconnect-enable-apis dataconnect-init dataconnect-deploy dataconnect-sql-migrate dataconnect-generate-sdk dataconnect-sync dataconnect-bootstrap-db check-gcloud-beta .PHONY: dataconnect-enable-apis dataconnect-init dataconnect-deploy dataconnect-sql-migrate dataconnect-generate-sdk dataconnect-sync dataconnect-bootstrap-db check-gcloud-beta dataconnect-clean
# Enable all required APIs for Firebase Data Connect + Cloud SQL # Enable all required APIs for Firebase Data Connect + Cloud SQL
dataconnect-enable-apis: dataconnect-enable-apis:
@@ -50,9 +50,16 @@ dataconnect-sync:
# Execute seed in Firebase Data Connect # Execute seed in Firebase Data Connect
dataconnect-seed: dataconnect-seed:
@echo "--> Exec seed in Firebase Data Connect..." @echo "--> Exec seed in Firebase Data Connect..."
@firebase dataconnect:execute seeds/seed_min.graphql --project=$(FIREBASE_ALIAS) @firebase dataconnect:execute backend/dataconnect/functions/seed.gql --project=$(FIREBASE_ALIAS)
@echo "✅ Seed executed successfully." @echo "✅ Seed executed successfully."
# Execute clean, to delete all the data in Firebase Data Connect
dataconnect-clean:
@echo "--> Exec clean all the data in Firebase Data Connect..."
@firebase dataconnect:execute backend/dataconnect/functions/clean.gql --project=$(FIREBASE_ALIAS)
@echo "✅ Clean information executed successfully."
# Run tests for Data Connect deployment and migrations # Run tests for Data Connect deployment and migrations
dataconnect-test: dataconnect-test:
@echo "--> Running Data Connect tests..." @echo "--> Running Data Connect tests..."