fixed db installation
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"github.com/tech/sendico/pkg/auth"
|
||||
"github.com/tech/sendico/pkg/db/paymethod"
|
||||
"github.com/tech/sendico/pkg/db/policy"
|
||||
"github.com/tech/sendico/pkg/db/repository"
|
||||
"github.com/tech/sendico/pkg/mlogger"
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
"github.com/tech/sendico/pkg/mservice"
|
||||
@@ -16,8 +15,7 @@ import (
|
||||
type RecipientDB struct {
|
||||
auth.ProtectedDBImp[*model.Recipient]
|
||||
auth.ArchivableDB[*model.Recipient]
|
||||
pmdb paymethod.DB
|
||||
paymentMethodsRepo repository.Repository
|
||||
pmdb paymethod.DB
|
||||
}
|
||||
|
||||
func Create(ctx context.Context,
|
||||
@@ -27,7 +25,7 @@ func Create(ctx context.Context,
|
||||
pmdb paymethod.DB,
|
||||
db *mongo.Database,
|
||||
) (*RecipientDB, error) {
|
||||
p, err := auth.CreateDBImp[*model.Recipient](ctx, logger, pdb, enforcer, mservice.Organizations, db)
|
||||
p, err := auth.CreateDBImp[*model.Recipient](ctx, logger, pdb, enforcer, mservice.Recipients, db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -49,8 +47,7 @@ func Create(ctx context.Context,
|
||||
createEmpty,
|
||||
getArchivable,
|
||||
),
|
||||
paymentMethodsRepo: repository.CreateMongoRepository(db, string(mservice.PaymentMethods)),
|
||||
pmdb: pmdb,
|
||||
pmdb: pmdb,
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import 'package:pweb/providers/two_factor.dart';
|
||||
import 'package:pweb/providers/upload_history.dart';
|
||||
import 'package:pweb/providers/wallets.dart';
|
||||
import 'package:pweb/providers/wallet_transactions.dart';
|
||||
import 'package:pweb/services/amplitude.dart';
|
||||
// import 'package:pweb/services/amplitude.dart';
|
||||
// import 'package:pweb/services/amplitude.dart';
|
||||
import 'package:pweb/services/operations.dart';
|
||||
import 'package:pweb/services/payments/history.dart';
|
||||
@@ -46,7 +46,7 @@ void main() async {
|
||||
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
await AmplitudeService.initialize();
|
||||
// await AmplitudeService.initialize();
|
||||
|
||||
|
||||
_setupLogging();
|
||||
|
||||
@@ -10,7 +10,7 @@ import 'package:pshared/provider/organizations.dart';
|
||||
import 'package:pshared/provider/recipient/pmethods.dart';
|
||||
|
||||
import 'package:pweb/pages/address_book/form/view.dart';
|
||||
import 'package:pweb/services/amplitude.dart';
|
||||
// import 'package:pweb/services/amplitude.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
@@ -66,11 +66,11 @@ class _AdressBookRecipientFormState extends State<AdressBookRecipientForm> {
|
||||
//TODO: Change when registration is ready
|
||||
void _save() {
|
||||
if (!_formKey.currentState!.validate() || _methods.isEmpty) {
|
||||
AmplitudeService.recipientAddCompleted(
|
||||
_type,
|
||||
_status,
|
||||
_methods.keys.toSet(),
|
||||
);
|
||||
// AmplitudeService.recipientAddCompleted(
|
||||
// _type,
|
||||
// _status,
|
||||
// _methods.keys.toSet(),
|
||||
// );
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(AppLocalizations.of(context)!.recipientFormRule),
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:provider/provider.dart';
|
||||
|
||||
import 'package:pshared/provider/locale.dart';
|
||||
|
||||
import 'package:pweb/services/amplitude.dart';
|
||||
// import 'package:pweb/services/amplitude.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
@@ -58,7 +58,7 @@ class LocalePicker extends StatelessWidget {
|
||||
onChanged: (locale) {
|
||||
if (locale != null) {
|
||||
localeProvider.setLocale(locale);
|
||||
AmplitudeService.localeChanged(locale);
|
||||
// AmplitudeService.localeChanged(locale);
|
||||
}
|
||||
},
|
||||
decoration: const InputDecoration(
|
||||
|
||||
@@ -10,7 +10,7 @@ import 'package:pshared/provider/recipient/provider.dart';
|
||||
|
||||
import 'package:pweb/models/wallet.dart';
|
||||
import 'package:pweb/providers/wallets.dart';
|
||||
import 'package:pweb/services/amplitude.dart';
|
||||
//import 'package:pweb/services/amplitude.dart';
|
||||
import 'package:pweb/widgets/sidebar/destinations.dart';
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class PageSelectorProvider extends ChangeNotifier {
|
||||
}
|
||||
|
||||
void goToAddRecipient() {
|
||||
AmplitudeService.recipientAddStarted();
|
||||
// AmplitudeService.recipientAddStarted();
|
||||
recipientProvider.setCurrentObject(null);
|
||||
_selected = PayoutDestination.addrecipient;
|
||||
_cameFromRecipientList = false;
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:jovial_svg/jovial_svg.dart';
|
||||
|
||||
|
||||
class ServiceLogo extends StatelessWidget {
|
||||
final double size;
|
||||
|
||||
const ServiceLogo({ super.key, this.size = 48 });
|
||||
const ServiceLogo({ super.key, this.size = 64 });
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => SizedBox(
|
||||
height: size,
|
||||
width: size,
|
||||
child: Image.asset('resources/logo.png'),
|
||||
child: ScalableImageWidget.fromSISource(
|
||||
key: const Key('mxLogo'),
|
||||
si: ScalableImageSource.fromSI(
|
||||
DefaultAssetBundle.of(context),
|
||||
'resources/logo.si',
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:pweb/services/amplitude.dart';
|
||||
|
||||
// import 'package:pweb/services/amplitude.dart';
|
||||
import 'package:pweb/widgets/sidebar/destinations.dart';
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class SideMenuColumn extends StatelessWidget {
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
onSelected(item);
|
||||
AmplitudeService.pageOpened(item, uiSource: 'sidebar');
|
||||
// AmplitudeService.pageOpened(item, uiSource: 'sidebar');
|
||||
},
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
hoverColor: theme.colorScheme.primaryContainer,
|
||||
|
||||
Reference in New Issue
Block a user